Index: LayoutTests/http/tests/security/cross-frame-access-location-get-v9.html |
diff --git a/LayoutTests/http/tests/security/cross-frame-access-location-get-v9.html b/LayoutTests/http/tests/security/cross-frame-access-location-get-v9.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f21833327374eb61f9fd636c2e2d49a248bf9d36 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/cross-frame-access-location-get-v9.html |
@@ -0,0 +1,38 @@ |
+<script> |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ window.onload = function () { |
+ var frame = document.querySelector('iframe'); |
+ frame.onload = test; |
+ frame.src = "http://localhost:8000/security/resources/cross-frame-iframe-for-location-get-test.html"; |
+ }; |
+ |
+ function test() { |
+ var target = frames[0]; |
+ try { |
+ target.location.href; |
+ } catch (e) { |
+ console.log('target.location.href threw exception of type ' + e.name); |
+ } |
+ |
+ try { |
+ document.getElementById('output').innerText = 'First.'; |
+ } catch (e) { |
+ console.log('First document.getElementById.innerText threw exception of type ' + e.name); |
+ } |
+ |
+ try { |
+ document.getElementById('output').innerText += 'Second.'; |
+ } catch (e) { |
+ console.log('Second document.getElementById.innerText threw exception of type ' + e.name); |
+ } |
+ |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ } |
+</script> |
+<iframe></iframe> |
+<pre id="output"></pre> |