OLD | NEW |
| (Empty) |
1 <html> | |
2 <!-- This page is meant to load inside the host browser like IE/FF --> | |
3 <head><title>Initialize hidden chrome frame</title> | |
4 <script type="text/javascript" src="chrome_frame_tester_helpers.js"> | |
5 </script> | |
6 <script type="text/javascript"> | |
7 var g_failure_timeout = null; | |
8 var g_test_id = 1; | |
9 var g_test_name = 'InHead'; | |
10 var g_cf3_loaded = false; | |
11 | |
12 function OnNavigationFailed() { | |
13 onFailure(g_test_name, g_test_id, 'ChromeFrame Navigation failed'); | |
14 } | |
15 | |
16 function OnObjectFocusFailed() { | |
17 appendStatus('chrome frame focus failed'); | |
18 onFailure(g_test_name, g_test_id, 'Embed in head test failed'); | |
19 } | |
20 | |
21 function OnFrameMessage(evt) { | |
22 appendStatus('Chrome frame visible and focused'); | |
23 if (evt.data == 'btnOnFocus') { | |
24 window.clearTimeout(g_failure_timeout); | |
25 g_failure_timeout = null; | |
26 appendStatus('Chrome frame visible and focused'); | |
27 | |
28 onSuccess(g_test_name, g_test_id); | |
29 } | |
30 } | |
31 | |
32 function OnFrameLoad() { | |
33 document.ChromeFrame.focus(); | |
34 } | |
35 | |
36 function OnLoad() { | |
37 g_failure_timeout = window.setTimeout(OnObjectFocusFailed, 10000); | |
38 } | |
39 </script> | |
40 <object id="ChromeFrame" width="300" height="80" tabindex="0" | |
41 codebase="http://www.google.com" | |
42 classid="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"> | |
43 <param name="src" value="simple_object_focus_cf.html"> | |
44 <param name="onload" value="OnFrameLoad();"> | |
45 <param name="onloaderror" value="OnNavigationFailed();"> | |
46 <param name="onmessage" value="OnFrameMessage(arguments[0]);"> | |
47 <embed width="300" height="80" name="ChromeFrame" | |
48 type="application/chromeframe" | |
49 src="simple_object_focus_cf.html" | |
50 onload="OnFrameLoad();" | |
51 onloaderror="OnNavigationFailed();" | |
52 onmessage="OnFrameMessage(arguments[0]);"> | |
53 </embed> | |
54 </object> | |
55 </head> | |
56 <body onload = "OnLoad();"> | |
57 <div id="statusPanel" style="border: 1px solid red; width: 100%"> | |
58 Test running.... | |
59 </div> | |
60 <div id = "dummy"> </div> | |
61 </body> | |
62 </html> | |
OLD | NEW |