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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny.html

Issue 1530393003: WIP: Move 'X-Frame-Options' checking to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ugh. Created 4 years, 11 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
OLDNEW
1 <script> 1 <script>
2 if (window.testRunner) { 2 if (window.testRunner) {
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 testRunner.dumpChildFramesAsText(); 4 testRunner.dumpChildFramesAsText();
5 testRunner.dumpResourceLoadCallbacks(); 5 testRunner.dumpResourceLoadCallbacks();
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 } 7 }
8 8
9 function checkIfDone() { 9 function checkIfDone() {
10 try { 10 try {
11 var url = document.querySelector('iframe').contentWindow.location.hr ef; 11 var url = document.querySelector('iframe').contentWindow.location.hr ef;
12 console.log("FAIL: Could read contentWindow.location.href"); 12 console.log("FAIL: Could read contentWindow.location.href");
13 } catch (e) { 13 } catch (e) {
14 console.log("PASS: Access to contentWindow.location.href threw an ex ception."); 14 console.log("PASS: Access to contentWindow.location.href threw an ex ception.");
15 } 15 }
16 16
17 testRunner.notifyDone(); 17 testRunner.notifyDone();
18 } 18 }
19 </script> 19 </script>
20 20
21 <p>There should be no content in the iframe below</p> 21 <p>There should be no content in the iframe below</p>
22 <iframe style="width:500px; height:500px" src="http://127.0.0.1:8000/security/XF rameOptions/resources/x-frame-options-deny.cgi" onload="checkIfDone()"></iframe> 22 <iframe style="width:500px; height:500px" src="http://127.0.0.1:8000/security/XF rameOptions/resources/x-frame-options-deny.cgi" onload="checkIfDone()" onerror=" checkIfDone()"></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698