summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/data
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 01:01:32 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 01:01:32 +0000
commitd0ed50d2803d910f8e2b9f5451ee1f80c0d340ed (patch)
treee042e400647fc33f20f95318a74f7e136665fb08 /chrome_frame/test/data
parentfe7f3aa2e93a5d6634a2d81c29ac0f71e46c54db (diff)
downloadchromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.zip
chromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.tar.gz
chromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.tar.bz2
In pages rendered in ChromeFrame window open requests or link clicks with target blank which target a different origin
should initiate the navigation in the host browser. We achieve this by performing an origin check on the opener frame and the URL being opened. If the origins don't match we allow the host browser to handle this navigation. There is still one issue here as a popup window creation request is still initiated and sent out to the host browser which initiates a dummy attach external tab navigation. Subsequently while applying policy the OpenURL IPC is sent out to the host browser which initiates the navigation to the expected URL. This causes a dummy attach external tab entry to be created in the host browser's history which would have to be deleted. Fixes bug http://code.google.com/p/chromium/issues/detail?id=46667 Bug=46667 Test=Covered by new chrome frame unit test. Review URL: http://codereview.chromium.org/2855017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/data')
-rw-r--r--chrome_frame/test/data/chrome_frame_target_blank.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/chrome_frame/test/data/chrome_frame_target_blank.html b/chrome_frame/test/data/chrome_frame_target_blank.html
new file mode 100644
index 0000000..5247e8e
--- /dev/null
+++ b/chrome_frame/test/data/chrome_frame_target_blank.html
@@ -0,0 +1,46 @@
+<!-- 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("http://www.nonexistent.com", "_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....<br />
+This test validates that a window open request with target blank targeted<br />
+at a different domain routes the navigation back to the host browser.
+</div>
+<p>
+
+</body>
+</html> \ No newline at end of file