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">
6 <script type="text/javascript">
7 var g_failure_timeout = null;
9 var g_test_name = 'InHead';
10 var g_cf3_loaded = false;
12 function OnNavigationFailed() {
13 onFailure(g_test_name, g_test_id, 'ChromeFrame Navigation failed');
16 function OnObjectFocusFailed() {
17 appendStatus('chrome frame focus failed');
18 onFailure(g_test_name, g_test_id, 'Embed in head test failed');
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');
28 onSuccess(g_test_name, g_test_id);
32 function OnFrameLoad() {
33 document.ChromeFrame.focus();
37 g_failure_timeout = window.setTimeout(OnObjectFocusFailed, 10000);
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]);">
56 <body onload = "OnLoad();">
57 <div id="statusPanel" style="border: 1px solid red; width: 100%">
60 <div id = "dummy"> </div>