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

Side by Side Diff: LayoutTests/fast/forms/setrangetext.html

Issue 596723002: Enabling selection API for input type=<file, color, date, email, number> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Enabling Selection API for input type email and number Created 6 years, 3 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 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 <script src="resources/common-setrangetext.js"></script> 6 <script src="resources/common-setrangetext.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 description("Test setRangeText() method on common input types."); 10 description("Test setRangeText() method on common input types.");
11 11
12 runTestsShouldPass("input", { type: "password" }); 12 runTestsShouldPass("input", { type: "password" });
13 runTestsShouldPass("input", { type: "tel" }); 13 runTestsShouldPass("input", { type: "tel" });
14 runTestsShouldPass("input", { type: "text" }); 14 runTestsShouldPass("input", { type: "text" });
15 runTestsShouldPass("input", { type: "text", dir: "rtl" }); 15 runTestsShouldPass("input", { type: "text", dir: "rtl" });
16 runTestsShouldPass("input", { type: "url" }); 16 runTestsShouldPass("input", { type: "url" });
17 runTestsShouldPass("input", { type: "email" });
17 18
18 debug("<hr>"); 19 debug("<hr>");
19 debug("Check that setRangeText() on disconnected elements doesn't crash and has proper values."); 20 debug("Check that setRangeText() on disconnected elements doesn't crash and has proper values.");
20 element = document.createElement("input"); 21 element = document.createElement("input");
21 evalAndLog("element.value = '0123456789'"); 22 evalAndLog("element.value = '0123456789'");
22 evalAndLog("element.setRangeText('ABC', 0, 0, 'select')"); 23 evalAndLog("element.setRangeText('ABC', 0, 0, 'select')");
23 shouldBeEqualToString("element.value", "ABC0123456789"); 24 shouldBeEqualToString("element.value", "ABC0123456789");
24 25
25 runTestsShouldFail("input", { type: "button" }); 26 runTestsShouldFail("input", { type: "button" });
26 runTestsShouldFail("input", { type: "checkbox" }); 27 runTestsShouldFail("input", { type: "checkbox" });
27 runTestsShouldFail("input", { type: "email" });
28 runTestsShouldFail("input", { type: "radio" }); 28 runTestsShouldFail("input", { type: "radio" });
29 runTestsShouldFail("input", { type: "reset" }); 29 runTestsShouldFail("input", { type: "reset" });
30 runTestsShouldFail("input", { type: "submit" }); 30 runTestsShouldFail("input", { type: "submit" });
31 31
32 </script> 32 </script>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/selection-wrongtype-expected.txt ('k') | LayoutTests/fast/forms/setrangetext-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698