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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/reset-textarea.html

Issue 1524663002: Move textarea-related tests to fast/forms/textarea/, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 <html> 1 <html>
2 <head> 2 <head>
3 </head> 3 </head>
4 <body> 4 <body>
5 <form> 5 <form>
6 <textarea id="noDefaultText"></textarea> 6 <textarea id="noDefaultText"></textarea>
7 <textarea id="hasDefaultText">Default Text</textarea> 7 <textarea id="hasDefaultText">Default Text</textarea>
8 <input id="resetButton" type="reset"> 8 <input id="resetButton" type="reset">
9 </form> 9 </form>
10 <p>This test verifies that textarea controls are properly reset. 10 <p>This test verifies that textarea controls are properly reset.
11 <br>You should see two element IDs below, and the word "SUCCESS" twice: 11 <br>You should see two element IDs below, and the word "SUCCESS" twice:
12 <script> 12 <script>
13 function test(element) 13 function test(element)
14 { 14 {
15 var result = "FAILED"; 15 var result = "FAILED";
16 if (element.value == element.defaultValue) 16 if (element.value == element.defaultValue)
17 result = "SUCCESS"; 17 result = "SUCCESS";
18 document.writeln("<br>" + element.id + ": " + result); 18 document.writeln("<br>" + element.id + ": " + result);
19 } 19 }
20 var noDefaultText = document.getElementById("noDefaultText"); 20 var noDefaultText = document.getElementById("noDefaultText");
21 var hasDefaultText = document.getElementById("hasDefaultText"); 21 var hasDefaultText = document.getElementById("hasDefaultText");
22 noDefaultText.value = "Not the default value."; 22 noDefaultText.value = "Not the default value.";
23 hasDefaultText.value = "Not the default value."; 23 hasDefaultText.value = "Not the default value.";
24 document.getElementById("resetButton").click(); 24 document.getElementById("resetButton").click();
25 test(noDefaultText); 25 test(noDefaultText);
26 test(hasDefaultText); 26 test(hasDefaultText);
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698