| Index: third_party/WebKit/LayoutTests/fast/text/international/cjk-segmentation.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/text/international/cjk-segmentation.html b/third_party/WebKit/LayoutTests/fast/text/international/cjk-segmentation.html
|
| index 6110cbcf5a36c7d55e012c8e6b3c48a517be299d..78b3a60258d22e230263c5e753f38390b8e990c9 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/text/international/cjk-segmentation.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/text/international/cjk-segmentation.html
|
| @@ -27,7 +27,7 @@ function test()
|
| if (window.testRunner)
|
| testRunner.dumpAsText();
|
|
|
| - var range = document.createRange();
|
| + var selection = getSelection();
|
| var divs = document.getElementsByClassName("zh-CN-div");
|
| var pass = true;
|
| for (var j = 0; j < divs.length; ++j) {
|
| @@ -35,10 +35,10 @@ function test()
|
| var length = div.innerText.length;
|
| var title = div.title.split(' ');
|
| for (var i = 0; i < length; ++i) {
|
| - range.setStart(div.firstChild, i);
|
| - range.setEnd(div.firstChild, i);
|
| - range.expand('word');
|
| - var actual = range.toString();
|
| + selection.collapse(div.firstChild, i);
|
| + selection.modify("move","forward","word");
|
| + selection.modify("extend", "backward", "word");
|
| + var actual = selection.getRangeAt(0).toString();
|
| assertEqual(" ", actual, title[i]);
|
| if (actual != title[i])
|
| pass = false;
|
|
|