fix(extension): detect browser error pages earlier
Testing / test (push) Successful in 26s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 27s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 20s
Package Extension / package-extension (push) Successful in 28s
Build & Publish Package / publish (push) Successful in 31s
Testing / test (push) Successful in 26s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 27s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 20s
Package Extension / package-extension (push) Successful in 28s
Build & Publish Package / publish (push) Successful in 31s
- Add shared browser error URL detection for Chrome, Edge, Brave, and Firefox-style about:error pages. - Short-circuit read-only DOM and HTML commands with safe fallbacks when tabs are already on browser error pages. - Fail navigation waits, DOM waits, polling, and URL watches with clearer error-page messages. - Bump package and extension version to 0.9.8 and extend regression coverage for cross-browser error-page handling.
This commit is contained in:
@@ -5,8 +5,13 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
def test_extension_retries_error_page_script_injection_before_failing():
|
||||
core = (ROOT / "extension" / "src" / "core.ts").read_text()
|
||||
|
||||
assert "isBrowserErrorUrl" in core
|
||||
assert "isErrorPageScriptError" in core
|
||||
assert "chrome-error://chromewebdata" in core
|
||||
assert "chrome-error://" in core
|
||||
assert "edge-error://" in core
|
||||
assert "brave-error://" in core
|
||||
assert "about:neterror" in core
|
||||
assert "about:certerror" in core
|
||||
assert "isTransientScriptError(e)" in core
|
||||
|
||||
def test_read_only_dom_commands_have_error_page_fallbacks():
|
||||
@@ -17,12 +22,16 @@ def test_read_only_dom_commands_have_error_page_fallbacks():
|
||||
assert "return false;" in dom
|
||||
assert 'case "domQuery":' in dom
|
||||
assert 'case "extractText":' in dom
|
||||
assert "isBrowserErrorUrl(tabUrl)" in dom
|
||||
assert "isErrorPageScriptError(e)" in dom
|
||||
|
||||
def test_tabs_watch_url_reports_last_seen_url_on_timeout():
|
||||
def test_navigation_and_tabs_report_browser_error_pages():
|
||||
tabs = (ROOT / "extension" / "src" / "commands" / "tabs.ts").read_text()
|
||||
navigation = (ROOT / "extension" / "src" / "commands" / "navigation.ts").read_text()
|
||||
|
||||
assert "lastUrl" in tabs
|
||||
assert "lastStatus" in tabs
|
||||
assert "showing an error page" in tabs
|
||||
assert "last URL:" in tabs
|
||||
assert "isBrowserErrorUrl" in navigation
|
||||
assert "showing an error page while waiting for load" in navigation
|
||||
|
||||
Reference in New Issue
Block a user