Commit graph

20 commits

Author SHA1 Message Date
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Bob Silverberg
cb58187ee1 Bug 1437335 - Manual proxy port configuration should disable when its option is not selected, r=jaws
This is a regression from bug 1429593. The code that was added to enable/disable controls on the page
depending on whether an extension is in control was being run when the page opened, which overrode
the code which disables specific controls based on the current proxy setting. All that is needed is
to call that code (which is in gConnectionsDialog.proxyTypeChanged()) if an extension is not in control
after the new code that was added. This patch fixes that issue, and includes a test verifying that
the manual controls are not enabled when the screen first opens.

MozReview-Commit-ID: 7jpp1wewZ2k

--HG--
extra : rebase_source : 3bd13747ba9ba95fe50bce83a583af387352f8ef
2018-02-27 15:17:28 -05:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Arjun Krishna Babu
0f9afb26a6 Bug 1428844 - Use BrowserTestUtils.waitForEvent in preferences tests; r=johannh
In preferences tests, all calls to waitForEvent function defined in
browser/components/preferences/in-content/tests/head.js has been replaced with
calls to BrowserTestUtils.waitForEvent.

MozReview-Commit-ID: IrtGJFtWPPj

--HG--
extra : rebase_source : 4098e79c532e57acc2d6e48ae496be1d0e6a9f9f
2018-01-18 10:20:04 -07:00
Coroiu Cristina
fe07e42eba Backed out 1 changesets (bug 1428844) on request from johannh
Backed out changeset 44239d2b430a (bug 1428844)
2018-01-23 14:02:25 +02:00
Arjun Krishna Babu
8b570d5a30 Bug 1428844 - Use BrowserTestUtils.waitForEvent in preferences tests; r=johannh
In preferences tests, all calls to waitForEvent function defined in
browser/components/preferences/in-content/tests/head.js has been replaced with
calls to BrowserTestUtils.waitForEvent.

Since we are no longer using the waitForEvent function defined in the
aforementioned head.js file, that definition has been removed.

MozReview-Commit-ID: IrtGJFtWPPj

--HG--
extra : rebase_source : 9d2fbb6194fa9127a9d559d98371dd60503c5e9e
2018-01-18 10:20:04 -07:00
Myk Melez
c3da3e7642 Bug 1379338 - scriptify preferences XBL; r=jaws
MozReview-Commit-ID: Egyzs2KxhzH
2018-01-04 21:37:47 -08:00
Sebastian Hengst
bc8e5f198e Backed out 2 changesets (bug 1379338) for failing Marionette headless' test_anonymous_content.py TestAnonymousNodes.test_find_anonymous_children. r=backout on a CLOSED TREE
Backed out changeset 232c97d7c2ea (bug 1379338)
Backed out changeset a76ff10b9bff (bug 1379338)
2018-01-04 20:15:18 +02:00
Myk Melez
f5bb45814e Bug 1379338 - scriptify preferences XBL; r=jaws
MozReview-Commit-ID: 7NRHlSsdOtf
2018-01-04 07:34:15 -08:00
Timothy Guan-tin Chien
de00d490e0 Bug 1363850 - Part II, Move old about:preferences from in-content-old/ to in-content/, r=jaws,mconley
MozReview-Commit-ID: DPLJT1adO1c

--HG--
rename : browser/components/preferences/in-content-old/content.js => browser/components/preferences/in-content/content.js
rename : browser/components/preferences/in-content-old/content.xul => browser/components/preferences/in-content/content.xul
rename : browser/components/preferences/in-content-old/search.js => browser/components/preferences/in-content/search.js
rename : browser/components/preferences/in-content-old/search.xul => browser/components/preferences/in-content/search.xul
rename : browser/components/preferences/in-content-old/security.js => browser/components/preferences/in-content/security.js
rename : browser/components/preferences/in-content-old/security.xul => browser/components/preferences/in-content/security.xul
rename : browser/components/preferences/in-content-old/tests/browser_advanced_siteData.js => browser/components/preferences/in-content/tests/browser_advanced_siteData.js
extra : rebase_source : 57611e32dba47a2238a5e0573c25478a96cfb8fd
2017-05-31 08:20:26 +08:00
Timothy Guan-tin Chien
f9eb2ed08a Bug 1363850 - Part I, Move new about:preferences from in-content/ to in-content-new/, r=jaws,mconley
MozReview-Commit-ID: ButUfsGP7lS

