| 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>
|
|
|