Commit Graph
181 Commits
Author SHA1 Message Date
Manuel Bucher 903c07672b Bug 2008062 - Fix context menu on view-source on error pages r=nchevobbe
initViewSourceItems() checked browser.currentURI to decide whether to show
the goToLine/wrapLongLines/highlightSyntax items. For error pages,
browser.currentURI retains the originally-requested URL (e.g.
view-source:https://expired.example.com/), so the check incorrectly
returned true even though the tab was displaying about:certerror.

Fix by checking browsingContext.currentWindowGlobal.documentURI instead,
which reflects the document actually loaded in the window rather than the
visible address bar URL.

Differential Revision: https://phabricator.services.mozilla.com/D296372
2026-05-04 12:07:30 +00:00
Jonathan Moss 1e4695f228 Bug 2019745 - Add Win11 25H2 (11.26200) skip annotations to TOML manifests r=webcompat-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,devtools-reviewers,places-reviewers,urlbar-reviewers,profiles-reviewers,dom-worker-reviewers,twisniewski,hneiva,aryx,scunnane,asuth,dimi,mossop,padenot
Differential Revision: https://phabricator.services.mozilla.com/D285126
2026-02-27 10:51:18 +00:00
Mark Banner 74f1513112 Bug 2017864 - Stop using Preferences.sys.mjs in simple cases. r=firefox-desktop-core-reviewers ,credential-management-reviewers,search-reviewers,devtools-reviewers,sessionstore-reviewers,migration-reviewers,chutten,bvandersloot,mconley,scunnane,dimi,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D284059
2026-02-24 09:37:10 +00:00
Tom Marble 3b3efde701 Bug 2009254 - Test manifest cleanup January 2026 r=ahal,necko-reviewers,webcompat-reviewers,credential-management-reviewers,devtools-reviewers,tabbrowser-reviewers,profiler-reviewers,dom-storage-reviewers,toolkit-telemetry-reviewers,layout-reviewers,dom-worker-reviewers,whimboo,hjones,sthompson,twisniewski,valentin,asuth,dholbert,dimi,ochameau
Updates Test Manifests to new conventions for the upcoming
linter patch in Bug 2004444. These conventions are documented in
   docs/code-quality/lint/linters/test-manifest-toml.rst
which will get published to
  https://firefox-source-docs.mozilla.org/code-quality/lint/linters/test-manifest-toml.html

Summary of changes:
- The order of comparisons/variables is now important in conditional
  expressions. Certain expressions have been edited to reflect this
  order (with no semantic changes).
- The variables which are tested for equality as well as all the flags
  are constrained to a known set (i.e. typos in variable/flag names
  will be caught by the linter)
- Older platforms which are no longer present in the CI infrastructure
  have been deprecated, for example:
   * ``"os == 'linux' && os_version == '18.04'
- Combinations of platforms and flags which are no longer present in
  the CI infrastructure will be removed, for example:
   * ``"os == 'linux' && os_version == '22.04' && asan"``
   * ``"os == 'linux' && os_version == '22.04' && tsan"``
   * ``"os == 'win' && tsan``
- Old platform combination flags and isLinux style flags have been
  deprecated in favor of explicitly checking os, os_version, etc.

NOTE: code changes in this patch are simply to maintain self tests
and do not reflect the updated linter changes.

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D278535
2026-01-21 13:53:31 +00:00
Emilio Cobos Álvarez a71fc67673 Bug 2008041 - Make XUL disabled / checked attributes html-style boolean attributes. r=desktop-theme-reviewers,tabbrowser-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,layout-reviewers,sthompson,nsharpley,robwu,nchevobbe,jwatt,dimi,dao
Much like bug 1979014 did for other attributes (these ones were a bit
harder because there's also native code that looked at them).

Make disabled imply :disabled, and checked imply :checked, which
simplifies the theming code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D277665
2026-01-06 22:02:03 +00:00
Mark Banner c2693fb168 Bug 2004680 - Fix ESLint rule jsdoc/check-tag-names issues in toolkit. r=firefox-desktop-core-reviewers ,extension-reviewers,credential-management-reviewers,toolkit-telemetry-reviewers,Gijs,mkennedy,dimi,robwu
Differential Revision: https://phabricator.services.mozilla.com/D275756
2025-12-22 12:41:33 +00:00
Joel Maher b032659478 Bug 2001881 - fix macosx 15.30 arch to be aarch64, not x86_64 and green up high frequency mac failures. r=intermittent-reviewers,aryx
Differential Revision: https://phabricator.services.mozilla.com/D273743
2025-11-24 14:52:42 +00:00
Tom Marble 5ce09d7446 Bug 1995583 - test manifest cleanup for idiomatic usage r=jmaher,necko-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,sessionstore-reviewers,tabbrowser-reviewers,translations-reviewers,omc-reviewers,browser-installer-reviewers,twisniewski,masayuki,dom-core,smaug,nalexander,emcminn,sthompson,alwu,ai-ondevice-reviewers,valentin
For TOML manifests:

1. Change processor -> arch
2. Use arch instead of bits bits == '64' =>
   aarch64 (default on mac 15.30) or x86_64 bits == '32' => x86
3. Replace android_version with corresponding os_version
4. Remove conditions with linux os_version=="18.04"
   (unless they contain verify or verify-standalone)
5. Remove conditions with mac os_version=='11.20',
   (unless they contain verify or verify-standalone)
6. Remove conditions with win os_version=='11.2009' or win11_2009,
   (unless they contain verify or verify-standalone)
7. Linux conditions should have os_version, arch and display
   (simple "os == 'linux'" will get expanded to these two)
   "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland'"
   "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'"
8. Mac conditions should have os_version and arch
   (simple "os == 'mac'" will get expanded to these three)
   "os == 'mac' && os_version == '10.15' && arch == 'x86_64'",
   "os == 'mac' && os_version == '14.70' && arch == 'x86_64'",
   "os == 'mac' && os_version == '15.30' && arch == 'aarch64'",
9. Replace apple_catalina with
   os == 'mac' && os_version == '10.15' && arch == 'x86_64'
10. Replace apple_silicon with
   os == 'mac' && os_version = '15.30' && arch == 'aarch64'
11. Replace win10_2009 with
   os == 'win' && os_version = '10.2009' && arch == 'x86_64'
12. Replace "!debug" with three conditions "asan", "opt", or "tsan"
13. Replace literal boolean comparison with variables
    (e.g. "debug == false" => "!debug)

Resolves 2000285

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D272815
2025-11-22 00:30:39 +00:00
Narcis Beleuzu d2ef753082 Bug 1978801 - Prevent flaky test in browser_gotoline.js due to context menu. 2025-07-28 10:27:21 +00:00
Emilio Cobos Álvarez 0d3bb9b768 Bug 1978801 - Scroll to selection anchor, not focus, for view-source go to line. r=dom-core,smaug
The flags argument was effectively 0 (true used to mean isSynchronous
until bug 605138, but since then there was no flag).

Keep the selection scroll async since it has been async since that bug,
and add some tests.

Differential Revision: https://phabricator.services.mozilla.com/D258398
2025-07-28 08:45:55 +00:00
Sebastian Hengst 97b3ab6353 Bug 1973129 - tests disabled on 2025-06-20. r=intermittent-reviewers,webcompat-reviewers,devtools-reviewers,tabbrowser-reviewers,backup-reviewers,twisniewski,jmaher,sidebar-reviewers,jdescottes,kpatenio,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D254457
2025-07-04 00:05:05 +00:00
agoloman 40fa0b1d8f Revert "Bug 1973129 - tests disabled on 2025-06-20. r=intermittent-reviewers,webcompat-reviewers,devtools-reviewers,tabbrowser-reviewers,backup-reviewers,twisniewski,jmaher,sidebar-reviewers,jdescottes,kpatenio,sthompson" for causing xpcshell failures.
This reverts commit 5c205add81.
2025-07-03 13:04:05 +00:00
Sebastian Hengst 5c205add81 Bug 1973129 - tests disabled on 2025-06-20. r=intermittent-reviewers,webcompat-reviewers,devtools-reviewers,tabbrowser-reviewers,backup-reviewers,twisniewski,jmaher,sidebar-reviewers,jdescottes,kpatenio,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D254457
2025-07-03 12:21:59 +00:00
Florian Quèze c6a303f26f Bug 1970688 - Set the test.wait300msAfterTabSwitch pref in tests failing on macosx1500-aarch64-shippable, r=jmaher,necko-reviewers,webcompat-reviewers,settings-reviewers,search-reviewers,anti-tracking-reviewers,tabbrowser-reviewers,places-reviewers,omc-reviewers,home-newtab-reviewers,urlbar-reviewers,twisniewski,emcminn,nsharpley,kershaw,bvandersloot,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D252713
2025-06-11 15:47:35 +00:00
Florian Quèze 9786bbf2ab Bug 1702637 - set the test.wait300msAfterTabSwitch pref to true in tests that failed on try, r=jmaher,necko-reviewers,webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,home-newtab-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,alwu,janv,twisniewski,scunnane,kershaw,robwu,dimi,mconley,nsharpley,jteow,mossop.
Differential Revision: https://phabricator.services.mozilla.com/D251051
2025-06-03 12:04:37 +00:00
Joel Maher 397e8ec3f4 Bug 1961608 - Green up macosx 15.30. r=aryx,necko-reviewers,extension-reviewers,media-playback-reviewers,credential-management-reviewers,sync-reviewers,anti-tracking-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,profiles-reviewers,pdahiya,alwu,jhirsch,mtigley,skhamis,timhuang,valentin,robwu,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D246100
2025-04-22 18:12:28 +00:00
Emilio Cobos Álvarez 1e2032c268 Bug 1927404 - Make each line in view-source a <span> rather than a <pre>. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D227061
2024-11-05 09:54:42 +00:00
Iulian Moraru 56fb832d6b Backed out 4 changesets (bug 1927404) - for causing dt failures on browser_command_line_urls.js.
Backed out changeset 57e3626aa048 (bug 1927404)
Backed out changeset 0ee04fe4a1bc (bug 1927404)
Backed out changeset 1e68482cff47 (bug 1927404)
Backed out changeset 8b5961223d94 (bug 1927404)
2024-11-05 01:44:00 +02:00
Emilio Cobos Álvarez b8809a58d3 Bug 1927404 - Fix browser_contextmenu.js.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2024-11-04 15:15:25 +01:00
Emilio Cobos Álvarez 4209a4c117 Bug 1927404 - Fix browser_gotoline.js.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2024-11-04 13:45:33 +01:00
Emilio Cobos Álvarez ec415f6582 Bug 1927404 - Make each line in view-source a <span> rather than a <pre>. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D227061
2024-11-04 12:18:31 +00:00
Yi Xiong Wong 69496efae6 Bug 1880914 - Move view source functions. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D206198
2024-04-08 17:21:01 +00:00
Dave Townsend b4e353c52a Bug 1864896: Autofix unused function arguments (toolkit). r=mconley,translations-reviewers,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D203002
2024-03-19 14:59:21 +00:00
Mark Banner e2e80f646d Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in system modules. r=Gijs,perftest-reviewers,necko-reviewers,extension-reviewers,application-update-reviewers,fxview-reviewers,sync-reviewers,sessionstore-reviewers,reusable-components-reviewers,rpl,jesup,hjones,kshampur,skhamis,nalexander,sclements
Differential Revision: https://phabricator.services.mozilla.com/D197489
2024-01-05 09:22:34 +00:00
Sylvestre Ledru 2e0e132821 Bug 1856530 - run file-whitespace on toml files r=linter-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D189896
2023-10-03 09:22:18 +00:00
Joel Maher d879cd83c3 Bug 1853245 - Migrate .ini to .toml browser-chrome (batch 7.75). r=aryx,extension-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,profiler-reviewers,nalexander,canaltinova,Standard8,robwu,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D189382
2023-09-29 20:40:10 +00:00
Narcis Beleuzu 449838940e Backed out changeset 8265e6272d20 (bug 1853245) for breaking the Decision Task. CLOSED TREE 2023-09-29 19:45:01 +03:00
Joel Maher 460d6f3926 Bug 1853245 - Migrate .ini to .toml browser-chrome (batch 7.75). r=aryx,extension-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,profiler-reviewers,nalexander,canaltinova,Standard8,robwu,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D189382
2023-09-29 16:27:29 +00:00
Tom Marble d70780c99c Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Gijs Kruitbosch da94fcda4b Bug 1795255 - autofix duplicate imports in tests under docshell, dom, layout, security, testing, toolkit and widget, r=Standard8,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167715
2023-01-31 11:48:42 +00:00
Neil Deakin 85eaed3782 Bug 1808918, use Untitled as the default filename when saving a file rather than index, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167028
2023-01-23 14:53:21 +00:00
Emilio Cobos Álvarez 0f61b77b68 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Cristian Tuns c9c42bc174 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez 9a53f8dea3 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Mark Banner 51ace04b44 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (toolkit/). r=mossop,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161910
2022-11-17 12:00:29 +00:00
Mark Banner 5407bdffa8 Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Mark Banner a49b8ef78f Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mark Banner 1e3410cbdd Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Neil Deakin 520cbd8097 Bug 1772906, switch to use validateFileNameForSaving to verify the filename when opening view source in an external editor, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D148535
2022-06-15 14:33:28 +00:00
Cristian Tuns 58d7d8853d Backed out changeset de9ad4f5b1ea (bug 1772906) for causing mochitest failures in browser_validatefilename.js CLOSED TREE 2022-06-14 13:44:37 -04:00
Neil Deakin 3c48a85602 Bug 1772906, switch to use validateFileNameForSaving to verify the filename when opening view source in an external editor, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D148535
2022-06-14 14:02:57 +00:00
Csoregi Natalia 570d63a928 Backed out changeset 9756645733e9 (bug 1772906) for failures on browser_validatefilename.js. CLOSED TREE 2022-06-10 17:03:42 +03:00
Neil Deakin c47d6b7a68 Bug 1772906, switch to use validateFileNameForSaving to verify the filename when opening view source in an external editor, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D148535
2022-06-10 12:41:15 +00:00
Gijs Kruitbosch edda40141b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay e1d7571cc8 Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch 1214ac636b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Joel Maher 498885f979 Bug 1751264 - adjust tests that should be passing on win10. r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D136525
2022-01-20 21:02:44 +00:00
Kershaw Chang 74a65c68ee Bug 1741425 - Enable more mochitest with socket process, r=ahal,webdriver-reviewers,preferences-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D134485
2022-01-11 09:49:45 +00:00