summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/data/navigateurl_absolute_host.html
blob: 6c86857cb95861d0d8a1101d0a1ff28b67145069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<!-- This page is meant to load inside the host browser like IE/FF -->
  <head>
    <script type="text/javascript" src="chrome_frame_tester_helpers.js">
    </script>
    <script type="text/javascript">
      function onLoad() {
        var chromeFrame = GetChromeFrame();
        chromeFrame.onloaderror = OnNavigationFailed;
        setTimeout(NavigateToURL, 100);
      }

      function NavigateToURL() {
        var frame_location = new String(window.location);
        frame_location = frame_location.replace(
            /navigateurl_absolute_host.html/, "navigateurl_basic_frame.html");
        var chromeFrame = GetChromeFrame();
        chromeFrame.src = frame_location;
        setTimeout(OnNavigationTimeout, 10000);
      }

      var navigation_success = 0;

      function OnNavigationFailed(msg) {
        if (!navigation_success) {
          onFailure("NavigateURL", 1, 'ChromeFrame Navigation failed: ' + msg);
        }
      }
      
      function OnNavigationTimeout() {
        OnNavigationFailed('TIMEOUT');
      }

      function OnChromeFrameLoaded() {
        navigation_success = 1;
        onSuccess("NavigateURL", 1);
      }

      function GetChromeFrame() {
        return window.document.ChromeFrame;
      }
    </script>
  </head>

  <body onload="onLoad();">
    <div id="statusPanel" style="border: 1px solid red; width: 100%">
    Test running....
    </div>
    <span id="ChromeFrameSpan"></span>
<script type="text/javascript">
insertControl("ChromeFrameSpan",
    { "eventHandlers": { "onload": "return OnChromeFrameLoaded();" } });
</script>
    <br />
    <br />

    <p>Tests ChromeFrame Navigation</p>

  </body>
</html>