Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / state-save-of-detached-control.html
blobad3402d83055535093e1226c5dbe1ec919737640
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body onload="runTest()">
7 <p>Test to NOT save state of a detached form control.</p>
8 <div id="console"></div>
10 <input id=emptyOnFirstVisit>
11 <form action="data:text/html,<script>history.back()&lt;/script>" id=form1>
12 <input name=user id=input2>
13 </form>
15 <script>
16 var i1;
18 function runTest()
20 var form1 = document.getElementById('form1');
21 var state = document.getElementById('emptyOnFirstVisit');
22 if (!state.value) {
23 // First visit.
24 if (window.testRunner)
25 testRunner.waitUntilDone();
26 state.value = 'visited';
28 form1.innerHTML = '<input name=user id=input1>';
29 i1 = document.getElementById('input1');
30 i1.value = 'value1';
31 form1.removeChild(i1);
32 // Submit form in a timeout to make sure that we create a new back/forward list item.
33 setTimeout(function() {document.getElementById('form1').submit();}, 0);
34 } else {
35 // Second visit.
36 shouldBe('document.getElementById("input2").value', '""'); // Not 'value1'.
38 if (window.testRunner)
39 testRunner.notifyDone();
42 </script>
43 </body>
44 </html>