Index: third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled-after-onload.html |
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled.html b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled-after-onload.html |
similarity index 70% |
copy from third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled.html |
copy to third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled-after-onload.html |
index 298efe0c8a28ed3e0ef591854b3924fa2af43ebd..a76f9edc51942ea4b64225e0ccb3a812d8af8a13 100644 |
--- a/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled.html |
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled-after-onload.html |
@@ -18,20 +18,30 @@ html { |
} |
</style> |
<script> |
+if (window.testRunner) { |
+ testRunner.waitUntilDone(); |
+ testRunner.dumpAsTextWithPixelResults(); |
+} |
+ |
function highlight() |
{ |
var range = document.createRange(); |
var elt = document.getElementById('elt'); |
range.selectNodeContents(elt); |
+ |
+ // Enforce layout to test addTextMatchMarker() after the first layout. |
+ document.body.offsetTop; |
+ |
if (window.internals) { |
window.internals.addTextMatchMarker(range, true); |
} |
- if (window.testRunner) |
- testRunner.dumpAsTextWithPixelResults(); |
+ if (window.testRunner) { |
+ testRunner.notifyDone(); |
+ } |
} |
</script> |
</head> |
-<body onload="highlight();"> |
+<body onload="setTimeout(highlight, 0)"> |
Xianzhu
2016/10/31 15:59:07
Normally we use runAfterLayoutAndPaint(highlight,
hiroshige
2016/11/01 05:48:04
Thanks for suggestion!
I use runAfterLayoutAndPain
Xianzhu
2016/11/01 06:41:22
The crash is expected without your patch because w
|
<div style="height:600px"></div> |
<span id="elt" style="position:absolute; top:300px"> </span> |