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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/inline_spelling_markers.html

Issue 2736823002: Move tests in editing/spelling for marker appearance to paint/spellmarkers (Closed)
Patch Set: Created 3 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/spelling/inline_spelling_markers.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/inline_spelling_markers.html b/third_party/WebKit/LayoutTests/editing/spelling/inline_spelling_markers.html
deleted file mode 100644
index afcb4c33d4f32708fcae2844ef199865f67f00e2..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/editing/spelling/inline_spelling_markers.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-body { overflow:hidden; }
-
-.testDiv {
- width: 200px;
- height: 20px;
- border: 1px solid black;
- white-space: nowrap;
- overflow: hidden;
-}
-
-.forcertl {
- direction: rtl;
- unicode-bidi: bidi-override;
-}
-
-.ellipses {
- text-overflow:ellipsis;
-}
-
-</style>
-</head>
-<body>
-<div id="warning">
-This test requires window.internals. If you use content_shell,
-"--expose-internals-for-testing" command flag enables it.
-</div>
-
-LTR
-<div id="testLTR" class="testDiv" contenteditable="true">the the adlj adaasj sdklj. there there</div>
-
-RTL
-<div id="testRTL" class="testDiv forcertl" contenteditable="true">the the adlj adaasj sdklj. there there</div>
-
-LTR (text-overflow:ellipses):
-<div id="testLTREllipses" class="testDiv ellipses" contenteditable="true">the the adlj adaasj sdklj. there there</div>
-
-RTL (text-overflow:ellipses):
-<div id="testRTLEllipses" class="testDiv forcertl ellipses" contenteditable="true">the the adlj adaasj sdklj. there there</div>
-
-<script>
-if (window.internals)
- document.getElementById('warning').style.display = 'none';
-
-// This tests the correct placement of inline spelling and grammar markers in
-// text. Markers should line up exactly under misspelled words in all cases.
-
-// 'adlj', adaasj', 'sdklj'.
-const spellingMarkerRanges = [[8, 4], [13, 6], [20, 5]];
-
-// 'the', 'there'.
-const grammarMarkerRanges = [[4, 3], [33, 5]];
-
-['testLTR', 'testRTL', 'testLTREllipses', 'testRTLEllipses'].forEach(id => {
- const div = document.getElementById(id);
- const text = div.firstChild;
-
- spellingMarkerRanges.forEach(markerRange => {
- const range = document.createRange();
- range.setStart(text, markerRange[0]);
- range.setEnd(text, markerRange[0] + markerRange[1]);
- if (window.internals)
- internals.setMarker(document, range, 'spelling');
- });
-
- grammarMarkerRanges.forEach(markerRange => {
- const range = document.createRange();
- range.setStart(text, markerRange[0]);
- range.setEnd(text, markerRange[0] + markerRange[1]);
- if (window.internals)
- internals.setMarker(document, range, 'grammar');
- });
-});
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698