summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/data/chrome_frame_window_open.html
blob: 22515ed3c99389a809a3ed410a3b7c767dfe749d (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
<!-- saved from url=(0014)about:internet -->
<!-- Note that for the above Mark of the Web to work, the comment must
     be followed by a CR/LF ending, so please do not change the line endings. -->
<html>
<!-- This page is meant to load inside a host browser like IE/FF -->
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<script type="text/javascript" src="chrome_frame_tester_helpers.js"></script>
<script type="text/javascript">

function onLoad() {
  if (!TestIfRunningInChrome()) {
    onFailure("ChromeFrameWindowOpen", "Window Open failed :-(",
                "User agent = " + navigator.userAgent.toLowerCase());
  }
}

var new_window;

function OpenPopup() {
  new_window = window.open("chrome_frame_window_open_popup.html", "_blank",
                           "left=10, top=10, height=250, width=250");
}

function OnKeyPress() {
  var char_code = String.fromCharCode(event.keyCode);
  if (char_code == 'O') {
    OpenPopup();
  } else if (char_code == 'C') {
    new_window.close();
  }
}

</script>
</head>

<body onload="onLoad();" onkeypress="OnKeyPress();">
<div id="statusPanel" style="border: 1px solid red; width: 100%">
ChromeFrame full tab mode window open test running....
</div>
<p>

</body>
</html>