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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html

Issue 2755643004: [ServiceWorker] Introduce the new security restriction of redirected response. (Closed)
Patch Set: change comment Created 3 years, 9 months 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html
index 4cefad3a74b25982d672137a38bd571a249e2b1d..18bfa61e89f924355ecf3a821a4da49c1226eb03 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https.html
@@ -34,10 +34,17 @@ function iframe_test(url, timeout_enabled) {
frame.onload = function() {
if (timeout_enabled)
clearTimeout(timer);
- if (frame.contentDocument.body.textContent == 'Hello world\n')
- resolve();
- else
- reject(new Error('content mismatch'));
+ try {
+ if (frame.contentDocument.body.textContent == 'Hello world\n')
+ resolve();
+ else
+ reject(new Error('content mismatch'));
+ } catch (e) {
+ // Chrome treats iframes that failed to load due to a network error as
+ // having a different origin, so accessing contentDocument throws an
+ // error. Other browsers might have different behavior.
+ reject(new Error(e));
+ }
frame.remove();
};
document.body.appendChild(frame);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-redirect.https-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698