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

Unified Diff: third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-175.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-175.html
diff --git a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-175.html b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-175.html
index 44674f1b1e15ae151a6e7134411dbbb316fff80d..e12d83eedfcfd01ee12417a50942066008ffe3d0 100644
--- a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-175.html
+++ b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-175.html
@@ -5,16 +5,15 @@
#editable { zoom: 175%; }
</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