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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/select-state-restore.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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script> 5 <script src="../resources/common.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p>Test if selected options are correctly restored even if their positions were changed.</p> 8 <p>Test if selected options are correctly restored even if their positions were changed.</p>
9 <div id="console"></div> 9 <div id="console"></div>
10 10
11 <input id="emptyOnFirstVisit"> 11 <input id="emptyOnFirstVisit">
12 <div id="parent"> 12 <div id="parent">
13 <form action="data:text/html,&lt;script>history.back()&lt;/script>" id=form1> 13 <form action="../../../resources/back.html" id=form1>
14 <select id="select1" multiple> 14 <select id="select1" multiple>
15 <option id="opt-ca-1" value="CA">California 1</option> 15 <option id="opt-ca-1" value="CA">California 1</option>
16 <option id="opt-ca-2" value="CA" selected>California 2</option> 16 <option id="opt-ca-2" value="CA" selected>California 2</option>
17 <option id="opt-la">LA</option> 17 <option id="opt-la">LA</option>
18 <optgroup> 18 <optgroup>
19 <option id="opt-tk" selected>Tokyo</option> 19 <option id="opt-tk" selected>Tokyo</option>
20 <option id="opt-os">Osaka</option> 20 <option id="opt-os">Osaka</option>
21 </optgroup> 21 </optgroup>
22 <option id="opt-ak" value="AK">Alaska</option> 22 <option id="opt-ak" value="AK">Alaska</option>
23 <option id="opt-wy" selected>WY</option> 23 <option id="opt-wy" selected>WY</option>
(...skipping 24 matching lines...) Expand all
48 }, 0); 48 }, 0);
49 } else { 49 } else {
50 // Went back to this page again, and form state should be restored. 50 // Went back to this page again, and form state should be restored.
51 shouldBeFalse('$("opt-la").selected'); 51 shouldBeFalse('$("opt-la").selected');
52 shouldBeFalse('$("opt-tk").selected'); 52 shouldBeFalse('$("opt-tk").selected');
53 shouldBeTrue('$("opt-os").selected'); 53 shouldBeTrue('$("opt-os").selected');
54 shouldBeFalse('$("opt-ak").selected'); 54 shouldBeFalse('$("opt-ak").selected');
55 shouldBeFalse('$("opt-wy").selected'); 55 shouldBeFalse('$("opt-wy").selected');
56 debug('We don\'t care which one is selected because their values are ide ntical:'); 56 debug('We don\'t care which one is selected because their values are ide ntical:');
57 shouldBeTrue('!!($("opt-ca-1").selected ^ $("opt-ca-2").selected)'); 57 shouldBeTrue('!!($("opt-ca-1").selected ^ $("opt-ca-2").selected)');
58 58
59 $('parent').innerHTML = ''; 59 $('parent').innerHTML = '';
60 setTimeout(function() { 60 setTimeout(function() {
61 finishJSTest(); 61 finishJSTest();
62 }, 0); 62 }, 0);
63 } 63 }
64 } 64 }
65 65
66 window.onload = runTest; 66 window.onload = runTest;
67 </script> 67 </script>
68 </body> 68 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698