gecko-dev/dom/plugins/test/mochitest
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
..
.eslintrc.js Bug 1508980 - Add more .eslintrc.js files for dom/ and update .eslintignore. r=Gijs 2018-11-21 14:27:27 +00:00
307-xo-redirect.sjs
1028200-subpageA1.html Bug 1028200 - Plugins that are fullscreen'd should exit fullscreen mode on crash. r=mconley 2016-12-13 13:44:39 -05:00
1028200-subpageA.html Bug 1028200 - Plugins that are fullscreen'd should exit fullscreen mode on crash. r=mconley 2016-12-13 13:44:39 -05:00
1028200-subpageB1.html Bug 1028200 - Plugins that are fullscreen'd should exit fullscreen mode on crash. r=mconley 2016-12-13 13:44:39 -05:00
1028200-subpageB.html Bug 1028200 - Plugins that are fullscreen'd should exit fullscreen mode on crash. r=mconley 2016-12-13 13:44:39 -05:00
1028200-subpageC.html Bug 1028200 - Plugins that are fullscreen'd should exit fullscreen mode on crash. r=mconley 2016-12-13 13:44:39 -05:00
browser_bug1163570.js Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
browser_bug1196539.js Bug 1176019 - Fix browser_bug1196539.js painting check r=mconley 2018-05-08 09:49:24 -07:00
browser_bug1335475.js Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika 2018-08-29 15:47:29 +01:00
browser_data_url_plugin.js Bug 1381755: Test that data: URIs can't activate plugins. r=bsmedberg 2017-07-24 20:34:44 +02:00
browser_pluginscroll.js Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug 2018-02-15 04:15:39 +09:00
browser_tabswitchbetweenplugins.js Bug 1476145 part 5. Stop using getInterface(nsIDOMWindowUtils) in DOM code. r=mccr8 2018-07-24 19:47:41 -04:00
browser.ini Bug 1381755: Test that data: URIs can't activate plugins. r=bsmedberg 2017-07-24 20:34:44 +02:00
chrome.ini Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
cocoa_focus.html
cocoa_window_focus.html
crashing_subpage.html
dialog_watcher.js
file_authident.js Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
file_bug771202.html
file_bug863792.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
file_bug1245545.js Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
hang_test.js Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
hangui_common.js
hangui_iface.js
hangui_subpage.html
head.js 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
large-pic.jpg
loremipsum_file.txt
loremipsum_nocache.txt
loremipsum_nocache.txt^headers^
loremipsum.txt
loremipsum.xtest
loremipsum.xtest^headers^
mixed_case_mime.sjs
mochitest.ini Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
neverending.sjs
npruntime_identifiers_subpage.html
plugin_data_url_test.html Bug 1381755: Test that data: URIs can't activate plugins. r=bsmedberg 2017-07-24 20:34:44 +02:00
plugin_no_scroll_div.html
plugin_subframe_test.html
plugin_test.html Bug 1335475 - Deny plugins from non-HTTP/HTTPS origins. r=bytesized,qdot 2017-03-07 09:34:03 -05:00
plugin_visibility_loader.html
plugin_window.html
plugin-stream-referer.sjs
plugin-utils.js Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
pluginstream.js
post.sjs
privatemode_perwindowpb.xul
test_bug479979.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_bug532208.html
test_bug539565-1.html bug 1333607 - fix some plugin tests to work on high dpi machines r=jimm 2017-01-26 16:09:41 -05:00
test_bug539565-2.html bug 1333607 - fix some plugin tests to work on high dpi machines r=jimm 2017-01-26 16:09:41 -05:00
test_bug751809.html Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_bug771202.html
test_bug777098.html
test_bug784131.html
test_bug813906.html Bug 1182569: Update tests when converting docshell loads to use AynscOpen2. r=smaug,billm 2017-01-03 21:00:12 +01:00
test_bug827160.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_bug852315.html
test_bug854082.html
test_bug863792.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_bug967694.html
test_bug985859.html
test_bug986930.html
test_bug1028200-1.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-2.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-3.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-4.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-5.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-6.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1028200-7.html Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian 2018-04-18 11:43:45 -07:00
test_bug1092842.html Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
test_bug1165981.html Bug 1318833 - Part 1: Remove Silverlight plugin tests and test plugin. r=qdot 2016-11-21 21:10:27 -08:00
test_bug1245545.html Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
test_bug1307694.html Bug 1307694 - Mochitests for plugin parameter ordering; r=bsmedberg 2016-10-20 11:28:02 -07:00
test_busy_hang.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_clear_site_data.html 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
test_cocoa_focus.html
test_cocoa_window_focus.html
test_convertpoint.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_copyText.html Bug 1332166 - Wait for the clipboard to be updated before checking it, r=enndeakin 2017-03-14 13:48:51 -04:00
test_crash_nested_loop.html
test_crash_notify_no_report.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_crash_notify.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_crash_submit.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_crashing2.html Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
test_crashing.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_CrashService_crash.html bug 1331320 document requestFlakyTimeout for crashAndGetCrashServiceRecord() r=glandium 2017-01-16 18:57:03 +13:00
test_CrashService_hang.html bug 1331320 document requestFlakyTimeout for crashAndGetCrashServiceRecord() r=glandium 2017-01-16 18:57:03 +13:00
test_defaultValue.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_enumerate.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_hang_submit.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_hanging.html
test_hangui.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_hidden_plugin.html Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
test_idle_hang.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_instance_re-parent.html Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8 2017-04-12 11:10:00 +01:00
test_instance_unparent1.html Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8 2017-04-12 11:10:00 +01:00
test_instance_unparent2.html Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8 2017-04-12 11:10:00 +01:00
test_instance_unparent3.html Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8 2017-04-12 11:10:00 +01:00
test_instantiation.html
test_mixed_case_mime.html
test_multipleinstanceobjects.html
test_newstreamondestroy.html
test_npn_timers.html
test_NPNVdocumentOrigin.html
test_npobject_getters.html Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8 2018-11-01 13:48:48 +00:00
test_NPPVpluginWantsAllNetworkStreams.html
test_npruntime_construct.html
test_npruntime_identifiers.html
test_npruntime_npnevaluate.html
test_npruntime_npninvoke.html
test_npruntime_npninvokedefault.html Bug 909656. Remove the legacycaller from HTMLObjectElement/HTMLEmbedElement, since it's not used in the wild, other browsers don't seem to support it, and we're dropping non-Flash plugins anyway. r=bsmedberg 2016-11-18 16:13:06 -05:00
test_npruntime.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_object.html Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
test_painting.html
test_plugin_scroll_invalidation.html
test_plugin_scroll_painting.html
test_plugin_tag_clicktoplay.html Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_pluginstream_err.html Bug 1397655 - Update tests within dom/ to comply with new toplevel data: URI navigation policy. r=smaug 2017-09-10 13:24:07 +02:00
test_pluginstream_geturl.html
test_pluginstream_geturlnotify.html
test_pluginstream_post.html
test_pluginstream_poststream.html
test_pluginstream_referer.html
test_pluginstream_src_dynamic.html
test_pluginstream_src_referer.html Bug 1385223 - Convert tests within dom/plugins/test/mochitest/ to comply with new data: URI inheritance model. r=bsmedberg 2017-07-28 11:35:46 +02:00
test_pluginstream_src.html
test_positioning.html Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
test_privatemode_perwindowpb.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
test_propertyAndMethod.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_queryContentsScaleFactor.html
test_queryContentsScaleFactorWindowed.html
test_queryCSSZoomFactor.html
test_redirect_handling.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_refresh_navigator_plugins.html Bug 1335475 - Move test_refresh_navigator_plugins to a plain mochitest.r=mconley 2017-03-08 14:49:12 -05:00
test_secondPlugin.html Bug 1279218 - Remove Java Test Plugin and rest of Java references; r=bsmedberg 2017-07-17 16:45:48 -07:00
test_src_url_change.html Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8 2017-04-12 11:10:00 +01:00
test_streamatclose.html
test_streamNotify.html Bug 1352572 - Add negative test for NPN_PostURLNotify(); r=bsmedberg 2017-04-11 13:27:50 +00:00
test_stringHandling.html
test_visibility.html
test_windowed_invalidate.html Bug 1262050 - Remove unneeded assertion and update test annotations accordingly. r=jimm 2016-04-08 12:11:44 -04:00
test_windowless_flash.html
test_windowless_ime.html Bug 1446253 - Make EventUtils.synthesizeComposition() dispatch keydown and keyup event in default r=smaug 2018-03-16 22:35:07 +09:00
test_wmode.xul Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug 2018-10-03 20:42:19 +00:00
test_x11_error_crash.html bug 1331320 test that a crashreport is generated on X11 protocol error in plugin r=glandium 2017-01-16 14:48:33 +13:00
test_xulbrowser_plugin_visibility.xul
test_zero_opacity.html Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher 2017-02-23 06:10:07 +09:00
xulbrowser_plugin_visibility.xul Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00