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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html

Issue 2092953003: Fix http-to-https-redirect-and-register.html for --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/FlagExpectations/site-per-process ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html
index cce684a42ae2d8272075200fdc8c104d1721f129..af079056f8624423bc77efa1cd1ac959510e13e6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/http-to-https-redirect-and-register.html
@@ -13,18 +13,14 @@
function redirect_and_register(target_url) {
var redirect_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] +
'/serviceworker/resources/redirect.php?Redirect=';
- var frame;
-
- return with_iframe(redirect_url + encodeURIComponent(target_url))
- .then(f => {
- frame = f;
- return new Promise(resolve => {
- window.addEventListener('message', e => {resolve(e.data);});
- });
- })
- .then(result => {
- frame.remove();
- return result;
+ var message_promise = new Promise(resolve => {
+ window.addEventListener('message', e => resolve(e.data));
+ });
+ var iframe_promise = with_iframe(redirect_url + encodeURIComponent(target_url));
+ return Promise.all([message_promise, iframe_promise])
+ .then(results => {
+ results[1].remove();
+ return results[0];
});
}
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/site-per-process ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698