Commit 1f3a60fe authored by Alex Clarke's avatar Alex Clarke Committed by Commit Bot

Make fast/replaced/replaced-breaking.html work with sceduler change

We want to prioritize loading and compositing tasks until first contentful
paint. That wac casusing fast/replaced/replaced-breaking.html to flakily
have image diffs because the test harness is taking screen shots before
the plugins have finished loading. This patch makes the test wait
until they have both loaded before finishing which fixes the flakes we'd
have when turning on the new scheduler policy.

Bug: 971191
Change-Id: I08f34cfefa5ffdec14741b7ab1cf8d83fc3e33b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795789Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695244}
parent 2da5c1e2
...@@ -4,7 +4,30 @@ ...@@ -4,7 +4,30 @@
embed, iframe, img { border: 1px solid black; width: 25px; height: 25px; } embed, iframe, img { border: 1px solid black; width: 25px; height: 25px; }
</style> </style>
</head> </head>
<body> <script>
if (window.testRunner) {
// Due to scheduler changes the "Blink Test Plugin: initializing" console log is flaky.
testRunner.setDumpConsoleMessages(false);
testRunner.waitUntilDone();
}
// We need to wait for both plugins to load before finishing to ensure a stable screenshot.
function waitForEmbedsToLoad() {
var pending = 2;
function waitForLoad(object) {
object.addEventListener("message", function(message) {
if (message.data == 'loaded' && --pending == 0)
testRunner.notifyDone();
});
}
waitForLoad(document.getElementById("embed1"));
waitForLoad(document.getElementById("embed2"));
}
</script>
<body onload="waitForEmbedsToLoad();">
<div style="width: 30px; border: 1px solid red;"> <div style="width: 30px; border: 1px solid red;">
<input type="text"><input type="text"> <input type="text"><input type="text">
<img><img> <img><img>
...@@ -15,7 +38,7 @@ ...@@ -15,7 +38,7 @@
<input type="checkbox"><input type="checkbox"> <input type="checkbox"><input type="checkbox">
<input type="radio"><input type="radio"> <input type="radio"><input type="radio">
<iframe></iframe><iframe></iframe> <iframe></iframe><iframe></iframe>
<embed type="application/x-blink-test-plugin"></embed><embed type="application/x-blink-test-plugin"></embed> <embed id="embed1" type="application/x-blink-test-plugin"></embed><embed id="embed2" type="application/x-blink-test-plugin"></embed>
</div> </div>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment