Skip to content

Commit

Permalink
[COOP] access reporting: fix flakes reporting.html
Browse files Browse the repository at this point in the history
The WPT testharness.js is defining:
```
WindowTestEnvironment.prototype._forEach_windows = function(callback) {
// Iterate over the windows [self ... top, opener]. The callback is
// passed two objects, the first one is the window object itself, the
// second one is a boolean indicating whether or not it's on the same
// origin as the (...)
```

This causes some postMessage to be sent cross-window. They are reported
and causes failures. For instance in reporting-observer.html test.

This patch removes testharness.js from executor.html
This fixed the issue for reporting-observer.html

More generally, we shouldn't check access in between two windows, when
one of them is using testharness.js

Bug:1090273
Change-Id: I261b9bfece935e3613c250a3a9402a1c8a6ff14e
  • Loading branch information
ArthurSonzogni authored and chromium-wpt-export-bot committed Oct 6, 2020
1 parent 16c99fc commit 89de933
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const send = function(uuid, message) {

const receive = async function(uuid, maybe_timeout) {
const timeout = maybe_timeout || Infinity;
const retry_delay = 100;
for(let i = 0; i * retry_delay < timeout; ++i) {
let start = performance.now();
while(performance.now() - start < timeout) {
let response = await fetch(dispatcher_url + `?uuid=${uuid}`);
let data = await response.text();
if (data != 'not ready')
return data;
await new Promise(r => step_timeout(r, retry_delay));
await new Promise(r => setTimeout(r, 100)); // Save resources.
}
return "timeout";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<script src=/resources/testharness.js></script>
<script src="./dispatcher.js"></script>
<script src="./try-access.js"></script>
<script>
Expand Down
1 change: 1 addition & 0 deletions lint.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ SET TIMEOUT: html/cross-origin-embedder-policy/resources/navigate-none.sub.html
SET TIMEOUT: html/cross-origin-embedder-policy/resources/navigate-require-corp.sub.html
SET TIMEOUT: html/cross-origin-embedder-policy/resources/navigate-require-corp-same-site.sub.html
SET TIMEOUT: html/cross-origin-embedder-policy/resources/reporting-worker.js
SET TIMEOUT: html/cross-origin-opener-policy/reporting/resources/dispatcher.js
SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html
SET TIMEOUT: html/webappapis/timers/*
SET TIMEOUT: orientation-event/resources/orientation-event-helpers.js
Expand Down

0 comments on commit 89de933

Please sign in to comment.