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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/move-by-character-brute-force.html

Issue 1809963002: [Editing][CodeHealth] Use w3c testharness in editing/seletion/move-by-* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 9 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/editing/selection/move-by-character-brute-force.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/move-by-character-brute-force.html b/third_party/WebKit/LayoutTests/editing/selection/move-by-character-brute-force.html
deleted file mode 100644
index c2acd65c200cb5d7f083ebf428033e8006a35e2b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/editing/selection/move-by-character-brute-force.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<meta charset="UTF-8">
-<script src="../../resources/js-test.js"></script>
-<div id="test"></div>
-<script>
-description("This test checks that we have simple caret motion up to a certain limit");
-
-function hasSimpleCaretMovement(charCode) {
- var testString = "aaaaa" + String.fromCharCode(charCode) + "bbbb";
- element.textContent = testString;
- var selection = window.getSelection();
- selection.collapse(element, 0);
- for (var i = 0; i < testString.length; ++i) {
- selection.modify("move", "forward", "character");
- if (selection.baseOffset != i + 1)
- return false;
- }
- return true;
-}
-
-function toHex(i) {
- var hex = i.toString(16);
- while (hex.length < 4)
- hex = "0" + hex;
- return hex;
-}
-
-var element = document.getElementById("test");
-
-debug("Positive control:");
-shouldBeTrue("hasSimpleCaretMovement(0x0041)");
-debug("");
-
-debug("Negative control:");
-shouldBeFalse("hasSimpleCaretMovement(0x0300)");
-debug("");
-
-debug("Brute force:");
-for (var i = 1; i < 1024; ++i) {
- if (i >= 0x0300 && i <= 0x036F)
- shouldBeFalse("hasSimpleCaretMovement(i) // i = U+" + toHex(i));
- else
- shouldBeTrue("hasSimpleCaretMovement(i) // i = U+" + toHex(i));
-}
-
-element.textContent = "";
-</script>

Powered by Google App Engine
This is Rietveld 408576698