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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection.html

Issue 2697453005: Import wpt@758b3b4cfa805067f36121333ba031e583d3a62c (Closed)
Patch Set: Add -expected.txt files. Created 3 years, 10 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/external/wpt/html/semantics/forms/the-input-element/selection.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection.html
index 4ed4bc9141ce600a6f3898c2844a922f671f1ae4..7d9c1a4fd7e249e6e57e06f308d4f16fa51050aa 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection.html
@@ -57,9 +57,18 @@ test(function() {
input.type = type;
assert_equals(input.type, type, "the given input type is not supported");
- assert_throws("INVALID_STATE_ERR", function() { input.select(); });
+ var selectionStartBefore = input.selectionStart;
+ var selectionEndBefore = input.selectionEnd;
+ var selectionDirectionBefore = input.selectionDirection;
- }, "input type " + type + " should not support the select() method");
+ // Does not throw; see https://github.com/whatwg/html/issues/2275
+ input.select();
+
+ assert_equals(input.selectionStart, selectionStartBefore, "selectionStart must not change");
+ assert_equals(input.selectionEnd, selectionEndBefore, "selectionEnd must not change");
+ assert_equals(input.selectionDirection, selectionDirectionBefore, "selectionDirection must not change");
+
+ }, "input type " + type + " should do nothing when the select() method is called (but, not throw)");
});
});

Powered by Google App Engine
This is Rietveld 408576698