Commit Graph

48 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
Paolo Amadini
ce13039af3 Bug 1471403 - Part 2 - Lazify the creation of "notificationbox" elements. r=dao,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D10892

--HG--
extra : rebase_source : f66fe90d780c3d446f4a065c0397cbb37f43cb0c
2018-11-09 14:38:49 +00:00
Gijs Kruitbosch
ea9997c503 Bug 1490642 browser_CaptivePortalWatcher.js should check for the default window to be activated instead of potentially waiting for it more than once, r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D5665

--HG--
extra : moz-landing-system : lando
2018-09-12 12:00:52 +00:00
Dão Gottwald
87b1e322e2 Bug 1489552 - Let BrowserWindowTracker.getTopWindow use the module's internal window list instead of nsIWindowMediator::getZOrderDOMWindowEnumerator / getMostRecentWindow. r=nhnt11 2018-09-10 22:27:38 +02:00
Gijs Kruitbosch
ef7146a4be Bug 1486824 - change BrowserTestUtils to just call OpenBrowserWindow so it does the same thing as opening a window normally, r=mconley,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D4466

--HG--
extra : rebase_source : e51b66bb18d0e600814b48d5cd3ec9d5dea3028a
extra : source : 96b5a88ac0041a1bd382a731749e1fca9aa911ed
2018-09-03 14:43:38 +01:00
Margareta Eliza Balazs
5ddcd7b745 Backed out changeset 96b5a88ac004 (bug 1486824) for causing frequent failures e.g: browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js a=backout 2018-08-31 12:17:27 +03:00
Gijs Kruitbosch
9d70cb3843 Bug 1486824 - change BrowserTestUtils to just call OpenBrowserWindow so it does the same thing as opening a window normally, r=mconley,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D4466

--HG--
extra : moz-landing-system : lando
2018-08-30 15:07:36 +00:00
Narcis Beleuzu
a4ec006bb0 Backed out changeset 4e195f7b2d6b (bug 1486824) for clipboard failures on OSX browser_editcontrols_update. a=backout 2018-08-30 15:59:59 +03:00
Gijs Kruitbosch
a8e2b8e702 Bug 1486824 - change BrowserTestUtils to just call OpenBrowserWindow so it does the same thing as opening a window normally, r=mconley,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D4466

--HG--
extra : moz-landing-system : lando
2018-08-29 17:58:25 +00:00
Mike de Boer
ecf63670d4 Bug 1034036 - Part 2: Rename and shorten getMostRecentBrowserWindow to getTopWindow and modernize the style used in BrowserWindowTracker.jsm. r=dao
MozReview-Commit-ID: EvgAhq4uR3a

--HG--
extra : rebase_source : 8fd8040cd1eee94675d4e9ca0c8ccc60db9e1bf7
2018-04-11 12:05:59 +02:00
Mike de Boer
d16ee58ded Bug 1034036 - Part 1: Merge RecentWindow.jsm and UpdateTopLevelContentWindowIDHelper.jsm into one module called 'BrowserWindowTracker.jsm'. r=dao
MozReview-Commit-ID: 9qzq1aGvjDu

--HG--
rename : browser/modules/UpdateTopLevelContentWindowIDHelper.jsm => browser/modules/BrowserWindowTracker.jsm
extra : rebase_source : 9c4a728e13fd691d377e7f221c5632646115daca
2018-04-11 12:05:56 +02:00
Tooru Fujisawa
1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Tooru Fujisawa
3038c58523 Bug 1442465 - Part 2: Use BrowserTestUtils.{waitForTabClosing,waitForSessionStoreUpdate} instead of BrowserTestUtils.tabRemoved. r=dao 2018-03-19 11:12:13 +09: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
Dan Banner
7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Andrew Halberstadt
d2109610fb Bug 1385352 - Enable 'mozilla/no-arbitrary-setTimeout' eslint rule on browser-chrome tests, r=standard8
MozReview-Commit-ID: 5lO0uAjHMsw

