Chromium Code Reviews| Index: LayoutTests/editing/spelling/spelling-linebreak.html |
| diff --git a/LayoutTests/editing/spelling/spelling-linebreak.html b/LayoutTests/editing/spelling/spelling-linebreak.html |
| index 70e52bff69568b998bc538ecf456c775135d1dcf..dc7d62c02d183123f2eb81939c8117e60e0068fd 100644 |
| --- a/LayoutTests/editing/spelling/spelling-linebreak.html |
| +++ b/LayoutTests/editing/spelling/spelling-linebreak.html |
| @@ -8,17 +8,20 @@ |
| font-size: 24px; |
| } |
| </style> |
| +<script src="../../resources/js-test.js"></script> |
| <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script> |
| <script> |
| -function log(msg) { |
| - document.getElementById("console").innerHTML += (msg + "\n"); |
| + |
| +jsTestIsAsync = true; |
| + |
| +if (window.internals) { |
| + internals.settings.setUnifiedTextCheckerEnabled(true); |
| + internals.settings.setAsynchronousSpellCheckingEnabled(true); |
| } |
|
groby-ooo-7-16
2014/03/12 16:37:36
again, probably just abort on missing internals. (
|
| function editingTest() { |
| - if (window.testRunner) |
| - testRunner.dumpAsText(); |
| var elem = document.getElementById("test"); |
| var selection = window.getSelection(); |
| selection.setPosition(elem, 6); |
| @@ -34,11 +37,10 @@ function editingTest() { |
| if (window.testRunner) { |
| selection.setPosition(elem, 0); |
| - if (internals.hasSpellingMarker(document, 6, 2)) |
| - log("PASS"); |
| - else |
| - log("FAIL"); |
| - document.getElementById("root").style.display = "none"; |
| + shouldBecomeEqual("internals.hasSpellingMarker(document, 6, 2)", "true", function() { |
| + document.getElementById("root").style.display = "none"; |
| + finishJSTest(); |
| + }); |
| } |
| } |
| @@ -48,15 +50,18 @@ function editingTest() { |
| <title>Editing Test</title> |
| </head> |
| <body> |
| -<div>You should see 'zz a' on the first line below, and 'a' on the second line. 'zz' (and only 'zz') should be marked as misspelled.</div> |
| +<script> |
| +description("Misspellings should be preserved when a line-break command " |
| + + "splits a text node. You should see 'Hello,zz a' on the first line below, " |
| + + "and 'a' on the second line. " |
| + + "This test succeeds when 'zz' (and only 'zz') is marked as misspelled."); |
| +</script> |
| <div contenteditable id="root" class="editing"> |
| <!-- wee need leading "Hello," to preserve the marker even after setPosition() --> |
|
groby-ooo-7-16
2014/03/12 16:37:36
Nit: "we". I know it's not yours, but while you're
grzegorz
2014/03/12 21:33:08
Sure, I'll fix that as well.
|
| <span id="test">Hello,</span> |
| </div> |
| -<pre id="console"></pre> |
| <script> |
| editingTest(); |
| </script> |
| - |
| </body> |
| </html> |