Commit Graph

41 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
Eric Rahm
2d424cc2b2 Bug 1383315 - Disable browser/base/content/test/tabcrashed/browser_noPermanentKey.js. r=mconley
--HG--
extra : rebase_source : 694bd2599ccfa9125f0402ee1eec7af20d6fe416
extra : amend_source : 1a6b435ad2e1b2f78b7061d2ad49c6fa683817b9
2018-10-06 17:42:21 -07:00
Mark Banner
691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

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

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Kris Maglione
80327d3561 Bug 1484496: Part 5a - Convert browser/ nsISimpleEnumerator users to use JS iteration. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D3729

--HG--
extra : rebase_source : e187b8e9a6b6db7ebc762adda5e489b25c7a7e43
extra : histedit_source : 868cb99d09954a51d6be321fcb516475ef70eb33
2018-08-18 19:27:33 -07:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Stephen A Pohl
48e98b6ec3 Bug 1366808: Add tests for about:restartrequired page. r=felipe 2018-05-08 10:32:06 -04: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
313b707b2e Bug 1443964: Part 3 - Remove no-cpows-in-tests rule. r=mconley
The shims that this rule tests for no longer exist.

MozReview-Commit-ID: DMgP7Hczavc

--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
2018-03-07 19:31:28 -08:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01: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
Mike Conley
4d6ed7eb15 Bug 1424373 - Rename crash report submission pref. r=Mossop
--HG--
extra : rebase_source : 14cfcee27cefc13911aee2c0663c74f3e9101275
extra : amend_source : bb12f2b78b2c43ef79957d700167a2fea80d0188
2017-12-21 16:36:13 -05:00
Mike Conley
b27c33fa9d Bug 1424373 - Don't set crash reporting prefs when showing about:tabcrashed for a crash without a report. r=Mossop
--HG--
extra : rebase_source : 3330154807a268c5cc85bfbf19c64f3a790d4aee
2017-12-18 11:19:53 -05:00
Joel Maher
2e63ddda64 Bug 1383315 - Disable browser/base/content/test/tabcrashed/browser_noPermanentKey.js on linux for frequent failures. r=me, a=testonly 2017-11-13 12:20:02 -05:00
Mark Banner
01008c7d57 Bug 1412778 - Enable ESLint rule no-cpows-in-tests across the whole tree. r=florian
MozReview-Commit-ID: 8pidN7x6MYh

--HG--
extra : rebase_source : 6a0d6800091231fc1535223bd7fc6df0ba40d47b
2017-10-30 09:55:39 +00:00
Gabriele Svelto
84b68b502d Bug 1393800 - Have mochitests expecting crashes wait for the crashes to be recorded before clean up; r=mconley
This patch includes a bunch of somewhat related fixes, these are:

- Ensuring that when a mochitest calls SimpleTest.expectChildProcessCrash()
  the harness will wait for the crashes to be recorded before deleting the
  dump files. This involves a message round-trip between the content and
  parent process so to minimize its performance impact on all the non-crashing
  tests it is done only when required.
- As an additional optimization, the SimpleTest harness will not send a
  message to the content process anymore whenever it receives an
  ipc:content-shutdown event, instead it does it only for abnormal shutdowns.
- Manually fixing remaining mochitests causing crashes to wait for crashes to
  be recorded before finishing and deleting the dump files.
- Modifying BrowserTestUtils.crashBrowser() so that it optionally does not
  delete the dump files, this is useful for tests that submit their dumps and
  thus delete them on their own.


MozReview-Commit-ID: 4SLJ8BjJ18n

--HG--
extra : source : b5452a41bb962c6929292c5c538e19ac28d84fe7
2017-08-25 12:47:09 +02: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
Joel Maher
b4616d29c6 Bug 1383315 - Disable browser/base/content/test/tabcrashed/browser_noPermanentKey.js for linux 64/debug. r=gbrown 2017-09-07 10:23:51 -04:00
Ryan VanderMeulen
d0cfcfb085 Bug 1394018 - Clean up the tabcrashed browser-chrome test manifest. r=mconley 2017-08-25 17:58:06 -04:00
Joel Maher
15675feae0 Bug 1383315 - Disable browser/base/content/test/tabcrashed/browser_noPermanentKey.js for linux32/debug. r=mconley 2017-08-24 13:14:47 -04:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Geoff Brown
385594a2b7 Bug 1325530 - requestLongerTimeout for browser_shown.js; r=mconley
A simple solution to current timeouts. Several other tabcrashed tests
already use requestLongerTimeout -- it seems like these tests often have
a long run time.
2017-07-26 09:16:18 -06:00
Wes Kocher
55d0ef80b9 Backed out changeset 49c4c4a3fb81 (bug 1380065) for failures in browser_aboutStopReload.js a=backout CLOSED TREE
MozReview-Commit-ID: Hxfpijgy3dL