--HG--
extra : rebase_source : 8607b3964da207a6076c79b6f1d75b40503cdd7d
2017-08-10 14:48:21 -04:00
Phil Ringnalda
0ff5a4285d Backed out changeset 6896f93a2327 (bug 1385352) for not making it to m-c before the next violation of its new linting rule merged to autoland
MozReview-Commit-ID: 3HDE2C3wSU0
2017-08-10 20:21:19 -07:00
Andrew Halberstadt
f625fd5c37 Bug 1385352 - Enable 'mozilla/no-arbitrary-setTimeout' eslint rule on browser-chrome tests, r=standard8
MozReview-Commit-ID: 5lO0uAjHMsw

--HG--
extra : rebase_source : d72a88962ec8d843e7be99e25f710887f01b6e1a
2017-08-10 14:48:21 -04:00
Marco Castelluccio
1ac9951d82 Bug 1357517 - Remove or delay Preferences.jsm usage from some browser/base/content/* files. r=Gijs
--HG--
extra : rebase_source : 838f891fc0d6a53a82f06f6b9c4261ae89c79cc3
2017-07-31 12:51:35 +02:00
Christoph Kerschbaumer
e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Florian Quèze
16530fa1e3 Bug 1353542 - smaller script-generated patch converting remaining generators that are likely tasks (actual generators were identified by hand and whitelisted), r=Mossop. 2017-05-12 14:45:01 +02: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
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst
738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Paul Bignier
9103ac60ef Bug 1352808 - Typo fixes for 'browser' in comments. r=MattN
MozReview-Commit-ID: IA42yQO5Sb8

--HG--
extra : rebase_source : b5426724c5b740639f71e5d058742b01868085e2
2017-04-03 15:26:11 -07:00
Mike Conley
a792e520a7 Bug 1340842 - Allow BrowserTestUtils.removeTab to pass options along to tabbrowser's removeTab method. r=mossop
There were options already being passed to BrowserTestUtils.removeTab, with only
a single property being observed, "dontRemove". This caused BrowserTestUtils.removeTab
to return a Promise once a tab is removed, but didn't actually remove the tab (as the
calling test would be responsible for that themselves). This patch removes that option,
and adds a method to BrowserTestUtils called tabRemoved to use for that case instead.

The options being passed to removeTab are now forwarded along directly to tabbrowser's
removeTab method.

MozReview-Commit-ID: JzfZuoZmlJ0

--HG--
extra : rebase_source : 71afc1f82ecd979b101a9f1a1ef1766185eefd75
2017-03-17 09:59:38 -04:00
Carsten "Tomcat" Book
c35121e343 Backed out changeset b3abd0e89699 (bug 1340842) 2017-03-22 16:40:02 +01:00
Mike Conley
eba3f6a314 Bug 1340842 - Allow BrowserTestUtils.removeTab to pass options along to tabbrowser's removeTab method. r=mossop
There were options already being passed to BrowserTestUtils.removeTab, with only
a single property being observed, "dontRemove". This caused BrowserTestUtils.removeTab
to return a Promise once a tab is removed, but didn't actually remove the tab (as the
calling test would be responsible for that themselves). This patch removes that option,
and adds a method to BrowserTestUtils called tabRemoved to use for that case instead.

The options being passed to removeTab are now forwarded along directly to tabbrowser's
removeTab method.

MozReview-Commit-ID: JzfZuoZmlJ0

--HG--
extra : rebase_source : cd9e7834f2f507b91cac8e9bb8e1dd58e2ba33d5
2017-03-17 09:59:38 -04:00
Mark Banner
bd625e4e9f Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6

--HG--
extra : rebase_source : 83eaf40c5cbb5e25cfb3f3b5afadf4fbf0422c92
2017-03-20 12:36:37 +01:00
Joel Maher
82b94e5135 Bug 1318389 - fix eslint issue. a=me 2017-03-20 06:45:23 -04:00
Joel Maher
de9d1c9dde Bug 1318389 - Intermittent browser/modules/test/browser_CaptivePortalWatcher.js, requestLongerTimeout. This test does a lot of window and tab manipulation causing it to take a long time on debug. r=nhnt11
MozReview-Commit-ID: E8tfNzQfO96
2017-03-20 05:51:09 -04:00
meghana
ddfb294c2a Bug 1344726 - Replace instances of waitForCertErrorLoad with BTU.waitForContentEvent and BTU.waitForErrorPage in browser_captivePortal_certErrorUI.js. r=johannh
MozReview-Commit-ID: JtdZT3v04UP

--HG--
extra : rebase_source : 42c15da5fa3ae328c35e58278681c86b6e2064c6
2017-03-13 19:17:48 +05:30
Nihanth Subramanya
598a2b5765 Bug 1318389 - Move single run captive portal test cases to separate test file. r=Gijs
MozReview-Commit-ID: Ha3w2g17BP0

--HG--
extra : rebase_source : 2aac4544a50621648405f0d05e1fa71189c92a88
2017-02-17 01:05:38 +05:30
Nihanth Subramanya
c9bf60e444 Bug 1318389 - Move captive portal test utility functions to head.js. r=Gijs
MozReview-Commit-ID: Lgd3ReeHrLm

--HG--
extra : rebase_source : bae125296c33d2fa28e1eae0558f99126e1d0c5e
2017-02-17 01:03:35 +05:30
Panos Astithas
963e794209 Don't autofocus buttons when about:certerror is embedded in an iframe (bug 1336352). r=nhnt11
MozReview-Commit-ID: BT8oCmX9stf

--HG--
extra : rebase_source : 3f80e8751ba2a4b49379fae6f1f4016838dc0ca2
2017-02-08 16:43:39 +02:00
Nihanth Subramanya
d37f4e41f6 Bug 1333075 - Ensure captive portal notification is displayed in all windows after portal is detected when none have focus. r=MattN
MozReview-Commit-ID: 9dvZp9Kn6kT

--HG--
extra : rebase_source : c453ef39a4b149e9b9d8474a849e9496fb3e2c03
2017-01-24 21:24:07 +05:30
Nihanth Subramanya
f5f8565677 Bug 1313568 - Remove CaptivePortalWatcher.jsm and move tests to browser/base/content/tests/captivePortal. r=MattN
MozReview-Commit-ID: 3dSsLNmSUMA

--HG--
rename : browser/modules/test/browser_CaptivePortalWatcher.js => browser/base/content/test/captivePortal/browser_CaptivePortalWatcher.js
extra : rebase_source : 51bb545dcb072347a916210ce8c71b0711719076
2017-01-14 04:28:50 +05:30
Nihanth Subramanya
f2ba2936d1 Bug 1313568 - Handle captive portal UI in per-window script. r=MattN
MozReview-Commit-ID: FxjE2NblJe4

--HG--
rename : browser/modules/CaptivePortalWatcher.jsm => browser/base/content/browser-captivePortal.js
extra : rebase_source : c6c1321b591fdbd870ff40374477bbc05fbcb27c
2017-01-08 03:23:09 +01:00
Mark Banner
39df62d9dc Bug 1328338 - Fix more no-undef eslint issues in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 78dXLYVW1gC

--HG--
extra : rebase_source : 4d2c50697307177c76a71ca7989863f01b05290b
2017-01-03 11:55:24 +00:00
Nihanth Subramanya
238cccef3c Bug 989197 - Add tests for alternate cert error UI when behind a captive portal. r=Gijs
MozReview-Commit-ID: EZuHGrmHx7d

--HG--
extra : rebase_source : 3551d1f64b250e905de0b7390790e41ed4a00f8b
2016-11-29 15:39:14 -08:00