Skip to content

test: regression coverage for favicon mask-icon and error handler fallbacks#2809

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/test-coverage-automation-b7a5
Draft

test: regression coverage for favicon mask-icon and error handler fallbacks#2809
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/test-coverage-automation-b7a5

Conversation

@cursor

@cursor cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue: Test coverage automation (cron)

Description

Adds missing regression tests for two recently merged production changes:

  1. Favicon mask-icon exclusion (Exclude Safari mask-icon links from favicon collection #2772) — The dedicated unit test was removed during review with the assumption integration tests already covered getFaviconList, but no test asserted Safari rel="mask-icon" links are excluded. This PR adds unit tests (jsdom) and an integration test with mask-icon fixtures.

  2. Special-pages error handler fallbacks (Fall back to ErrorEvent.message in special-pages error handlers #2714) — Production handlers in history and new-tab were updated alongside onboarding, but only onboarding received integration coverage for cross-origin ErrorEvent.message fallback, unknown-error fallback, non-Error throws, and primitive rejection reasons. This PR brings history and new-tab to parity.

Risky behavior now covered

  • Safari mask-icon / MASK-ICON links are excluded from favicon collection while real SVG favicons remain
  • Cross-origin script errors report event.message instead of [uncaught] unknown error
  • Falsy rejection reasons (undefined, null, 0) report distinct messages instead of bucketing to a generic unknown

Test files added/updated

  • injected/unit-test/favicon.spec.js (new)
  • injected/integration-test/favicon.spec.js
  • injected/integration-test/test-pages/favicon/svg-test.html + mask-icon SVG fixtures
  • special-pages/pages/history/integration-tests/history.spec.js
  • special-pages/pages/new-tab/integration-tests/new-tab.spec.js

Why these tests materially reduce regression risk

  • Mask-icon mis-collection caused solid black squares in production favicon UI; selector regressions would reintroduce that
  • Error-handler fallbacks fixed a production telemetry spike (m_mac_onboarding_exception-reported); history/new-tab share identical handler logic and would silently regress without page-specific tests

Testing Steps

  • cd injected && npx jasmine unit-test/favicon.spec.js
  • cd injected && npm run test-int -- favicon.spec.js --grep "mask-icon" --reporter list
  • cd special-pages && npm run test-int -- pages/history/integration-tests/history.spec.js --grep "global error listeners" --reporter list
  • cd special-pages && npm run test-int -- pages/new-tab/integration-tests/new-tab.spec.js --grep "global error listeners" --reporter list

Checklist

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged
Open in Web View Automation 

- Unit + integration tests for Safari mask-icon exclusion in getFaviconList
- History and new-tab error listener edge cases matching onboarding coverage
@github-actions

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/cursor/test-coverage-automation-b7a5
Commit c5880b591f
Updated June 29, 2026 at 8:07:28 AM UTC

Static preview entry points

QR codes (mobile preview)
Entry point QR code
Docs QR for docs preview
Static pages QR for static pages preview
Integration pages QR for integration pages preview

Integration commands

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#pr-releases/cursor/test-coverage-automation-b7a5

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/cursor/test-coverage-automation-b7a5")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/cursor/test-coverage-automation-b7a5
git -C submodules/content-scope-scripts checkout origin/pr-releases/cursor/test-coverage-automation-b7a5
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#c5880b591ff25ce22220ada257a11071bbaa12c2

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "c5880b591ff25ce22220ada257a11071bbaa12c2")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/cursor/test-coverage-automation-b7a5
git -C submodules/content-scope-scripts checkout c5880b591ff25ce22220ada257a11071bbaa12c2

@github-actions github-actions Bot added the semver-patch Bug fix / internal — no release needed label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Mon, 29 Jun 2026 08:08:17 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug fix / internal — no release needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant