Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
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
Boris Zbarsky 1312fcd10f Bug 1476145 part 5. Stop using getInterface(nsIDOMWindowUtils) in DOM code. r=mccr8 2018-07-24 19:47:41 -04:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08: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
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Xidorn Quan ebe6f7b562 Bug 1205938 part 1 - Add waitForCondition() function to SimpleTest. r=jmaher
This function is roughly copied from browser/base/content/test/general/head.js.
It has been widely used in browser chrome mochitests, and should be fine to
have it available to all mochitests via SimpleTest.

MozReview-Commit-ID: DhIfgJiUhXK

--HG--
extra : rebase_source : 95ab1cd6c1ab5f6c0d8f0171865722ca76b41c6e
2015-09-18 11:06:47 +08:00
Xidorn Quan b93799ba92 Bug 1213710 part 2 - Rename dom/plugins/test/mochitest/utils.js to plugin-utils.js. r=bsmedberg
So that files outside this dir can also reference it without conflict.

--HG--
rename : dom/plugins/test/mochitest/utils.js => dom/plugins/test/mochitest/plugin-utils.js
extra : source : 136f6591826350948f2e342da1600a983b4bcd76
2015-11-17 09:54:12 +11:00
Tooru Fujisawa ca99c36747 Bug 1207494 - Part 11: Remove use of expression closure from dom/plugins/. r=jst
--HG--
extra : commitid : 2trNkFPCEIO
extra : rebase_source : 0a6e70cb195149ef33565d0b84b01e6d2e15fa80
2015-09-23 18:39:15 +09:00
Martijn Wargers 4d7138739f Bug 916086 - Remove some more enablePrivilege calls. r=jmaher
CLOSED TREE

--HG--
rename : layout/base/tests/test_bug458898.html => layout/base/tests/chrome/test_bug458898.html
2013-09-16 22:12:29 +02:00
Georg Fritzsche ce4d217ed2 Bug 899080 - Test fixup part 2 - dom/plugins. r=bsmedberg 2013-09-04 16:05:40 +02:00
Benjamin Smedberg 7787c89f92 Bug 880735 test fixups:
* Add a test-only setter to the center-item XBL binding
* add a head.js function to remove plugin permissions for use in cleanup functions
* browser_pluginnotification.js - lots of fixes for the core feature tests
* Alter test_bug751809 not to assume that clicking the page overlay will directly activate the plugin
* Alter browser_CTP_plugins.js because disabled plugins now do show up in the plugin doorhanger
* remove browser_CTPScriptPlugin.js and supporting files because we no longer auto-pop based on scripting
* fix browser_CTP_drag_drop.js so that active plugins still show the doorhanger icon, and other fixup
* fix browser_bug743421.js to expect the doorhanger all the time and activate it correctly
* fix browser_bug752516.js to check for doorhanger activation instead of plugin activation
* remove browser_bug818009.js and supporting files because they are testing something that no longer exists
* alter browser_bug820497.js so that it shows the popup notification before checking .centerActions, since we populate that data lazily now
* browser_plugins_added_dynamically.js: remove the "activate all" tests which are no longer relevant and fix the rest to match the new doorhanger structure.
2013-06-24 08:51:07 -04:00
David Keeler 006291280a bug 549697 - add click-to-play plugin UI to the addon manager r=unfocused r=jaws
--HG--
rename : browser/base/content/test/test_bug787619.html => browser/base/content/test/browser_bug787619.js
rename : browser/base/content/test/test_bug787619.html => browser/base/content/test/plugin_bug787619.html
2013-04-23 16:21:22 -07:00
Boris Zbarsky 00e6500f00 Bug 843627 part 3. Enable WebIDL bindings for <embed> and <applet>. r=peterv 2013-03-17 10:42:05 -04:00
Georg Fritzsche 0937ddb942 Bug 805330 - Ensure plugin widget visibility via paint flushes. r=josh,roc,robcee
--HG--
rename : layout/base/tests/chrome/paint_listener.js => testing/mochitest/tests/SimpleTest/paint_listener.js
2012-12-05 14:39:26 +01:00
Georg Fritzsche 9438446ca5 Bug 805330 - Cleanup and attempt to avoid intermittent orange from bug 751809. r=josh 2012-10-29 18:27:32 +01:00
Georg Fritzsche d5a643b3c3 Bug 751809 - Fix OSX focus issue with click-to-play. r=josh 2012-08-10 20:28:34 +02:00
Ed Morley 5a6cb3b570 Backout 6943b37c68cc (bug 751809) for bug 783723 2012-08-18 14:11:13 +01:00
Georg Fritzsche f90c630c44 Bug 751809 - Fix OSX focus issue with click-to-play. r=josh 2012-08-10 20:28:34 +02:00