Commit 881dee81 authored by Alison Maher's avatar Alison Maher Committed by Chromium LUCI CQ

Fix forced-colors-mode-15.html flaky test

forced-colors-mode-15.html was marked as flaky on Mac.
forced-colors-mode-14.html is a similar test for active selection
rather than inactive and is not flaky. Thus, I believe the
flakiness is likely around "testRunner.setWindowFocus(false);".

Similar to CL:1146523, delay calling setWindowFocus to avoid a race with
the initial focus event.

Bug: 1167210
Change-Id: I8e6ae87d8cd9b75ea01d2e9ff012c0ebcb9e32f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2641321
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846378}
parent ad326859
...@@ -5803,7 +5803,6 @@ crbug.com/1147859 external/wpt/css/css-pseudo/highlight-painting-order.html [ Fa ...@@ -5803,7 +5803,6 @@ crbug.com/1147859 external/wpt/css/css-pseudo/highlight-painting-order.html [ Fa
crbug.com/1060837 virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/dedicated-worker.https.html [ Timeout ] crbug.com/1060837 virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/dedicated-worker.https.html [ Timeout ]
# Sheriff 2021-01-15 # Sheriff 2021-01-15
crbug.com/1167210 [ Mac ] virtual/forced-high-contrast-colors/fast/css/forced-colors-mode/forced-colors-mode-15.html [ Pass Failure ]
crbug.com/1167222 http/tests/websocket/multiple-connections-throttled.html [ Pass Failure ] crbug.com/1167222 http/tests/websocket/multiple-connections-throttled.html [ Pass Failure ]
crbug.com/1167309 fast/canvas/canvas-createImageBitmap-drawImage.html [ Pass Failure ] crbug.com/1167309 fast/canvas/canvas-createImageBitmap-drawImage.html [ Pass Failure ]
......
...@@ -30,13 +30,22 @@ ...@@ -30,13 +30,22 @@
</body> </body>
<script> <script>
var node1 = document.getElementsByClassName('select')[0].firstChild; function runTest() {
var node2 = document.getElementsByClassName('select')[1].firstChild; var node1 = document.getElementsByClassName('select')[0].firstChild;
var range = document.createRange(); var node2 = document.getElementsByClassName('select')[1].firstChild;
range.setStart(node1, 0); var range = document.createRange();
range.setEnd(node2, node2.length); range.setStart(node1, 0);
window.getSelection().addRange(range); range.setEnd(node2, node2.length);
window.getSelection().addRange(range);
if (window.testRunner) {
testRunner.setWindowFocus(false);
setTimeout(function() { testRunner.notifyDone(); }, 0);
}
}
if (window.testRunner) if (window.testRunner) {
testRunner.setWindowFocus(false); testRunner.waitUntilDone();
// Add some delay to avoid the initial focus event.
setTimeout(runTest, 100);
}
</script> </script>
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