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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/cached-frame-csp.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/js-test-resources/js-test-pre.js"></script> 4 <script src="/js-test-resources/js-test-pre.js"></script>
5 <script> 5 <script>
6 description('Check that a CSP header added by a 304 response does not ov erride one from the original request.'); 6 description('Check that a CSP header added by a 304 response does not ov erride one from the original request.');
7 window.jsTestIsAsync = true; 7 window.jsTestIsAsync = true;
8 8
9 var frame1, frame2; 9 var frame1, frame2;
10 function frameLoaded() { 10 function frameLoaded() {
11 frame1 = document.querySelector('iframe'); 11 frame1 = document.querySelector('iframe');
12 12
13 frame2 = document.createElement('iframe'); 13 frame2 = document.createElement('iframe');
14 document.body.appendChild(frame2); 14 document.body.appendChild(frame2);
15 frame2.onload = checkState; 15 frame2.onload = checkState;
16 16
17 frame2.src = frame1.src; 17 frame2.src = frame1.src;
18 } 18 }
19 19
20 function checkState() { 20 function checkState() {
21 debug('Check that the nonce is the same, meaning that the document w as only generated once:'); 21 debug('Check that the nonce is the same, meaning that the document w as only generated once:');
22 22
23 shouldBeTrue('frame1.contentDocument.querySelector("input").value == frame2.contentDocument.querySelector("input").value'); 23 shouldBeTrue('frame1.contentDocument.querySelector("input").value == frame2.contentDocument.querySelector("input").value');
24 finishJSTest(); 24 finishJSTest();
25 } 25 }
26 </script> 26 </script>
27 <script src="/js-test-resources/js-test-post.js"></script>
28 </head> 27 </head>
29 <body> 28 <body>
30 <iframe src="http://127.0.0.1:8000/security/contentSecurityPolicy/resources/ nph-cached-csp.pl" onload="frameLoaded()"></iframe> 29 <iframe src="http://127.0.0.1:8000/security/contentSecurityPolicy/resources/ nph-cached-csp.pl" onload="frameLoaded()"></iframe>
31 </body> 30 </body>
32 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698