diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 23:44:07 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 23:44:07 +0000 |
commit | 872a3b6d397fd3ee8d0e212ca25ebc3292af9afd (patch) | |
tree | 86b35372f35da39543be380aa581b6cd7db2a309 /chrome_frame | |
parent | 65165551604da0f53f5f17fbe8e97363b9436cf5 (diff) | |
download | chromium_src-872a3b6d397fd3ee8d0e212ca25ebc3292af9afd.zip chromium_src-872a3b6d397fd3ee8d0e212ca25ebc3292af9afd.tar.gz chromium_src-872a3b6d397fd3ee8d0e212ca25ebc3292af9afd.tar.bz2 |
Chrome Frame test fixes for Vista/IE7.
Write the ActiveX control from an external script in all test documents. This works around a "feature" of IE versions released between April, 2006 and April, 2008 that required the user to click on an ActiveX control to "activate" it. See http://msdn.microsoft.com/en-us/library/ms537508.aspx.
I also added asserts for the copying of CFInstance and CFInstall so that the whole test aborts if the files can't be copied, since otherwise test results are bogus.
BUG=60987
TEST=no manual testing needed; chrome_frame_tests.exe will either become better or worse.
Review URL: http://codereview.chromium.org/8777002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/data/chrome_frame_resize.html | 21 | ||||
-rw-r--r-- | chrome_frame/test/data/chrome_frame_tester_helpers.js | 125 | ||||
-rw-r--r-- | chrome_frame/test/data/event_listener.html | 11 | ||||
-rw-r--r-- | chrome_frame/test/data/initialize_hidden.html | 62 | ||||
-rw-r--r-- | chrome_frame/test/data/multiple_cf_instances_main.html | 33 | ||||
-rw-r--r-- | chrome_frame/test/data/navigateurl_absolute_host.html | 14 | ||||
-rw-r--r-- | chrome_frame/test/data/navigateurl_relative_host.html | 14 | ||||
-rw-r--r-- | chrome_frame/test/data/postmessage_basic_host.html | 27 | ||||
-rw-r--r-- | chrome_frame/test/data/privileged_apis_host.html | 29 | ||||
-rw-r--r-- | chrome_frame/test/data/simple_object_focus.html | 20 | ||||
-rw-r--r-- | chrome_frame/test/data/src_property_host.html | 25 | ||||
-rw-r--r-- | chrome_frame/test/data/version.html | 11 | ||||
-rw-r--r-- | chrome_frame/test/data/window_close.html | 27 | ||||
-rw-r--r-- | chrome_frame/test/test_with_web_server.cc | 4 |
14 files changed, 258 insertions, 165 deletions
diff --git a/chrome_frame/test/data/chrome_frame_resize.html b/chrome_frame/test/data/chrome_frame_resize.html index afba53b..eac22bc 100644 --- a/chrome_frame/test/data/chrome_frame_resize.html +++ b/chrome_frame/test/data/chrome_frame_resize.html @@ -117,16 +117,16 @@ function DebugResizeChromeFrame(delta) { Test running....
</div>
-<object id="ChromeFrame" codebase="http://www.google.com"
- classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"
- style="border: 1px solid blue">
- <param name="onload" value="return OnNavigationSucceeded();" />
- <embed id="ChromeFramePlugin" name="ChromeFrame"
- onload="return OnNavigationSucceeded();"
- type="application/chromeframe"
- style="border: 1px solid green">
- </embed>
-</object>
+<span id="ChromeFrameSpan"></span>
+<script type="text/javascript">
+insertControl("ChromeFrameSpan",
+ { "width": null,
+ "height": null,
+ "objectAttributes": { "style": "border: 1px solid blue" },
+ "eventHandlers": { "onload": "return OnNavigationSucceeded();" },
+ "embedAttributes": { "style": "border: 1px solid green" }
+ });
+</script>
<br />
<br />
@@ -135,4 +135,3 @@ Test running.... </body>
</html>
-
diff --git a/chrome_frame/test/data/chrome_frame_tester_helpers.js b/chrome_frame/test/data/chrome_frame_tester_helpers.js index b76e151..0fda552 100644 --- a/chrome_frame/test/data/chrome_frame_tester_helpers.js +++ b/chrome_frame/test/data/chrome_frame_tester_helpers.js @@ -189,3 +189,128 @@ function buildURL(pageName, queryString) { url += ((queryString == "") ? "" : "?" + queryString); return url; } + +// Helper function for insertControl. +function generateControlHtml(configuration) { + var objectAttributes = new Object(); + var params = new Array(); + var embedAttributes = new Object(); + var param; + var html; + + function stringifyAttributes(attributeCollection) { + var result = new String(); + for (var attributeName in attributeCollection) { + result += ' ' + attributeName + '="' + + attributeCollection[attributeName] + '"'; + } + return result; + } + + function applyAttribute(attributeCollection, name, value, defaultValue) { + if (value === undefined) + value = defaultValue; + if (value !== null) + attributeCollection[name] = value; + } + + objectAttributes.classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"; + objectAttributes.codebase="http://www.google.com"; + applyAttribute(objectAttributes, "id", configuration.id, "ChromeFrame"); + applyAttribute(objectAttributes, "width", configuration.width, "500"); + applyAttribute(objectAttributes, "height", configuration.height, "500"); + + // Attributes provided by the caller override any defaults. + for (var attribute in configuration.objectAttributes) { + if (configuration.objectAttributes[attribute] === null) + delete objectAttributes[attribute]; + else + objectAttributes[attribute] = configuration.objectAttributes[attribute]; + } + + embedAttributes.type = "application/chromeframe"; + + // By default, embed id = object.id + "Plugin". null id means omit id. + if (embedAttributes.id === null) + delete embedAttributes.id; + else if (embedAttributes.id === undefined && objectAttributes.id !== null) + embedAttributes.id = objectAttributes.id + "Plugin"; + + // By default, embed name = object.id. null name means omit name. + if (embedAttributes.name === null) + delete embedAttributes.name; + else if (embedAttributes.name === undefined && objectAttributes.id !== null) + embedAttributes.name = objectAttributes.id; + + applyAttribute(embedAttributes, "width", configuration.width, "500"); + applyAttribute(embedAttributes, "height", configuration.height, "500"); + applyAttribute(embedAttributes, "src", configuration.src, null); + + for (var attribute in configuration.embedAttributes) { + if (configuration.embedAttributes[attribute] === null) + delete embedAttributes[attribute]; + else + embedAttributes[attribute] = configuration.embedAttributes[attribute]; + } + + if (embedAttributes.src !== undefined) { + param = new Object(); + param.name = "src"; + param.value = embedAttributes.src; + params.push(param); + } + + // All event handlers are params and attributes of the embed object. + for (var eventName in configuration.eventHandlers) { + param = new Object(); + param.name = eventName; + param.value = configuration.eventHandlers[eventName]; + params.push(param); + embedAttributes[eventName] = configuration.eventHandlers[eventName]; + } + + html = "<object" + stringifyAttributes(objectAttributes) + ">\r\n"; + for (var i = 0; i < params.length; ++i) { + html += " <param" + stringifyAttributes(params[i]) + ">\r\n"; + } + html += " <embed" + stringifyAttributes(embedAttributes) + "></embed>\r\n" + + html += "</object>"; + + return html; +} + +// Write the text for the Chrome Frame ActiveX control into an element. +// This works around a "feature" of IE versions released between April, 2006 +// and April, 2008 that required the user to click on an ActiveX control to +// "activate" it. See http://msdn.microsoft.com/en-us/library/ms537508.aspx. +// +// |elementId| identifies the element in the current document into which the +// control markup will be inserted. |configuration| is an Object used to +// configure the control as below. Values shown are defaults, which may be +// overridden by supplying null values. +// { +// "id": "ChromeFrame", // id of object tag, name of the embed tag, and +// // basis of id of the embed tag. +// "width": "500", // width of both object and embed tags. +// "height": "500", // height of both object and embed tags. +// "src": "url", // src of embed tag and of param to object tag. +// "eventHandlers": { // Applied to embed tag and params to object tag. +// "onclose": "...", +// "onload": "...", +// "onloaderror": "..." +// } +// "objectAttributes": { // Custom attributes for the object tag. Any +// "tabindex": "...", // properties explicitly set to null will override +// "border": "...", // defaults. +// "style": "..." +// }, +// "embedAttributes": { // Custom attributes for the embed tag; +// "privileged_mode": "...", // similar to above. +// "style": "..." +// } +// } +function insertControl(elementId, configuration) { + var e = document.getElementById(elementId); + e.innerHTML = generateControlHtml(configuration); +} diff --git a/chrome_frame/test/data/event_listener.html b/chrome_frame/test/data/event_listener.html index 6fbd158..2c52436 100644 --- a/chrome_frame/test/data/event_listener.html +++ b/chrome_frame/test/data/event_listener.html @@ -28,13 +28,10 @@ </script> </head> <body onload="onDocumentLoad();"> - <object id="ChromeFrame" width="500" height ="300" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <embed id="ChromeFramePlugin" name="ChromeFrame" width="500" - height="500" type="application/chromeframe"> - </embed> - </object> +<span id="ChromeFrameSpan"></span> +<script type="text/javascript"> +insertControl("ChromeFrameSpan", { "objectAttributes": { "height": "300" } }); +</script> <div id="statusPanel" style="border: 1px solid red; width: 100%"> Test running.... </div> diff --git a/chrome_frame/test/data/initialize_hidden.html b/chrome_frame/test/data/initialize_hidden.html index 4f353b9..4c0c253 100644 --- a/chrome_frame/test/data/initialize_hidden.html +++ b/chrome_frame/test/data/initialize_hidden.html @@ -85,40 +85,34 @@ </script> </head> <body> - <div id="CFDiv1" style="visibility: hidden;"> - <object id="ChromeFrame1" width="300" height="80" tabindex="0" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="simple_object_focus_cf.html"> - <param name="onload" value="OnCF1Loaded();"> - <param name="onloaderror" value="OnNavigationFailed();"> - <param name="onmessage" value="OnCF1Message(arguments[0]);"> - <embed width="300" height="80" name="ChromeFrame1" - type="application/chromeframe" - src="simple_object_focus_cf.html" - onload="OnCF1Loaded();" - onloaderror="OnNavigationFailed();" - onmessage="OnCF1Message(arguments[0]);"> - </embed> - </object> - </div> - <div id="CFDiv2" style="display: none;"> - <object id="ChromeFrame2" width="300" height="80" tabindex="1" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="simple_object_focus_cf.html"> - <param name="onload" value="OnCF2Loaded();"> - <param name="onloaderror" value="OnNavigationFailed();"> - <param name="onmessage" value="OnCF2Message(arguments[0]);"> - <embed width="300" height="80" name="ChromeFrame2" - type="application/chromeframe" - src="simple_object_focus_cf.html" - onload="OnCF2Loaded();" - onloaderror="OnNavigationFailed();" - onmessage="OnCF2Message(arguments[0]);"> - </embed> - </object> - </div> + <div id="CFDiv1" style="visibility: hidden;"></div> + <script type="text/javascript"> +insertControl("CFDiv1", + { "id": "ChromeFrame1", + "width": "300", + "height": "80", + "src": "simple_object_focus_cf.html", + "eventHandlers": { "onload": "OnCF1Loaded();", + "onloaderror": "OnNavigationFailed();", + "onmessage": "OnCF1Message(arguments[0]);" }, + "objectAttributes": { "tabindex": "0" }, + "embedAttributes": {"id": null} + }); + </script> + <div id="CFDiv2" style="display: none;"></div> + <script type="text/javascript"> +insertControl("CFDiv2", + { "id": "ChromeFrame2", + "width": "300", + "height": "80", + "src": "simple_object_focus_cf.html", + "eventHandlers": { "onload": "OnCF2Loaded();", + "onloaderror": "OnNavigationFailed();", + "onmessage": "OnCF2Message(arguments[0]);" }, + "objectAttributes": { "tabindex": "1" }, + "embedAttributes": { "id": null} + }); + </script> <div id="statusPanel" style="border: 1px solid red; width: 100%"> Test running.... </div> diff --git a/chrome_frame/test/data/multiple_cf_instances_main.html b/chrome_frame/test/data/multiple_cf_instances_main.html index da6586d..3e994bc 100644 --- a/chrome_frame/test/data/multiple_cf_instances_main.html +++ b/chrome_frame/test/data/multiple_cf_instances_main.html @@ -1,18 +1,18 @@ <html> <head> <title>Multiple chrome frame instances test</title> +<script type="text/javascript" src="chrome_frame_tester_helpers.js"></script> <script type="text/javascript"> function createSecondChromeFrameInstance() { var dummy = document.createElement('span'); + dummy.id = "dummy"; document.body.appendChild(dummy); - dummy.innerHTML = '<object border="1" width="100%" height ="200px"' + - 'classid="clsid:E0A900DF-9611-4446-86BD-4B1D47E7DB2A">' + - '<param name="src"' + - 'value="multiple_cf_instances_test.html">' + - '<embed id="CFPlugin" width="500" height="500"' + - 'name="ChromeFrame" type="application/chromeframe"' + - 'src="multiple_cf_instances_test.html">' + - '</embed></object>'; + insertControl("dummy", + { "src": "multiple_cf_instances_test.html", + "objectAttributes": { "id": null, "border": "1", "width": "100%", + "height": "200px", "codebase": null }, + "embedAttributes": {"id": "CFPlugin", "name": "ChromeFrame" } + }); } function onLoad() { @@ -22,14 +22,15 @@ </head> <body onload="onLoad();"> - <object id="ChromeFrame1" width="500" height="500" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="about:blank"> - <embed id="ChromeFramePlugin" width="500" height="500" - name="ChromeFrame" type="application/chromeframe" - src="about:blank"> - </embed> - </object> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl("ChromeFrameSpan", + { "id": "ChromeFrame1", + "src": "about:blank", + "objectAttributes": { "codebase": null }, + "embedAttributes": {"id": "ChromeFramePlugin", "name": "ChromeFrame"} + }); + </script> ChromeFrame multiple widget instances test page. This testcase verifies whether multiple chrome frame widget instances can be created on the same page. diff --git a/chrome_frame/test/data/navigateurl_absolute_host.html b/chrome_frame/test/data/navigateurl_absolute_host.html index 03e1de2..6c86857 100644 --- a/chrome_frame/test/data/navigateurl_absolute_host.html +++ b/chrome_frame/test/data/navigateurl_absolute_host.html @@ -46,15 +46,11 @@ <div id="statusPanel" style="border: 1px solid red; width: 100%"> Test running.... </div> - <object id="ChromeFrame" width="500" height="500" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="onload" value="return OnChromeFrameLoaded();"> - <embed id="ChromeFramePlugin" width="500" height="500" - name="ChromeFrame" onload="return OnChromeFrameLoaded();" - type="application/chromeframe"> - </embed> - </OBJECT> + <span id="ChromeFrameSpan"></span> +<script type="text/javascript"> +insertControl("ChromeFrameSpan", + { "eventHandlers": { "onload": "return OnChromeFrameLoaded();" } }); +</script> <br /> <br /> diff --git a/chrome_frame/test/data/navigateurl_relative_host.html b/chrome_frame/test/data/navigateurl_relative_host.html index 06ec63e..f7cb55c 100644 --- a/chrome_frame/test/data/navigateurl_relative_host.html +++ b/chrome_frame/test/data/navigateurl_relative_host.html @@ -43,15 +43,11 @@ <div id="statusPanel" style="border: 1px solid red; width: 100%"> Test running.... </div> - <object id="ChromeFrame" width="500" height="500" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="onload" value="return OnChromeFrameLoaded();"> - <embed id="ChromeFramePlugin" width="500" height="500" - name="ChromeFrame" onload="return OnChromeFrameLoaded();" - type="application/chromeframe"> - </embed> - </OBJECT> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl("ChromeFrameSpan", + { "eventHandlers": { "onload": "return OnChromeFrameLoaded();" } }); + </script> <br /> <br /> diff --git a/chrome_frame/test/data/postmessage_basic_host.html b/chrome_frame/test/data/postmessage_basic_host.html index e5ecef9..22b6f2c 100644 --- a/chrome_frame/test/data/postmessage_basic_host.html +++ b/chrome_frame/test/data/postmessage_basic_host.html @@ -41,22 +41,17 @@ </head> <body> - <object id="ChromeFrame" width="500" height ="300" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="postmessage_basic_frame.html"> - <param name="onload" value="onChromeFrameLoaded();"> - <param name="onloaderror" value="onNavigationFailed();"> - <param name="onmessage" value="onChromeFrameMessage(arguments[0]);"> - <embed id="ChromeFramePlugin" name="ChromeFrame" - width="500" height="500" - src="postmessage_basic_frame.html" - type="application/chromeframe" - onload="onChromeFrameLoaded();" - onloaderror="onNavigationFailed();" - onmessage="onChromeFrameMessage(arguments[0]);"> - </embed> - </object> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl( + "ChromeFrameSpan", + { "src": "postmessage_basic_frame.html", + "eventHandlers": { "onload": "onChromeFrameLoaded();", + "onloaderror": "onNavigationFailed();", + "onmessage": "onChromeFrameMessage(arguments[0]);" }, + "objectAttributes": { "height": "300" } + }); + </script> <br> <br> <p>Test for PostMessage from the host browser to ChromeFrame and back</p> diff --git a/chrome_frame/test/data/privileged_apis_host.html b/chrome_frame/test/data/privileged_apis_host.html index 052b276..4347730 100644 --- a/chrome_frame/test/data/privileged_apis_host.html +++ b/chrome_frame/test/data/privileged_apis_host.html @@ -69,23 +69,20 @@ Test running.... </div> + <span id='ChromeFrameSpan'></span> <!-- TODO(siggi): Test setting onprivatemessage in these params --> - <object id='ChromeFrame' width='500' height='500' - codebase='http://www.google.com' - classid='CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A'> - <param name='src' value='privileged_apis_frame.html'> - <param name='onload' value='OnChromeFrameLoaded(arguments[0]);'> - <param name='onloaderror' value='OnNavigationFailed();'> - <param name='onmessage' value='OnChromeFrameMessage(arguments[0]);'> - <embed id='ChromeFramePlugin' width='500' height='500' name='ChromeFrame' - src='privileged_apis_frame.html' - type='application/chromeframe' - onload='OnChromeFrameLoaded(arguments[0]);' - onloaderror='OnNavigationFailed();' - onmessage='return OnChromeFrameMessage(arguments[0]);' - privileged_mode='1' - </embed> - </object> + <script type='text/javascript'> +insertControl( + 'ChromeFrameSpan', + { "src": "privileged_apis_frame.html", + "eventHandlers": { + "onload": "OnChromeFrameLoaded(arguments[0]);", + "onloaderror": "OnNavigationFailed();", + "onmessage": "return OnChromeFrameMessage(arguments[0]);" + }, + "embedAttributes": { "privileged_mode": "1" } + }); + </script> <p>Tests that privileged apis are unavailable from regular pages</p> </body> </html> diff --git a/chrome_frame/test/data/simple_object_focus.html b/chrome_frame/test/data/simple_object_focus.html index 138ffa5..4d93f28 100644 --- a/chrome_frame/test/data/simple_object_focus.html +++ b/chrome_frame/test/data/simple_object_focus.html @@ -82,14 +82,16 @@ function status(s) { <div id="status_panel" style="border: 1px solid red; width: 100%"> Test running.... </div> -<object id="ChromeFrame" width="300" height="60" tabindex="0" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="onload" value="return OnChromeFrameLoaded();">
- <embed width="300" height="60" name="ChromeFrame" - onload="return OnChromeFrameLoaded();" - type="application/chromeframe"> - </embed> -</object> +<span id="ChromeFrameSpan"></span> +<script type="text/javascript"> +insertControl( + "ChromeFrameSpan", + { "width": "300", + "height": "60", + "eventHandlers": { "onload": "return OnChromeFrameLoaded();" }, + "objectAttributes": { "tabindex": "0" }, + "embedAttributes": {"id": null } + }); +</script> </body> </html> diff --git a/chrome_frame/test/data/src_property_host.html b/chrome_frame/test/data/src_property_host.html index ee25208..9d025e2 100644 --- a/chrome_frame/test/data/src_property_host.html +++ b/chrome_frame/test/data/src_property_host.html @@ -26,20 +26,17 @@ <div id="statusPanel" style="border: 1px solid red; width: 100%"> Test running.... </div> - - <object id="ChromeFrame" width="500" height="500" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="src_property_frame1.html"> - <param name="onload" value="return OnChromeFrameLoaded(arguments[0]);"> - <param name="onloaderror" value="return OnNavigationFailed(arguments[0]);"> - <embed id="ChromeFramePlugin" width="500" height="500" name="ChromeFrame" - src="src_property_frame1.html" - type="application/chromeframe" - onload="return OnChromeFrameLoaded(arguments[0]);" - onloaderror="return OnNavigationFailed(arguments[0]);"> - </embed> - </object> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl( + "ChromeFrameSpan", + { "src": "src_property_frame1.html", + "eventHandlers": { + "onload": "return OnChromeFrameLoaded();", + "onloaderror": "return OnNavigationFailed(arguments[0]);" + } + }); + </script> <p>Tests ChromeFrame Navigation</p> </body> </html> diff --git a/chrome_frame/test/data/version.html b/chrome_frame/test/data/version.html index b585a6d..8c83529 100644 --- a/chrome_frame/test/data/version.html +++ b/chrome_frame/test/data/version.html @@ -12,13 +12,10 @@ </head> <body onload="onLoad();"> - <object id="ChromeFrame" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <embed id="ChromeFramePlugin" name="ChromeFrame" - type="application/chromeframe" - </embed> - </object> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl("ChromeFrameSpan", { "width": null, "height": null }); + </script> <br> <br> <p>Test for Chrome frame version</p> diff --git a/chrome_frame/test/data/window_close.html b/chrome_frame/test/data/window_close.html index e7f0718..6b78cea 100644 --- a/chrome_frame/test/data/window_close.html +++ b/chrome_frame/test/data/window_close.html @@ -28,21 +28,18 @@ Test running.... </div> - <object id="ChromeFrame" width="500" height="500" - codebase="http://www.google.com" - classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> - <param name="src" value="window_close_frame.html"> - <param name="onload" value="return OnChromeFrameLoaded(arguments[0]);"> - <param name="onloaderror" value="return OnNavigationFailed(arguments[0]);"> - <param name="onclose" value="return OnCloseWindow();"> - <embed id="ChromeFramePlugin" width="500" height="500" name="ChromeFrame" - src="window_close_frame.html" - type="application/chromeframe" - onload="return OnChromeFrameLoaded(arguments[0]);" - onloaderror="return OnNavigationFailed(arguments[0]);" - onclose="return OnCloseWindow();"> - </embed> - </object> + <span id="ChromeFrameSpan"></span> + <script type="text/javascript"> +insertControl( + "ChromeFrameSpan", + { "src": "window_close_frame.html", + "eventHandlers": { + "onload": "return OnChromeFrameLoaded(arguments[0]);", + "onloaderror": "return OnNavigationFailed(arguments[0]);", + "onclose": "return OnCloseWindow();" + } + }); + </script> <p>Tests window.close notification from ChromeFrame to its container</p> </body> </html> diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 900427e..a044b71 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -115,12 +115,12 @@ void ChromeFrameTestWithWebServer::SetUp() { CFInstance_src_path = chrome_frame_source_path.AppendASCII("CFInstance.js"); CFInstance_path_ = test_file_path_.AppendASCII("CFInstance.js"); - file_util::CopyFileW(CFInstance_src_path, CFInstance_path_); + ASSERT_TRUE(file_util::CopyFile(CFInstance_src_path, CFInstance_path_)); CFInstall_src_path = chrome_frame_source_path.AppendASCII("CFInstall.js"); CFInstall_path_ = test_file_path_.AppendASCII("CFInstall.js"); - file_util::CopyFileW(CFInstall_src_path, CFInstall_path_); + ASSERT_TRUE(file_util::CopyFile(CFInstall_src_path, CFInstall_path_)); server_mock_.ExpectAndServeAnyRequests(CFInvocation(CFInvocation::NONE)); server_mock_.set_expected_result("OK"); |