tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 104e206a3af8ce5a2ee8213096c5accbc64bb5ed
parent 9bd8a901d87ee0c8fe51ce9af4d32622151c0e76
Author: Andreas Farre <farre@mozilla.com>
Date:   Tue, 14 Oct 2025 11:33:44 +0000

Bug 1984772 - Remove test now that it doesn't crash. r=jjaschke

Differential Revision: https://phabricator.services.mozilla.com/D268507

Diffstat:
Dtesting/web-platform/mozilla/meta/navigation-api/__dir__.ini | 4----
Dtesting/web-platform/mozilla/meta/navigation-api/precommit-handler/precommitHandler-redirect-throws.html.ini | 2--
Dtesting/web-platform/mozilla/tests/navigation-api/precommit-handler/precommitHandler-redirect-throws.html | 96-------------------------------------------------------------------------------
3 files changed, 0 insertions(+), 102 deletions(-)

diff --git a/testing/web-platform/mozilla/meta/navigation-api/__dir__.ini b/testing/web-platform/mozilla/meta/navigation-api/__dir__.ini @@ -1,4 +0,0 @@ -# https://bugzilla.mozilla.org/show_bug.cgi?id=1777171 -prefs: [dom.navigation.webidl.enabled: true] -disabled: - if (not sessionHistoryInParent): https://bugzilla.mozilla.org/show_bug.cgi?id=1777171 diff --git a/testing/web-platform/mozilla/meta/navigation-api/precommit-handler/precommitHandler-redirect-throws.html.ini b/testing/web-platform/mozilla/meta/navigation-api/precommit-handler/precommitHandler-redirect-throws.html.ini @@ -1,2 +0,0 @@ -[precommitHandler-redirect-throws.html] - expected: CRASH diff --git a/testing/web-platform/mozilla/tests/navigation-api/precommit-handler/precommitHandler-redirect-throws.html b/testing/web-platform/mozilla/tests/navigation-api/precommit-handler/precommitHandler-redirect-throws.html @@ -1,96 +0,0 @@ -<!doctype html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<body> -<script type="module"> -export async function ensureWindowLoadEventFired(t) { - return new Promise(resolve => { - const callback = () => t.step_timeout(resolve, 0); - if (document.readyState === 'complete') { - callback(); - } else { - window.onload = callback; - } - }); -} - -promise_test(async t => { - let precommit_controller; - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.navigate("#").finished; - assert_throws_dom("InvalidStateError", () => precommit_controller.redirect("#")); -}, "redirect() after finish"); - - -promise_test(async t => { - let precommit_controller; - navigation.onnavigate = t.step_func(e => { - e.intercept({ - handler: t.step_func(async () => { - assert_throws_dom("InvalidStateError", () => precommit_controller.redirect("#")); - }) - }); - }); - await navigation.navigate("#").finished; -}, "redirect() after commit"); - - -promise_test(async t => { - let i = document.createElement("iframe"); - i.src = "about:blank"; - document.body.appendChild(i); - i.contentWindow.navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - i.contentWindow.navigation.navigate("#"); -}, "redirect() in detached iframe"); - -promise_test(async t => { - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.navigate("#").finished; -}, "redirect() to invalid url"); - -promise_test(async t => { - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.navigate("#").finished; -}, "redirect() to cross-origin url"); - - -promise_test(async t => { - // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()` - const buffer = new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer; - - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.navigate("#").finished; -}, "redirect() with an unserializable state object"); - -promise_test(async t => { - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.reload().finished; -}, "redirect() reload"); - -promise_test(async t => { - // Wait for after the load event so that the navigation doesn't get converted - // into a replace navigation. - await ensureWindowLoadEventFired(t); - - await navigation.navigate("#forward").finished; - - navigation.onnavigate = t.step_func(e => { - e.intercept({}); - }); - await navigation.back().finished; -}, "redirect() traverse"); - -</script> -</body>