--HG--
extra : amend_source : 588ff0272fac30b78726cf2e216c4f0294c2f3ab
2017-07-21 17:01:30 -07:00
Sam Foster
d169f11f91 Bug 1380065 - Disable arrow-panel animations if the cosmeticAnimations pref is set to false. r=jaws
* Toggle animate=false attribute on arrow panels when toolkit.cosmeticAnimations.enabled is false
* Use preferences-service component to lookup the pref in the arrowpanel binding
* Disable this pref during tests to remove a source of instability and timing-based test failures in chrome/UI tests.
* Enable cosmeticAnimations for tests which depend on existing behavior

MozReview-Commit-ID: IvA2ySPPmeJ

--HG--
extra : rebase_source : a83177668dc2035ff5c6d92a5f93227190583229
2017-07-13 14:30:38 -04:00
Mike Conley
b87f27185b Bug 1378036 - Add a regression test for tabs crashing without a permanentKey. r=Felipe
MozReview-Commit-ID: DYx3TJ0gsIZ

--HG--
extra : rebase_source : 11c989386973cd63322487977118948a388bd1f8
2017-07-17 18:27:55 -04:00
Mike Conley
245d4b515a Bug 1378036 - Factor out a utility method for about:tabcrashed tests. r=Felipe
MozReview-Commit-ID: 6JAicvHdFlV

--HG--
extra : rebase_source : a7f0a9f5f799f710b230ebae4e69d9915e531977
2017-07-17 18:25:58 -04: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
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
Gabor Krizsanits
216527edfc Bug 1303113 - Turn e10s-multi on in Nightly. r=me 2017-01-23 14:15:30 +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
Dave Townsend
0a2c8f9b78 Bug 1316882: Turn on space-infix-ops eslint rule. r=jaws
MozReview-Commit-ID: HBpjT2uHJaZ

--HG--
extra : rebase_source : 78fe71a1d673a1c698520a9c82c6f35959614f8f
2016-11-10 14:48:04 -08:00
Mike Conley
c498e6fd40 Bug 1309316 - Follow-up: disable test when crashreporter is not available. r=bustage-fix
MozReview-Commit-ID: 189oSFKHmxU
2016-11-11 13:18:43 -05:00
Mike Conley
d73c1e3013 Bug 1309316 - Hide email field in about:tabcrashed by default. r=Felipe
As requested by UX. Disabling it behind a pref in case we decide we really
need to expose users to that form field again.

MozReview-Commit-ID: 4ICZXuApFBL

--HG--
extra : rebase_source : 8d42989c44d38299d5586eeb58d7aa6ac0196a29
2016-11-10 22:13:09 -05:00
Mike Conley
514138cbd4 Bug 1309316 - Add tests for autosubmission request in about:tabcrashed. r=Felipe
MozReview-Commit-ID: 9EWat5WJzCp

--HG--
extra : rebase_source : 7910f251cdd03a6fde4d452651b42febfeb300a5
2016-11-11 01:58:35 -05:00
Mike Conley
a44beb08d3 Bug 1309316 - Move about:tabcrashed tests into their own directory. r=Felipe
MozReview-Commit-ID: C3emEC3JbiL

--HG--
rename : browser/base/content/test/general/browser_aboutTabCrashed_clearEmail.js => browser/base/content/test/tabcrashed/browser_clearEmail.js
rename : browser/base/content/test/general/browser_aboutTabCrashed_showForm.js => browser/base/content/test/tabcrashed/browser_showForm.js
rename : browser/base/content/test/general/browser_aboutTabCrashed.js => browser/base/content/test/tabcrashed/browser_shown.js
rename : browser/base/content/test/general/browser_aboutTabCrashed_withoutDump.js => browser/base/content/test/tabcrashed/browser_withoutDump.js
extra : rebase_source : b8333240ca7628b991cf3a2445dc3575197c82a8
2016-11-10 23:17:48 -05:00