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

Unified Diff: third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-125.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.html
diff --git a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.html b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.html
index 0a10370fcdae4cb780c0218212217e75d04a1383..b9f22fd6e6f17a9755c3b29521a1bd79aa5176d2 100644
--- a/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.html
+++ b/third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers.html
@@ -2,16 +2,15 @@
<html>
<head>
<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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/spellmarkers/document-markers-zoom-125.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698