| Index: LayoutTests/http/tests/navigation/navigate-during-commit.html
|
| diff --git a/LayoutTests/http/tests/navigation/navigate-during-commit.html b/LayoutTests/http/tests/navigation/navigate-during-commit.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8fea992fca205a266d5cc5d75b7ad57b0e225747
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/navigation/navigate-during-commit.html
|
| @@ -0,0 +1,38 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<body>
|
| +<script>
|
| +
|
| +// The test involves navigating so we use a iframe for the navigation to
|
| +// simplify testharness usage in the main page.
|
| +function conduct_test(frame) {
|
| + return new Promise(function(resolve, reject) {
|
| + var IFRAME_SRC = "resources/navigate-during-commit-iframe.html"
|
| + var onload_count = 0;
|
| + var frame = document.createElement('iframe');
|
| + frame.onload = function () {
|
| + if (++onload_count == 2) {
|
| + var success = window[0].location == "about:blank";
|
| + document.body.removeChild(frame);
|
| + if (success)
|
| + resolve();
|
| + else
|
| + reject();
|
| + }
|
| + };
|
| + frame.src = IFRAME_SRC;
|
| + document.body.appendChild(frame);
|
| + });
|
| +}
|
| +
|
| +async_test(function(t) {
|
| + var step = t.step_func.bind(t);
|
| + conduct_test()
|
| + .then(step(function() { t.done(); }),
|
| + step(function() { assert_true(false, "promised rejected"); }))
|
| + .catch(step(function() { assert_true(false, "caught exception"); }));
|
| + }, 'navigate-during-commit');
|
| +
|
| +</script>
|
| +</body>
|
|
|