Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-location-get-v9.html

Issue 18661005: DO NOT SUBMIT. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698