Commit f373188e authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

service worker: Fix WPT test fetch-frame-resource.https.html

There were two issues:
* The contentWindow access was throwing an exception because Chrome's
error pages are considered cross-origin.
* The test uses a setTimeout of 10 sec since Mozilla had flaky failures at 5
sec. This issue is still unresolved, see github.com/w3c/ServiceWorker/issues/1194
However, somehow the test seems to pass on local Release despite taking over
6 seconds, so I'm leaving it out of SlowTests for now.

Bug: 758892
Change-Id: I4ff501bcc679db6e7d6ddd7d70adfd33e79bd718
Reviewed-on: https://chromium-review.googlesource.com/664460
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501575}
parent d0d96f0f
......@@ -2411,11 +2411,6 @@ crbug.com/508728 external/wpt/workers/Worker_cross_origin_security_err.htm [ Tim
# This test needs to be updated: fails because it expects showModalDialog and some other APIs.
crbug.com/508728 external/wpt/html/browsers/the-window-object/security-window/window-security.html [ Failure ]
crbug.com/602693 external/wpt/service-workers/service-worker/fetch-frame-resource.https.html [ Timeout ]
crbug.com/602693 virtual/service-worker-script-streaming/external/wpt/service-workers/service-worker/fetch-frame-resource.https.html [ Timeout ]
crbug.com/602693 virtual/mojo-blobs/external/wpt/service-workers/service-worker/fetch-frame-resource.https.html [ Timeout ]
crbug.com/602693 virtual/outofblink-cors/external/wpt/service-workers/service-worker/fetch-frame-resource.https.html [ Timeout ]
# This test requires a special browser flag and seems not suitable for a wpt test, see bug.
crbug.com/691944 external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
crbug.com/691944 virtual/service-worker-script-streaming/external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
......
......@@ -50,7 +50,12 @@ function getLoadedObject(win, contentFunc, closeFunc) {
win.onload = function() {
clearTimeout(timeout);
var content = contentFunc(win);
let content = '';
try {
content = contentFunc(win);
} catch(e) {
// use default empty string for cross-domain window (see above)
}
done(content);
};
});
......
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