--HG--
rename : browser/components/preferences/in-content/advanced.js => browser/components/preferences/in-content-new/advanced.js
rename : browser/components/preferences/in-content/advanced.xul => browser/components/preferences/in-content-new/advanced.xul
rename : browser/components/preferences/in-content/applications.js => browser/components/preferences/in-content-new/applications.js
rename : browser/components/preferences/in-content/applications.xul => browser/components/preferences/in-content-new/applications.xul
rename : browser/components/preferences/in-content/containers.js => browser/components/preferences/in-content-new/containers.js
rename : browser/components/preferences/in-content/containers.xul => browser/components/preferences/in-content-new/containers.xul
rename : browser/components/preferences/in-content/findInPage.js => browser/components/preferences/in-content-new/findInPage.js
rename : browser/components/preferences/in-content/jar.mn => browser/components/preferences/in-content-new/jar.mn
rename : browser/components/preferences/in-content/main.js => browser/components/preferences/in-content-new/main.js
rename : browser/components/preferences/in-content/main.xul => browser/components/preferences/in-content-new/main.xul
rename : browser/components/preferences/in-content/moz.build => browser/components/preferences/in-content-new/moz.build
rename : browser/components/preferences/in-content/preferences.js => browser/components/preferences/in-content-new/preferences.js
rename : browser/components/preferences/in-content/preferences.xul => browser/components/preferences/in-content-new/preferences.xul
rename : browser/components/preferences/in-content/privacy.js => browser/components/preferences/in-content-new/privacy.js
rename : browser/components/preferences/in-content/privacy.xul => browser/components/preferences/in-content-new/privacy.xul
rename : browser/components/preferences/in-content/searchResults.xul => browser/components/preferences/in-content-new/searchResults.xul
rename : browser/components/preferences/in-content/subdialogs.js => browser/components/preferences/in-content-new/subdialogs.js
rename : browser/components/preferences/in-content/sync.js => browser/components/preferences/in-content-new/sync.js
rename : browser/components/preferences/in-content/sync.xul => browser/components/preferences/in-content-new/sync.xul
rename : browser/components/preferences/in-content/tests/.eslintrc.js => browser/components/preferences/in-content-new/tests/.eslintrc.js
rename : browser/components/preferences/in-content/tests/browser.ini => browser/components/preferences/in-content-new/tests/browser.ini
rename : browser/components/preferences/in-content/tests/browser_advanced_update.js => browser/components/preferences/in-content-new/tests/browser_advanced_update.js
rename : browser/components/preferences/in-content/tests/browser_applications_selection.js => browser/components/preferences/in-content-new/tests/browser_applications_selection.js
rename : browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js => browser/components/preferences/in-content-new/tests/browser_basic_rebuild_fonts_test.js
rename : browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js => browser/components/preferences/in-content-new/tests/browser_bug1018066_resetScrollPosition.js
rename : browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js => browser/components/preferences/in-content-new/tests/browser_bug1020245_openPreferences_to_paneContent.js
rename : browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js => browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
rename : browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul => browser/components/preferences/in-content-new/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul
rename : browser/components/preferences/in-content/tests/browser_bug410900.js => browser/components/preferences/in-content-new/tests/browser_bug410900.js
rename : browser/components/preferences/in-content/tests/browser_bug705422.js => browser/components/preferences/in-content-new/tests/browser_bug705422.js
rename : browser/components/preferences/in-content/tests/browser_bug731866.js => browser/components/preferences/in-content-new/tests/browser_bug731866.js
rename : browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js => browser/components/preferences/in-content-new/tests/browser_bug795764_cachedisabled.js
rename : browser/components/preferences/in-content/tests/browser_change_app_handler.js => browser/components/preferences/in-content-new/tests/browser_change_app_handler.js
rename : browser/components/preferences/in-content/tests/browser_checkspelling.js => browser/components/preferences/in-content-new/tests/browser_checkspelling.js
rename : browser/components/preferences/in-content/tests/browser_connection.js => browser/components/preferences/in-content-new/tests/browser_connection.js
rename : browser/components/preferences/in-content/tests/browser_connection_bug388287.js => browser/components/preferences/in-content-new/tests/browser_connection_bug388287.js
rename : browser/components/preferences/in-content/tests/browser_cookies_exceptions.js => browser/components/preferences/in-content-new/tests/browser_cookies_exceptions.js
rename : browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js => browser/components/preferences/in-content-new/tests/browser_defaultbrowser_alwayscheck.js
rename : browser/components/preferences/in-content/tests/browser_engines.js => browser/components/preferences/in-content-new/tests/browser_engines.js
rename : browser/components/preferences/in-content/tests/browser_healthreport.js => browser/components/preferences/in-content-new/tests/browser_healthreport.js
rename : browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js => browser/components/preferences/in-content-new/tests/browser_homepages_filter_aboutpreferences.js
rename : browser/components/preferences/in-content/tests/browser_layersacceleration.js => browser/components/preferences/in-content-new/tests/browser_layersacceleration.js
rename : browser/components/preferences/in-content/tests/browser_masterpassword.js => browser/components/preferences/in-content-new/tests/browser_masterpassword.js
rename : browser/components/preferences/in-content/tests/browser_notifications_do_not_disturb.js => browser/components/preferences/in-content-new/tests/browser_notifications_do_not_disturb.js
rename : browser/components/preferences/in-content/tests/browser_performance.js => browser/components/preferences/in-content-new/tests/browser_performance.js
rename : browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js => browser/components/preferences/in-content-new/tests/browser_permissions_urlFieldHidden.js
rename : browser/components/preferences/in-content/tests/browser_privacypane_1.js => browser/components/preferences/in-content-new/tests/browser_privacypane_1.js
rename : browser/components/preferences/in-content/tests/browser_privacypane_3.js => browser/components/preferences/in-content-new/tests/browser_privacypane_3.js
rename : browser/components/preferences/in-content/tests/browser_privacypane_4.js => browser/components/preferences/in-content-new/tests/browser_privacypane_4.js
rename : browser/components/preferences/in-content/tests/browser_privacypane_5.js => browser/components/preferences/in-content-new/tests/browser_privacypane_5.js
rename : browser/components/preferences/in-content/tests/browser_privacypane_8.js => browser/components/preferences/in-content-new/tests/browser_privacypane_8.js
rename : browser/components/preferences/in-content/tests/browser_proxy_backup.js => browser/components/preferences/in-content-new/tests/browser_proxy_backup.js
rename : browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js => browser/components/preferences/in-content-new/tests/browser_sanitizeOnShutdown_prefLocked.js
rename : browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_1.js => browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_1.js
rename : browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_2.js => browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_2.js
rename : browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_3.js => browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_3.js
rename : browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_4.js => browser/components/preferences/in-content-new/tests/browser_search_subdialogs_within_preferences_4.js
rename : browser/components/preferences/in-content/tests/browser_search_within_preferences.js => browser/components/preferences/in-content-new/tests/browser_search_within_preferences.js
rename : browser/components/preferences/in-content/tests/browser_searchsuggestions.js => browser/components/preferences/in-content-new/tests/browser_searchsuggestions.js
rename : browser/components/preferences/in-content/tests/browser_security.js => browser/components/preferences/in-content-new/tests/browser_security.js
rename : browser/components/preferences/in-content/tests/browser_siteData.js => browser/components/preferences/in-content-new/tests/browser_siteData.js
rename : browser/components/preferences/in-content/tests/browser_siteData2.js => browser/components/preferences/in-content-new/tests/browser_siteData2.js
rename : browser/components/preferences/in-content/tests/browser_subdialogs.js => browser/components/preferences/in-content-new/tests/browser_subdialogs.js
rename : browser/components/preferences/in-content/tests/browser_telemetry.js => browser/components/preferences/in-content-new/tests/browser_telemetry.js
rename : browser/components/preferences/in-content/tests/head.js => browser/components/preferences/in-content-new/tests/head.js
rename : browser/components/preferences/in-content/tests/offline/manifest.appcache => browser/components/preferences/in-content-new/tests/offline/manifest.appcache
rename : browser/components/preferences/in-content/tests/offline/offline.html => browser/components/preferences/in-content-new/tests/offline/offline.html
rename : browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js => browser/components/preferences/in-content-new/tests/privacypane_tests_perwindow.js
rename : browser/components/preferences/in-content/tests/site_data_test.html => browser/components/preferences/in-content-new/tests/site_data_test.html
rename : browser/components/preferences/in-content/tests/subdialog.xul => browser/components/preferences/in-content-new/tests/subdialog.xul
rename : browser/components/preferences/in-content/tests/subdialog2.xul => browser/components/preferences/in-content-new/tests/subdialog2.xul
rename : browser/themes/linux/preferences/in-content/dialog.css => browser/themes/linux/preferences/in-content-new/dialog.css
rename : browser/themes/linux/preferences/in-content/preferences.css => browser/themes/linux/preferences/in-content-new/preferences.css
rename : browser/themes/osx/preferences/in-content/dialog.css => browser/themes/osx/preferences/in-content-new/dialog.css
rename : browser/themes/osx/preferences/in-content/preferences.css => browser/themes/osx/preferences/in-content-new/preferences.css
rename : browser/themes/windows/preferences/in-content/dialog.css => browser/themes/windows/preferences/in-content-new/dialog.css
rename : browser/themes/windows/preferences/in-content/preferences.css => browser/themes/windows/preferences/in-content-new/preferences.css
extra : rebase_source : a7accd26847f9b3d5ee0acc9442ef65edeadb5bf
2017-05-25 18:31:41 +08:00
Florian Quèze
5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Joseph Yeh
d06b5432a5 Bug 1036815 - Convert Advanced pane dialogs to be in-content. r=MattN
MozReview-Commit-ID: BXeCOryk4kE
2016-08-17 02:08:00 -04:00
Matthew Noorenberghe
b68d5dd89d No bug - Cleanup browser_connection.js so it's a better example for related tests. r=me 2014-03-01 16:19:57 -05:00
Matthew Noorenberghe
f7b4ef731a Bug 763232 - Handle shell service throwing on Linux in the advanced preferences pane. r=jaws
--HG--
extra : rebase_source : 527bc5faed3d1111f2d3d9dea3b4f101c9d0d8ee
2012-07-30 23:54:16 -07:00
Andrew Hurle
f11aafa051 Bug 566444 - Make proxy exceptions multiline. r=jaws 2012-05-24 18:45:09 -04:00