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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/text.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/text.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/text.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/text.html
deleted file mode 100644
index 7e33a9c7fec757d523af978f30a500abb6bf3cd4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/text.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Text input element</title>
- <link rel="author" title="Kinuko Yasuda" href="mailto:kinuko@chromium.org">
- <link rel="help" href="https://html.spec.whatwg.org/multipage/#text-(type=text)-state-and-search-state-(type=search)">
- <script src="../../../../../../resources/testharness.js"></script>
- <script src="../../../../../../resources/testharnessreport.js"></script>
- </head>
-
- <body>
- <h1>Text input element</h1>
- <div style="display: none">
-
- <input id="text" type="text" />
- <input id="text_with_value" type="text" value="foo" />
-
- <input id="search" type="search" />
- <input id="search_with_value" type="search" value="foo" />
-
- </div>
- <div id="log"></div>
- <script type="text/javascript">
- var types = [ 'text', 'search' ];
-
- for (var i = 0; i < types.length; ++i) {
- test(
- function() {
- assert_equals(document.getElementById(types[i]).value, "");
- assert_equals(document.getElementById(types[i] + "_with_value").value, "foo");
- }, "Value returns the current value for " + types[i]);
-
- test(
- function() {
- document.getElementById(types[i]).value = "A";
- assert_equals(document.getElementById(types[i]).value, "A");
- document.getElementById(types[i]).value = "B";
- }, "Setting value changes the current value for " + types[i]);
-
- test(
- function() {
- // Any LF (\n) must be stripped.
- document.getElementById(types[i]).value = "\nAB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "A\nB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "AB\n";
- assert_equals(document.getElementById(types[i]).value, "AB");
-
- // Any CR (\r) must be stripped.
- document.getElementById(types[i]).value = "\rAB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "A\rB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "AB\r";
- assert_equals(document.getElementById(types[i]).value, "AB");
-
- // Any combinations of LF CR must be stripped.
- document.getElementById(types[i]).value = "\r\nAB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "A\r\nB";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "AB\r\n";
- assert_equals(document.getElementById(types[i]).value, "AB");
- document.getElementById(types[i]).value = "\r\nA\n\rB\r\n";
- assert_equals(document.getElementById(types[i]).value, "AB");
- }, "Value sanitization algorithm should strip line breaks for " + types[i]);
-
- test(
- function() {
- assert_equals(document.getElementById(types[i]).files, null);
- }, "files attribute must return null for " + types[i]);
-
- test(
- function() {
- assert_equals(document.getElementById(types[i]).valueAsDate, null);
- }, "valueAsDate attribute must return null for " + types[i]);
-
- test(
- function() {
- assert_equals(document.getElementById(types[i]).valueAsNumber, NaN);
- }, "valueAsNumber attribute must return NaN for " + types[i]);
-
- test(
- function() {
- assert_equals(document.getElementById("text").list, null);
- }, "list attribute must return null for " + types[i]);
-
- test(
- function() {
- var el = document.getElementById(types[i]);
- assert_throws("InvalidStateError", function() { el.stepDown(); }, "");
- }, "stepDown does not apply for " + types[i]);
-
- test(
- function() {
- var el = document.getElementById(types[i]);
- assert_throws("InvalidStateError", function() { el.stepUp(); }, "");
- }, "stepUp does not apply for " + types[i]);
- }
-
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698