| Index: third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html b/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0447021fd445cb2364fcbf4c9d728ec9a636e8bd
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
|
| @@ -0,0 +1,48 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<div>
|
| + <div id="outerAuto" dir="auto">
|
| + <div id="textInsertionPoint"></div>
|
| + <div id="affectedByAuto"></div>
|
| + <div id="explicitLTR" dir="ltr">
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + </div>
|
| + </div>
|
| +</div>
|
| +<script>
|
| + description("Style invalidation when inserting RTL text descendant of dir=auto");
|
| +
|
| + shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
|
| +
|
| + document.body.offsetTop; // force style and layout clean.
|
| +
|
| + textInsertionPoint.innerHTML = "؄ل";
|
| +
|
| + if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
|
| +
|
| + shouldBeEqualToString("getComputedStyle(outerAuto).direction", "rtl");
|
| + shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "rtl");
|
| + shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "rtl");
|
| + shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
|
| +
|
| + debug("\nForcing everything back to LTR with dir attribute:\n");
|
| +
|
| + document.body.offsetTop; // force style and layout clean.
|
| +
|
| + textInsertionPoint.dir = "ltr";
|
| +
|
| + if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
|
| +
|
| + shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
|
| + shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
|
| +</script>
|
|
|