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

Side by Side Diff: LayoutTests/fast/forms/state-restore-to-non-edited-controls.html

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p>Test to NOT save state for non-edited controls</p> 7 <p>Test to NOT save state for non-edited controls</p>
8 <div id="console"></div> 8 <div id="console"></div>
9 9
10 <input id=emptyOnFirstVisit> 10 <input id=emptyOnFirstVisit>
(...skipping 22 matching lines...) Expand all
33 var state = document.getElementById('emptyOnFirstVisit'); 33 var state = document.getElementById('emptyOnFirstVisit');
34 if (!state.value) { 34 if (!state.value) {
35 // First visit. 35 // First visit.
36 if (window.testRunner) 36 if (window.testRunner)
37 testRunner.waitUntilDone(); 37 testRunner.waitUntilDone();
38 state.value = 'visited'; 38 state.value = 'visited';
39 makeForm(parent, '1', '1', '1', '1', '1', '1', '1', '1', '1'); 39 makeForm(parent, '1', '1', '1', '1', '1', '1', '1', '1', '1');
40 40
41 document.getElementById('text1').value = 'edit'; 41 document.getElementById('text1').value = 'edit';
42 // Submit form in a timeout to make sure that we create a new back/forwa rd list item. 42 // Submit form in a timeout to make sure that we create a new back/forwa rd list item.
43 setTimeout(function() {document.getElementById('form1').submit();}, 0); 43 setTimeout(function() {document.getElementById('form1').submit();}, 100) ;
44 } else { 44 } else {
45 // Second visit. 45 // Second visit.
46 makeForm(parent, '2', '2', '2', '2', '2', '2', '2', '2', '2'); 46 makeForm(parent, '2', '2', '2', '2', '2', '2', '2', '2', '2');
47 47
48 shouldBe('document.getElementById("button").value', '"2"'); 48 shouldBe('document.getElementById("button").value', '"2"');
49 shouldBe('document.getElementById("hidden").value', '"2"'); 49 shouldBe('document.getElementById("hidden").value', '"2"');
50 shouldBe('document.getElementById("image").value', '"2"'); 50 shouldBe('document.getElementById("image").value', '"2"');
51 shouldBe('document.getElementById("reset").value', '"2"'); 51 shouldBe('document.getElementById("reset").value', '"2"');
52 shouldBe('document.getElementById("submit1").value', '"2"'); 52 shouldBe('document.getElementById("submit1").value', '"2"');
53 shouldBe('document.getElementById("text0").value', '"2"'); 53 shouldBe('document.getElementById("text0").value', '"2"');
54 shouldBe('document.getElementById("text1").value', '"edit"'); 54 shouldBe('document.getElementById("text1").value', '"edit"');
55 shouldBe('document.getElementById("text2").value', '"2"'); 55 shouldBe('document.getElementById("text2").value', '"2"');
56 shouldBe('document.getElementById("textarea").value', '"2"'); 56 shouldBe('document.getElementById("textarea").value', '"2"');
57 57
58 parent.innerHTML = ''; 58 parent.innerHTML = '';
59 if (window.testRunner) 59 if (window.testRunner)
60 testRunner.notifyDone(); 60 testRunner.notifyDone();
61 } 61 }
62 } 62 }
63 63
64 runTest(); 64 runTest();
65 </script> 65 </script>
66 </body> 66 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698