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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/loader/form-state-restore-with-frames.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <meta http-equiv="pragma" content="no-cache"> 4 <meta http-equiv="pragma" content="no-cache">
5 <meta http-equiv="cache-control" content="no-cache"> 5 <meta http-equiv="cache-control" content="no-cache">
6 </head> 6 </head>
7 <body onload="startTest()"> 7 <body onload="startTest()">
8 <input name="name1" id="input1"> 8 <input name="name1" id="input1">
9 <iframe id="frame1" src="resources/form-state-restore-with-frames-1.html"> 9 <iframe id="frame1" src="resources/form-state-restore-with-frames-1.html">
10 </iframe> 10 </iframe>
11 <form id="form1" action="data:text/html,&lt;script>history.back();&lt;/script>"> 11 <form id="form1" action="../../resources/back.html">
12 <input type="submit"> 12 <input type="submit">
13 </form> 13 </form>
14 14
15 <script> 15 <script>
16 function $(id) { 16 function $(id) {
17 return document.getElementById(id); 17 return document.getElementById(id);
18 } 18 }
19 function frame$(frame, id) { 19 function frame$(frame, id) {
20 return frame.contentDocument.getElementById(id); 20 return frame.contentDocument.getElementById(id);
21 } 21 }
22 22
23 function startTest() { 23 function startTest() {
24 if ($('input1').value == 'visited') { 24 if ($('input1').value == 'visited') {
25 shouldBeEqualToString('frame$($("frame1"), "input2").value', 'value2'); 25 shouldBeEqualToString('frame$($("frame1"), "input2").value', 'value2');
26 shouldBeEqualToString('frame$(frame$($("frame1"), "frame2"), "input3").v alue', 'value3'); 26 shouldBeEqualToString('frame$(frame$($("frame1"), "frame2"), "input3").v alue', 'value3');
27 finishJSTest(); 27 finishJSTest();
28 } else { 28 } else {
29 setTimeout(function() { 29 setTimeout(function() {
30 $('input1').value = 'visited'; 30 $('input1').value = 'visited';
31 frame$($('frame1'), 'input2').value = 'value2'; 31 frame$($('frame1'), 'input2').value = 'value2';
32 frame$(frame$($('frame1'), 'frame2'), 'input3').value = 'value3'; 32 frame$(frame$($('frame1'), 'frame2'), 'input3').value = 'value3';
33 $('form1').submit(); 33 $('form1').submit();
34 }, 0); 34 }, 0);
35 } 35 }
36 } 36 }
37 37
38 jsTestIsAsync = true; 38 jsTestIsAsync = true;
39 </script> 39 </script>
40 </body> 40 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698