Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/scrollbar-tickmarks-styled-after-onload.html

Issue 2450793002: Call invalidatePaintForTickmarks() in Internals::addTextMatchMarker() (Closed)
Patch Set: TestExpectations Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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">&nbsp;</span>

Powered by Google App Engine
This is Rietveld 408576698