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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
index f330bfdc8340d98c357f7be8e42f3fc568767460..b415ac2a39c19650087d132eb5aa7fa540071934 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
@@ -118,7 +118,10 @@ const testCases = [
}
];
-for (const testCase of testCases) {
+var testCaseIndex = 0;
+function runNextTest() {
+ const testCase = testCases[testCaseIndex];
+
const labelAboutReturnValue = testCase.setReturnValue === undefined ? "" :
`; setting returnValue to ${testCase.setReturnValue}`;
@@ -126,10 +129,14 @@ for (const testCase of testCases) {
const iframe = document.createElement("iframe");
iframe.onload = t.step_func(() => {
iframe.contentWindow.runTest(t, testCase);
+ if (++testCaseIndex < testCases.length)
+ runNextTest();
});
iframe.src = "beforeunload-canceling-1.html";
document.body.appendChild(iframe);
}, `Returning ${testCase.valueToReturn} with a real iframe unloading${labelAboutReturnValue}`);
}
+
+runNextTest();
</script>

Powered by Google App Engine
This is Rietveld 408576698