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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/input-type-change3.html

Issue 2417753003: Input element: Fix the dirty value flag after type change. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/input-type-change3-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <script> 3 <script>
4 description('Tests for writing and reading .type property of HTMLInputElement.') ; 4 description('Tests for writing and reading .type property of HTMLInputElement.') ;
5 5
6 var input = document.createElement('input'); 6 var input = document.createElement('input');
7 7
8 // The default type is "text". 8 // The default type is "text".
9 shouldBe('input.type', '"text"'); 9 shouldBe('input.type', '"text"');
10 shouldBeNull("input.getAttribute('type')"); 10 shouldBeNull("input.getAttribute('type')");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 check("submit", "submit"); 47 check("submit", "submit");
48 check("tel", "tel"); 48 check("tel", "tel");
49 check("telephone", "text", "telephone"); 49 check("telephone", "text", "telephone");
50 check("url", "url"); 50 check("url", "url");
51 check("uri", "text", "uri"); 51 check("uri", "text", "uri");
52 52
53 // Empty and unknown value handling. 53 // Empty and unknown value handling.
54 check("", "text", ""); 54 check("", "text", "");
55 check("x-unknown", "text", "x-unknown"); 55 check("x-unknown", "text", "x-unknown");
56 shouldBeNull("input.removeAttribute('type'); input.getAttribute('type')"); 56 shouldBeNull("input.removeAttribute('type'); input.getAttribute('type')");
57
58 debug("Check dirty flag behavior");
59 input = document.createElement("input");
60 input.type = "hidden";
61 input.defaultValue = "Default";
62 input.type = "text";
63 // The dirty flag should be still false, and the defaultValue should be reflecte d
64 // to value.
65 shouldBeEqualToString("input.defaultValue = 'UpdatedDefault'; input.value", "Upd atedDefault");
57 </script> 66 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/input-type-change3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698