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

Unified Diff: LayoutTests/fast/forms/resources/common-setrangetext.js

Issue 1229133004: Add SelectionMode enum for setRangeText() in HTMLInputElement and HTMLTextAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix for failing tests Created 5 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/search/search-setrangetext-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/resources/common-setrangetext.js
diff --git a/LayoutTests/fast/forms/resources/common-setrangetext.js b/LayoutTests/fast/forms/resources/common-setrangetext.js
index 6861347fab84f8211e1f9e7f54e47b0ab9bbacd6..7b05d2c60d8b93cde20e9eabdd6f68c22fc0b884 100644
--- a/LayoutTests/fast/forms/resources/common-setrangetext.js
+++ b/LayoutTests/fast/forms/resources/common-setrangetext.js
@@ -83,10 +83,10 @@ function runTestsShouldPass(tagName, attributes)
evalAndLog("element.value = '0123456789'");
evalAndLog("element.setSelectionRange(6, 9)");
- evalAndLog("element.setRangeText('AB', 1, 1, 'invalid')"); // Invalid selectMode values default to preserve.
- shouldBeEqualToString("element.value", "0AB123456789");
- shouldBe("element.selectionStart", "8");
- shouldBe("element.selectionEnd", "11");
+ shouldThrow("element.setRangeText('AB', 1, 1, 'invalid')"); // Invalid selectMode should throw TypeError
+ shouldBeEqualToString("element.value", "0123456789");
+ shouldBe("element.selectionStart", "6");
+ shouldBe("element.selectionEnd", "9");
evalAndLog("element.value = '0123456789'");
evalAndLog("element.setSelectionRange(6, 9)");
« no previous file with comments | « no previous file | LayoutTests/fast/forms/search/search-setrangetext-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698