- add sources.
[platform/framework/web/crosswalk.git] / src / chrome_frame / test / data / chrome_frame_target_blank.html
1 <!-- saved from url=(0014)about:internet -->
2 <!-- Note that for the above Mark of the Web to work, the comment must
3      be followed by a CR/LF ending, so please do not change the line endings. -->
4 <html>
5 <!-- This page is meant to load inside a host browser like IE/FF -->
6 <head>
7 <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
8 <script type="text/javascript" src="chrome_frame_tester_helpers.js"></script>
9 <script type="text/javascript">
10
11 function onLoad() {
12   if (!TestIfRunningInChrome()) {
13     onFailure("ChromeFrameWindowOpen", "Window Open failed :-(",
14                 "User agent = " + navigator.userAgent.toLowerCase());
15   }
16 }
17
18 var new_window;
19
20 function OpenPopup() {
21   new_window = window.open("http://www.nonexistent.com", "_blank",
22                            "left=10, top=10, height=250, width=250");
23 }
24
25 function OnKeyPress() {
26   var char_code = String.fromCharCode(event.keyCode);
27   if (char_code == 'O') {
28     OpenPopup();
29   } else if (char_code == 'C') {
30     new_window.close();
31   }
32 }
33
34 </script>
35 </head>
36
37 <body onload="onLoad();" onkeypress="OnKeyPress();">
38 <div id="statusPanel" style="border: 1px solid red; width: 100%">
39 ChromeFrame full tab mode window open test running....<br />
40 This test validates that a window open request with target blank targeted<br />
41 at a different domain routes the navigation back to the host browser.
42 </div>
43 <p>
44
45 </body>
46 </html>