tor-browser

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

commit 83ba6a04f970eaa380e76291e92ccf7384fd1c6d
parent 41f47bef3f9a28417c7f208addbfe9f2ff564727
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Wed, 26 Nov 2025 23:06:56 +0000

Bug 1997687 - remove our webcompat intervention for sakti.kemenkeu.go.id; r=ksenia,webcompat-reviewers

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 18------------------
Dbrowser/extensions/webcompat/injections/js/bug1997687-sakti.kemenkeu.go.id-ZoneAwarePromise-fix.js | 47-----------------------------------------------
Mbrowser/extensions/webcompat/manifest.json | 2+-
Mtesting/webcompat/interventions/tests/test_1997687_sakti_kemenkeu_go_id.py | 13+++----------
4 files changed, 4 insertions(+), 76 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -6090,24 +6090,6 @@ } ] }, - "1997687": { - "label": "sakti.kemenkeu.go.id", - "bugs": { - "1997687": { - "issue": "page-fails-to-load", - "matches": ["*://sakti.kemenkeu.go.id/*"] - } - }, - "interventions": [ - { - "platforms": ["all"], - "content_scripts": { - "all_frames": true, - "js": ["bug1997687-sakti.kemenkeu.go.id-ZoneAwarePromise-fix.js"] - } - } - ] - }, "1997575": { "label": "perplexity.ai", "bugs": { diff --git a/browser/extensions/webcompat/injections/js/bug1997687-sakti.kemenkeu.go.id-ZoneAwarePromise-fix.js b/browser/extensions/webcompat/injections/js/bug1997687-sakti.kemenkeu.go.id-ZoneAwarePromise-fix.js @@ -1,47 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -/** - * sakti.kemenkeu.go.id - page never loads - * - * The page has a race condition while loading where it redefines window.Promise - * before Zone.js loads, triggering a ZoneAwarePromise exception while loading. - * We can prevent this exception from being thrown so the page loads. - */ - -/* globals cloneInto, exportFunction */ - -console.info( - "Zone.assertZonePatched has been overridden for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1997687 for details." -); - -let Zone; -const no_op = exportFunction(() => {}, window); - -const proxyConfig = cloneInto( - { - get(_, prop) { - if (prop === "assertZonePatched") { - return no_op; - } - return window.wrappedJSObject.Reflect.get(...arguments); - }, - }, - window, - { cloneFunctions: true } -); - -Object.defineProperty(window.wrappedJSObject, "Zone", { - configurable: true, - - get: exportFunction(function () { - return Zone; - }, window), - - set: exportFunction(function (value = {}) { - Zone = new window.wrappedJSObject.Proxy(value, proxyConfig); - }, window), -}); diff --git a/browser/extensions/webcompat/manifest.json b/browser/extensions/webcompat/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Web Compatibility Interventions", "description": "Urgent post-release fixes for web compatibility.", - "version": "147.8.0", + "version": "147.9.0", "browser_specific_settings": { "gecko": { "id": "webcompat@mozilla.org", diff --git a/testing/webcompat/interventions/tests/test_1997687_sakti_kemenkeu_go_id.py b/testing/webcompat/interventions/tests/test_1997687_sakti_kemenkeu_go_id.py @@ -2,17 +2,10 @@ import pytest URL = "https://sakti.kemenkeu.go.id/" SUPPORTED_CSS = "input[name=username]" -ERROR_MSG = "Zone.js has detected that ZoneAwarePromise" - - -@pytest.mark.asyncio -@pytest.mark.with_interventions -async def test_enabled(client): - await client.navigate(URL, wait="none", timeout=30) - assert client.await_css(SUPPORTED_CSS, is_displayed=True) @pytest.mark.asyncio @pytest.mark.without_interventions -async def test_disabled(client): - await client.navigate(URL, await_console_message=ERROR_MSG) +async def test_regression(client): + await client.navigate(URL, wait="none") + assert client.await_css(SUPPORTED_CSS, is_displayed=True, timeout=45)