Chromium Code Reviews| Index: LayoutTests/editing/inserting/insert-paragraph-between-vertical-text-with-positioned-root.html |
| diff --git a/LayoutTests/editing/inserting/insert-paragraph-between-vertical-text-with-positioned-root.html b/LayoutTests/editing/inserting/insert-paragraph-between-vertical-text-with-positioned-root.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e42886c0120472d2533d1e9706c8931524e7e774 |
| --- /dev/null |
| +++ b/LayoutTests/editing/inserting/insert-paragraph-between-vertical-text-with-positioned-root.html |
| @@ -0,0 +1,66 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script>jsTestIsAsync = true;</script> |
| +<script src="../../fast/js/resources/js-test-pre.js"></script> |
| +<style> |
| +@font-face { |
| + font-family: 'Ahem'; |
| + src: url(../../resources/Ahem.ttf); |
| +} |
| +.textArea { |
| + position: absolute; left: 0px; top: 200px; |
| + -webkit-writing-mode: vertical-rl; |
| + width: 200px; |
| + height: 300px; |
| + outline-style: none; |
|
ojan
2013/07/15 23:54:12
This isn't needed, right?
arpitab_
2013/08/08 14:22:30
Yes, and I shall remove the same in the next patch
|
| + border: 1px solid black; |
| + font-family: Ahem; |
| + font-size: 12px; |
| + line-height: 1; |
|
ojan
2013/07/15 23:54:12
Are the font-size and line-height needed?
arpitab_
2013/08/08 14:22:30
I was trying to make a platform independent testca
ojan
2013/09/12 23:40:15
Instead of using text in your page, you can use fi
|
| +} |
| +</style> |
| +<script> |
| +description("Testcase for bug http://crbug.com/259352: Repaint issues with vertical text which has absolute (or fixed) position specified for it.\nTwo lines should be visible within the box. To manually verify the issue, try to insert a line break in between the vertically aligned text. The line should break as expected."); |
| + |
| +function start() { |
| + var testElement = document.getElementById('test'); |
| + testElement.focus(); |
| + |
| + window.setTimeout(function() { |
|
ojan
2013/07/15 23:54:12
Why is this setTimeout needed?
arpitab_
2013/08/08 14:22:30
This particular setTimeout can be removed.
|
| + var selection = window.getSelection(); |
| + selection.collapse(testElement, 1); |
| + selection.modify("move", "backward", "character"); |
| + document.execCommand("InsertParagraph"); |
| + |
| + window.setTimeout(logRepaints, 200); |
|
ojan
2013/07/15 23:54:12
I think you can avoid this setTimeout by calling d
arpitab_
2013/08/08 14:22:30
This setTimeout is required since we need some tim
yosin_UTC9
2013/09/10 02:20:15
Can we call logRepaints until test condition satis
ojan
2013/09/12 23:40:15
Something like this would be good. Even better wou
|
| + }, 0); |
| + |
| + if (!window.testRunner || !window.internals) |
| + return; |
| + |
| + window.internals.startTrackingRepaints(document); |
| + window.testRunner.display(); |
| +} |
| +function logRepaints() { |
| + if (!window.internals) |
| + return; |
| + |
| + repaintRects = window.internals.repaintRectsAsText(document); |
| + window.internals.stopTrackingRepaints(document); |
| + shouldNotBe("repaintRects.indexOf('177 343')", "-1"); |
| + finishJSTest(); |
| +} |
| +</script> |
| +</head> |
| +<body onload="start()"> |
| +<div class="textArea" contenteditable="true"> |
| +<p> |
| +<span id="test">Some text in vertical mode</span> |
| +</p> |
| +</div> |
| +<div id="description"></div> |
| +<p id="console"></p> |
|
ojan
2013/07/15 23:54:12
The console and description elements are not neede
arpitab_
2013/08/08 14:22:30
I shall remove the same in the next patch.
|
| +<script src="../../fast/js/resources/js-test-post.js"></script> |
| +</body> |
| +</html> |