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

Unified Diff: third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-200.html

Issue 2737643002: Use internals.setMarker in layout tests in 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/paint/spellmarkers/document-markers-zoom-200.html
diff --git a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-200.html b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-200.html
index 97fd5e3e636f9a7a46b913b16183b096c26a1c1c..3a9b90b1dd9c2c0568726e5b6b80c9b80bbfd9a7 100644
--- a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-200.html
+++ b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-200.html
@@ -5,16 +5,15 @@
#editable { zoom: 200%; }
</style>
<script>
-if (window.testRunner) {
- testRunner.setMockSpellCheckerEnabled(true);
-}
-
function runTest() {
- editable = document.getElementById("editable");
- selection = document.getSelection();
- selection.addRange(new Range);
- range = selection.getRangeAt(0);
- range.selectNodeContents(editable);
+ const editable = document.getElementById("editable");
+ getSelection().selectAllChildren(editable);
+ if (window.internals) {
+ const range = document.createRange();
+ range.setStart(editable.firstChild, 0);
+ range.setEnd(editable.firstChild, 8);
+ internals.setMarker(document, range, 'spelling');
+ }
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698