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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <script>
2 if (window.testRunner) {
3 testRunner.dumpAsText();
4 testRunner.waitUntilDone();
5 }
6
7 window.onload = function () {
8 var frame = document.querySelector('iframe');
9 frame.onload = test;
10 frame.src = "http://localhost:8000/security/resources/cross-frame-iframe -for-location-get-test.html";
11 };
12
13 function test() {
14 var target = frames[0];
15 try {
16 target.location.href;
17 } catch (e) {
18 console.log('target.location.href threw exception of type ' + e.name );
19 }
20
21 try {
22 document.getElementById('output').innerText = 'First.';
23 } catch (e) {
24 console.log('First document.getElementById.innerText threw exception of type ' + e.name);
25 }
26
27 try {
28 document.getElementById('output').innerText += 'Second.';
29 } catch (e) {
30 console.log('Second document.getElementById.innerText threw exceptio n of type ' + e.name);
31 }
32
33 if (window.testRunner)
34 testRunner.notifyDone();
35 }
36 </script>
37 <iframe></iframe>
38 <pre id="output"></pre>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698