From acb960676c8244e261a9e0f87781f171d2d233aa Mon Sep 17 00:00:00 2001 From: Ed Lee Date: Fri, 13 Mar 2020 23:38:52 +0000 Subject: [PATCH] Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub Differential Revision: https://phabricator.services.mozilla.com/D66128 --HG-- extra : moz-landing-system : lando --- .../browser/fission/browser_nested_iframe.js | 10 +- .../tests/browser/tree/browser_aria_owns.js | 5 +- accessible/tests/mochitest/pivot.js | 3 +- browser/base/content/browser.js | 26 ++-- browser/base/content/tabbrowser.js | 2 +- .../browser_fullscreen_permissions_prompt.js | 5 +- browser/base/content/test/fullscreen/head.js | 7 +- .../content/test/general/browser_bug882977.js | 5 +- .../test/performance/browser_appmenu.js | 14 +- .../test/performance/browser_tabclose.js | 38 +++--- .../test/performance/browser_tabclose_grow.js | 28 ++-- .../test/performance/browser_tabopen.js | 54 ++++---- .../performance/browser_tabopen_squeeze.js | 28 ++-- .../browser_tabstrip_overflow_underflow.js | 14 +- .../test/performance/browser_tabswitch.js | 28 ++-- .../test/performance/browser_windowclose.js | 16 ++- browser/base/content/test/performance/head.js | 26 ++-- .../browser_check_identity_state.js | 20 ++- .../browser_no_mcb_on_http_site.js | 5 +- .../static/browser_all_files_referenced.js | 6 +- .../tabs/browser_multiselect_tabs_close.js | 5 +- ...owser_multiselect_tabs_close_other_tabs.js | 5 +- ...ultiselect_tabs_close_tabs_to_the_right.js | 5 +- ..._multiselect_tabs_close_using_shortcuts.js | 5 +- ...tiselect_tabs_drag_to_bookmarks_toolbar.js | 5 +- ...select_tabs_move_to_another_window_drag.js | 5 +- .../browser_multiselect_tabs_mute_unmute.js | 5 +- ...owser_multiselect_tabs_positional_attrs.js | 5 +- .../tabs/browser_multiselect_tabs_reorder.js | 5 +- .../tabs/browser_visibleTabs_contextMenu.js | 5 +- browser/components/BrowserGlue.jsm | 7 +- .../aboutconfig/test/browser/browser_edit.js | 12 +- .../tests/browser/browser_dismissFooter.js | 5 +- .../test/browser/browser_serviceworkers.js | 5 +- .../test/browser/browser_usercontext.js | 5 +- .../test/browser_lwt_telemetry.js | 5 +- .../test/browser_panel_keyboard_navigation.js | 2 +- .../components/extensions/parent/ext-tabs.js | 4 +- .../browser_ext_contentscript_animate.js | 5 +- .../browser_ext_pageAction_show_matches.js | 5 +- .../test/browser/browser_ext_slow_script.js | 5 +- .../test/browser/browser_ext_tabs_events.js | 10 +- .../browser/browser_ext_tabs_move_array.js | 17 ++- .../browser/browser_ext_tabs_successors.js | 5 +- ...rowser_ext_windows_create_cookieStoreId.js | 10 +- .../test/xpcshell/test_ext_topSites.js | 17 ++- .../components/fxmonitor/FirefoxMonitor.jsm | 6 +- .../migration/ChromeProfileMigrator.jsm | 5 +- .../migration/EdgeProfileMigrator.jsm | 6 +- .../components/migration/MigrationUtils.jsm | 25 ++-- .../migration/SafariProfileMigrator.jsm | 14 +- browser/components/newtab/lib/ASRouter.jsm | 25 ++-- browser/components/newtab/lib/FilterAdult.jsm | 5 +- .../newtab/lib/PersonalityProvider.jsm | 8 +- .../newtab/lib/TippyTopProvider.jsm | 8 +- .../test/unit/asrouter/ASRouter.test.js | 25 +++- .../unit/asrouter/ASRouterTargeting.test.js | 5 +- .../unit/asrouter/asrouter-content.test.jsx | 24 ++-- .../unit/asrouter/templates/FirstRun.test.jsx | 6 +- .../templates/FullPageInterrupt.test.jsx | 6 +- .../templates/OnboardingMessage.test.jsx | 56 ++++---- .../asrouter/templates/Trailhead.test.jsx | 6 +- .../newtab/test/unit/common/Dedupe.test.js | 12 +- .../CollectionCardGrid.test.jsx | 6 +- .../ImpressionStats.test.jsx | 6 +- .../lib/selectLayoutRender.test.js | 7 +- .../test/unit/lib/DiscoveryStreamFeed.test.js | 25 +++- .../newtab/test/unit/lib/FaviconFeed.test.js | 15 ++- .../test/unit/lib/HighlightsFeed.test.js | 5 +- .../newtab/test/unit/lib/Store.test.js | 13 +- .../test/unit/lib/TelemetryFeed.test.js | 20 ++- .../test/unit/lib/TopStoriesFeed.test.js | 15 ++- .../components/places/content/controller.js | 6 +- .../components/places/content/editBookmark.js | 4 +- .../tests/browser_languages_subdialog.js | 5 +- .../tests/siteData/browser_siteData2.js | 10 +- .../tests/siteData/browser_siteData3.js | 5 +- ...ser_privatebrowsing_about_search_banner.js | 10 +- .../components/sessionstore/SessionStore.jsm | 5 +- .../sessionstore/test/browser_350525.js | 10 +- .../sessionstore/test/browser_480893.js | 5 +- .../sessionstore/test/browser_capabilities.js | 10 +- .../test/browser_formdata_format.js | 5 +- .../ssb/SiteSpecificBrowserService.jsm | 36 ++--- .../tests/browser/browser_bug538331.js | 5 +- .../components/translation/BingTranslator.jsm | 5 +- .../browser/browser_locationBarCommand.js | 5 +- .../browser/browser_view_resultDisplay.js | 24 +++- .../test_UrlbarQueryContext_restrictSource.js | 21 +-- .../unit/test_UrlbarUtils_getTokenMatches.js | 83 +++++++++--- .../formautofill/FormAutofillHeuristics.jsm | 10 +- .../formautofill/FormAutofillStorage.jsm | 7 +- .../formautofill/FormAutofillUtils.jsm | 4 +- .../browser_first_time_use_doorhanger.js | 5 +- .../test/unit/test_addressRecords.js | 18 ++- .../test/unit/test_creditCardRecords.js | 8 +- .../test/unit/test_findLabelElements.js | 5 +- .../formautofill/test/unit/test_sync.js | 21 ++- .../pdfjs/content/PdfStreamConverter.jsm | 4 +- .../webcompat/about-compat/AboutCompat.jsm | 9 +- browser/modules/Sanitizer.jsm | 10 +- .../test/browser/browser_EveryWindow.js | 8 +- .../aboutdebugging/src/components/App.js | 5 +- .../src/components/ProfilerDialog.js | 5 +- .../components/AccessibilityRow.js | 9 +- .../src/components/manifest/ManifestLoader.js | 5 +- ...wser_application_panel_manifest-display.js | 6 +- .../packages/devtools-reps/src/reps/error.js | 2 +- .../devtools-reps/src/reps/stubs/grip-map.js | 6 +- .../src/utils/fetchSourceMap.js | 5 +- .../breakpoints/breakpointPositions.js | 7 +- .../src/actions/tests/file-search.spec.js | 5 +- .../src/actions/tests/navigation.spec.js | 5 +- .../client/debugger/src/components/App.js | 19 ++- .../debugger/src/components/Editor/Footer.js | 15 +-- .../src/components/Editor/InlinePreviewRow.js | 13 +- .../src/components/Editor/Preview/index.js | 13 +- .../src/components/Editor/SearchBar.js | 19 ++- .../debugger/src/components/Editor/Tab.js | 8 +- .../debugger/src/components/Editor/Tabs.js | 19 ++- .../src/components/PrimaryPanes/Outline.js | 11 +- .../components/PrimaryPanes/SourcesTree.js | 13 +- .../PrimaryPanes/SourcesTreeItem.js | 15 +-- .../src/components/PrimaryPanes/index.js | 15 +-- .../debugger/src/components/ProjectSearch.js | 19 ++- .../debugger/src/components/QuickOpenModal.js | 15 +-- .../SecondaryPanes/Breakpoints/Breakpoint.js | 29 ++-- .../Breakpoints/BreakpointHeading.js | 15 +-- .../SecondaryPanes/Breakpoints/index.js | 9 +- .../components/SecondaryPanes/CommandBar.js | 21 ++- .../SecondaryPanes/DOMMutationBreakpoints.js | 21 ++- .../SecondaryPanes/EventListeners.js | 15 +-- .../components/SecondaryPanes/Expressions.js | 27 ++-- .../components/SecondaryPanes/Frames/index.js | 15 +-- .../src/components/SecondaryPanes/Scopes.js | 23 ++-- .../src/components/SecondaryPanes/Thread.js | 9 +- .../components/SecondaryPanes/WhyPaused.js | 13 +- .../SecondaryPanes/XHRBreakpoints.js | 19 ++- .../src/components/SecondaryPanes/index.js | 19 ++- .../debugger/src/components/WelcomeBox.js | 13 +- .../src/components/shared/SearchInput.js | 2 +- .../workers/parser/tests/getScopes.spec.js | 106 ++++++++++++--- .../src/workers/parser/utils/helpers.js | 6 +- ...imation_infinity-duration_summary-graph.js | 20 ++- ...s-graph_computed-value-path_easing-hint.js | 43 ++++-- .../test/browser_animation_pseudo-element.js | 10 +- .../test/browser_animation_short-duration.js | 6 +- ...tion_summary-graph_computed-timing-path.js | 32 ++++- ...ng_negative-playback-rate_summary-graph.js | 45 +++++-- .../inspector/grids/components/GridOutline.js | 3 +- .../test_compare_fragments_geometry.js | 5 +- devtools/client/inspector/markup/test/head.js | 7 +- ...spector_search-suggests-ids-and-classes.js | 72 ++++++++-- devtools/client/memory/utils.js | 3 +- .../netmonitor/src/components/HeadersPanel.js | 9 +- .../src/components/PropertiesView.js | 9 +- .../netmonitor/src/components/SourceEditor.js | 9 +- .../src/components/previews/SourcePreview.js | 9 +- .../components/request-details/ParamsPanel.js | 11 +- .../request-details/PropertiesView.js | 9 +- .../request-list/RequestListEmptyNotice.js | 13 +- .../test/browser_net_complex-params.js | 7 +- .../test/browser_net_streaming-response.js | 5 +- .../performance-new/components/Presets.js | 5 +- .../components/RecordingButton.js | 5 +- .../performance-new/popup/menu-button.jsm.js | 2 +- .../test_perf-utils-allocations-to-samples.js | 6 +- .../test/xpcshell/test_profiler-categories.js | 5 +- .../test/xpcshell/test_tree-model-10.js | 10 +- .../shared/test/browser_cubic-bezier-07.js | 4 +- .../client/shared/test/browser_graphs-02.js | 5 +- .../client/shared/test/browser_graphs-05.js | 5 +- .../client/shared/test/browser_graphs-06.js | 5 +- .../client/shared/test/browser_graphs-07d.js | 5 +- .../client/shared/test/browser_graphs-09d.js | 5 +- .../client/shared/test/browser_graphs-09f.js | 5 +- .../storage/test/browser_storage_basic.js | 10 +- .../browser_storage_basic_usercontextid_1.js | 10 +- .../browser_storage_basic_usercontextid_2.js | 5 +- .../browser_storage_basic_with_fragment.js | 5 +- .../test/browser_storage_cookies_samesite.js | 5 +- .../test/browser_storage_delete_all.js | 20 ++- .../test/browser_storage_delete_tree.js | 10 +- .../browser_storage_delete_usercontextid.js | 10 +- .../browser_storage_dom_cache_disabled.js | 10 +- ..._storage_dynamic_updates_sessionStorage.js | 10 +- .../storage/test/browser_storage_file_url.js | 10 +- devtools/client/webconsole/components/App.js | 5 +- .../components/Input/ConfirmDialog.js | 8 +- .../components/Input/EagerEvaluation.js | 5 +- .../webconsole/components/Input/JSTerm.js | 5 +- .../browser/browser_webconsole_async_stack.js | 6 +- .../browser_webconsole_console_table.js | 125 +++++++++++++++--- ...bconsole_console_table_post_alterations.js | 17 ++- ...onsole_context_menu_copy_entire_message.js | 5 +- ...menu_copy_message_with_async_stacktrace.js | 5 +- ..._copy_message_with_framework_stacktrace.js | 5 +- .../browser_webconsole_worklet_error.js | 5 +- .../server/actors/highlighters/css-grid.js | 7 +- .../actors/highlighters/css-transform.js | 2 +- devtools/server/actors/highlighters/shapes.js | 16 ++- .../actors/highlighters/utils/canvas.js | 7 +- devtools/server/actors/inspector/walker.js | 5 +- devtools/server/actors/object.js | 4 +- .../webconsole/eager-function-whitelist.js | 10 +- .../webconsole/webidl-pure-whitelist.js | 5 +- .../browser_accessibility_simulator.js | 5 +- .../browser_animation_emitMutations.js | 5 +- .../tests/browser/browser_inspector-search.js | 10 +- .../tests/xpcshell/test_objectgrips-07.js | 9 +- .../tests/xpcshell/test_objectgrips-20.js | 91 ++++++++++--- .../xpcshell/test_objectgrips-fn-apply-01.js | 14 +- devtools/shared/fronts/walker.js | 6 +- .../shared/heapsnapshot/DominatorTreeNode.js | 5 +- .../heapsnapshot/HeapSnapshotFileUtils.js | 5 +- .../test_HeapAnalyses_takeCensus_04.js | 6 +- .../test_HeapSnapshot_takeCensus_09.js | 6 +- .../test_perf-utils-allocations-to-samples.js | 6 +- devtools/shared/security/socket.js | 4 +- .../shared/tests/xpcshell/test_flatten.js | 6 +- .../xpcshell/test_js_property_provider.js | 5 +- .../browser_timelineMarkers-frame-02.js | 30 ++++- .../test/browser/browser_cache_pb_window.js | 5 +- dom/console/tests/xpcshell/test_formatting.js | 10 +- .../ipc/tests/browser_ipcBlob_temporary.js | 5 +- dom/file/tests/test_createFile.js | 5 +- dom/indexedDB/test/unit/test_multientry.js | 45 ++++++- dom/localstorage/test/helpers.js | 5 +- dom/media/IdpSandbox.jsm | 7 +- .../test/mochitest/NotificationTest.js | 3 +- dom/push/PushCrypto.jsm | 14 +- dom/serviceworkers/test/fetch/fetch_tests.js | 5 +- dom/tests/browser/browser_noopener.js | 15 ++- .../mochitest/fetch/test_fetch_basic_http.js | 10 +- .../mochitest/fetch/test_headers_common.js | 20 ++- .../geolocation/geolocation_common.js | 5 +- .../localstorage/localStorageCommon.js | 5 +- dom/url/tests/urlSearchParams_commons.js | 5 +- gfx/layers/layerviewer/layerTreeView.js | 6 +- .../test_localeService_negotiateLanguages.js | 24 +++- ipc/testshell/tests/test_ipcshell.js | 9 +- .../style/test/browser_sourcemap_comment.js | 4 +- .../style/test/browser_sourceurl_comment.js | 4 +- .../dns/mdns/libmdns/MulticastDNSAndroid.jsm | 12 +- netwerk/test/httpserver/httpd.js | 5 +- netwerk/test/unit/test_cache_jar.js | 14 +- netwerk/test/unit/test_data_protocol.js | 4 +- netwerk/test/unit/test_defaultURI.js | 10 +- remote/Sync.jsm | 3 +- .../browser/page/browser_captureScreenshot.js | 12 +- .../manager/pki/resources/content/pippki.js | 7 +- .../common/tests/unit/test_storage_adapter.js | 5 +- .../tests/unit/test_tokenserverclient.js | 5 +- services/sync/modules/service.js | 12 +- services/sync/tests/tps/test_bug575423.js | 20 ++- services/sync/tests/tps/test_history.js | 40 ++++-- .../sync/tests/tps/test_history_collision.js | 15 ++- services/sync/tests/tps/test_sync.js | 40 ++++-- .../sync/tests/unit/test_bookmark_record.js | 5 +- .../tests/unit/test_bookmark_validator.js | 88 +++++++----- .../sync/tests/unit/test_history_engine.js | 8 +- .../sync/tests/unit/test_records_crypto.js | 8 +- .../tests/unit/test_service_detect_upgrade.js | 6 +- .../sync/tests/unit/test_service_startup.js | 10 +- .../sync/tests/unit/test_syncscheduler.js | 6 +- storage/test/unit/test_retry_on_busy.js | 5 +- testing/marionette/assert.js | 24 ++-- testing/marionette/error.js | 2 +- testing/marionette/listener.js | 5 +- testing/marionette/sync.js | 3 +- testing/mochitest/server.js | 2 +- .../specialpowers/content/MockFilePicker.jsm | 5 +- .../content/SpecialPowersChild.jsm | 8 +- .../content/tests/webconsole/objectexpand.js | 2 +- .../asyncshutdown/AsyncShutdown.jsm | 5 +- .../cleardata/tests/browser/browser_quota.js | 5 +- .../unit_cps2/test_getCachedSubdomains.js | 38 +++++- .../tests/unit_cps2/test_getSubdomains.js | 8 +- .../tests/unit_cps2/test_remove.js | 45 +++++-- .../tests/unit_cps2/test_removeAllDomains.js | 10 +- .../unit_cps2/test_removeAllDomainsSince.js | 10 +- .../tests/unit_cps2/test_removeByDomain.js | 23 +++- .../tests/unit_cps2/test_removeByName.js | 17 ++- .../tests/unit_cps2/test_setGet.js | 16 ++- .../ContextualIdentityService.jsm | 5 +- .../extensions/ProfilerGetSymbols-worker.js | 5 +- .../test/xpcshell/test_ext_downloads_misc.js | 5 +- .../xpcshell/test_ext_performance_counters.js | 5 +- .../test/xpcshell/test_ext_storage_sync.js | 56 +++----- .../kvstore/test/xpcshell/test_kvstore.js | 11 +- .../normandy/content/AboutPages.jsm | 11 +- .../normandy/lib/PreferenceExperiments.jsm | 4 +- .../test/browser/browser_RecipeRunner.js | 6 +- .../components/normandy/test/browser/head.js | 25 ++-- .../osfile/modules/osfile_async_front.jsm | 8 +- .../passwordmgr/LoginManagerChild.jsm | 4 +- toolkit/components/places/PlacesDBUtils.jsm | 19 ++- .../components/places/PlacesExpiration.jsm | 6 +- .../places/tests/bookmarks/test_388695.js | 26 ++-- .../tests/bookmarks/test_async_observers.js | 20 +-- .../bookmarks/test_bookmarks_insertTree.js | 12 +- .../places/tests/bookmarks/test_tags.js | 26 ++-- .../favicons/test_expire_migrated_icons.js | 5 +- .../tests/favicons/test_incremental_vacuum.js | 18 +-- .../tests/history/test_fetchAnnotatedPages.js | 5 +- .../places/tests/legacy/test_bookmarks.js | 24 ++-- .../test_preventive_maintenance.js | 56 +++++--- .../tests/migration/test_current_from_v36.js | 5 +- .../tests/migration/test_current_from_v41.js | 6 +- .../tests/migration/test_current_from_v47.js | 10 +- .../tests/sync/test_bookmark_abort_merging.js | 10 +- .../tests/sync/test_bookmark_deduping.js | 29 ++-- .../tests/sync/test_bookmark_value_changes.js | 6 +- .../places/tests/sync/test_sync_utils.js | 8 +- .../unifiedcomplete/test_swap_protocol.js | 15 ++- .../tests/unit/test_promiseBookmarksTree.js | 5 +- .../tests/unit/test_sql_function_origin.js | 18 ++- .../tests/xpcshell/test_Promise.js | 9 +- .../tests/browser/browser_documentChannel.js | 10 +- .../browser_httpCrossOriginOpenerPolicy.js | 5 +- toolkit/components/search/SearchService.jsm | 6 +- .../search/tests/xpcshell/head_search.js | 2 +- .../telemetry/app/TelemetryController.jsm | 13 +- .../telemetry/app/TelemetrySend.jsm | 5 +- .../components/telemetry/pings/UpdatePing.jsm | 18 ++- .../components/telemetry/tests/unit/head.js | 10 +- .../telemetry/tests/unit/test_HealthPing.js | 5 +- .../tests/unit/test_SubsessionChaining.js | 5 +- .../tests/unit/test_TelemetryController.js | 5 +- .../tests/unit/test_TelemetryEvents.js | 60 +++++++-- .../unit/test_TelemetryEvents_buildFaster.js | 4 +- .../tests/unit/test_TelemetryLateWrites.js | 14 +- .../tests/unit/test_TelemetrySession.js | 75 ++++++++--- ...t_TelemetrySession_abortedSessionQueued.js | 10 +- .../tests/utils/TelemetryTestUtils.jsm | 12 +- toolkit/content/aboutSupport.js | 12 +- toolkit/content/contentAreaUtils.js | 6 +- toolkit/content/editMenuOverlay.js | 2 +- .../browser_autoplay_policy_touchScroll.js | 5 +- .../browser/browser_autoplay_videoDocument.js | 7 +- .../tests/browser/browser_media_wakelock.js | 5 +- .../content/widgets/browser-custom-element.js | 3 +- toolkit/crashreporter/CrashSubmit.jsm | 3 +- .../browser/browser_aboutCrashesResubmit.js | 8 +- toolkit/modules/CharsetMenu.jsm | 6 +- toolkit/modules/FinderHighlighter.jsm | 15 ++- toolkit/modules/FinderParent.jsm | 7 +- .../test/xpcshell/test_subprocess.js | 6 +- .../browser/browser_FinderHighlighter.js | 5 +- .../browser/browser_FinderHighlighter2.js | 5 +- toolkit/modules/tests/xpcshell/test_Http.js | 5 +- toolkit/modules/tests/xpcshell/test_sqlite.js | 10 +- toolkit/mozapps/downloads/HelperAppDlg.jsm | 28 ++-- .../browser/browser_page_options_updates.js | 5 +- .../browser/browser_webapi_abuse_report.js | 10 +- .../rs-blocklist/test_blocklist_osabi.js | 20 ++- .../test/xpcshell/test_system_delay_update.js | 3 +- 357 files changed, 2996 insertions(+), 1502 deletions(-) diff --git a/accessible/tests/browser/fission/browser_nested_iframe.js b/accessible/tests/browser/fission/browser_nested_iframe.js index 720b3f0cd61c6..e2ffb87c9faf4 100644 --- a/accessible/tests/browser/fission/browser_nested_iframe.js +++ b/accessible/tests/browser/fission/browser_nested_iframe.js @@ -49,10 +49,12 @@ addAccessibleTask( const state = {}; nestedDocAcc.getState(state, {}); if (state.value & STATE_BUSY) { - nestedDocAcc = (await waitForEvent( - EVENT_DOCUMENT_LOAD_COMPLETE, - NESTED_IFRAME_DOC_BODY_ID - )).accessible; + nestedDocAcc = ( + await waitForEvent( + EVENT_DOCUMENT_LOAD_COMPLETE, + NESTED_IFRAME_DOC_BODY_ID + ) + ).accessible; } if (gIsRemoteIframe) { diff --git a/accessible/tests/browser/tree/browser_aria_owns.js b/accessible/tests/browser/tree/browser_aria_owns.js index 4e3fdf0c189f2..084ac83fea81c 100644 --- a/accessible/tests/browser/tree/browser_aria_owns.js +++ b/accessible/tests/browser/tree/browser_aria_owns.js @@ -194,7 +194,10 @@ addAccessibleTask( let two = findAccessibleChildByID(accDoc, "two"); let waitfor = { - expected: [[EVENT_REORDER, "one"], [EVENT_REORDER, "two"]], + expected: [ + [EVENT_REORDER, "one"], + [EVENT_REORDER, "two"], + ], }; await contentSpawnMutation(browser, waitfor, function() { diff --git a/accessible/tests/mochitest/pivot.js b/accessible/tests/mochitest/pivot.js index 514ecc551572a..61d3b828eb7c1 100644 --- a/accessible/tests/mochitest/pivot.js +++ b/accessible/tests/mochitest/pivot.js @@ -56,7 +56,8 @@ var ObjectTraversalRule = { var role = aAccessible.role; if ( hasState(aAccessible, STATE_FOCUSABLE) && - (role != ROLE_DOCUMENT && role != ROLE_INTERNAL_FRAME) + role != ROLE_DOCUMENT && + role != ROLE_INTERNAL_FRAME ) { rv = FILTER_IGNORE_SUBTREE | FILTER_MATCH; } else if ( diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 70862cbf33ce2..705c1b7316c72 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -8050,8 +8050,8 @@ function warnAboutClosingWindow() { // closing multiple tabs. return ( AppConstants.platform != "macosx" || - (isPBWindow || - gBrowser.warnAboutClosingTabs(closingTabs, gBrowser.closingTabsEnum.ALL)) + isPBWindow || + gBrowser.warnAboutClosingTabs(closingTabs, gBrowser.closingTabsEnum.ALL) ); } @@ -8274,20 +8274,22 @@ const gAccessibilityServiceIndicator = { if (this.enabled && accessibilityEnabled) { this._active = true; document.documentElement.setAttribute("accessibilitymode", "true"); - [...document.querySelectorAll(".accessibility-indicator")].forEach( - indicator => - ["click", "keypress"].forEach(type => - indicator.addEventListener(type, this) - ) + [ + ...document.querySelectorAll(".accessibility-indicator"), + ].forEach(indicator => + ["click", "keypress"].forEach(type => + indicator.addEventListener(type, this) + ) ); } else if (this._active) { this._active = false; document.documentElement.removeAttribute("accessibilitymode"); - [...document.querySelectorAll(".accessibility-indicator")].forEach( - indicator => - ["click", "keypress"].forEach(type => - indicator.removeEventListener(type, this) - ) + [ + ...document.querySelectorAll(".accessibility-indicator"), + ].forEach(indicator => + ["click", "keypress"].forEach(type => + indicator.removeEventListener(type, this) + ) ); } }, diff --git a/browser/base/content/tabbrowser.js b/browser/base/content/tabbrowser.js index e00f0bf4a81e7..5838601d4a8de 100644 --- a/browser/base/content/tabbrowser.js +++ b/browser/base/content/tabbrowser.js @@ -2071,7 +2071,7 @@ // Use the JSM global to create the permanentKey, so that if the // permanentKey is held by something after this window closes, it // doesn't keep the window alive. - b.permanentKey = new (Cu.getGlobalForObject(Services)).Object(); + b.permanentKey = new (Cu.getGlobalForObject(Services).Object)(); const defaultBrowserAttributes = { contextmenu: "contentAreaContextMenu", diff --git a/browser/base/content/test/fullscreen/browser_fullscreen_permissions_prompt.js b/browser/base/content/test/fullscreen/browser_fullscreen_permissions_prompt.js index bbfb6b1ef28ac..fe720c1042763 100644 --- a/browser/base/content/test/fullscreen/browser_fullscreen_permissions_prompt.js +++ b/browser/base/content/test/fullscreen/browser_fullscreen_permissions_prompt.js @@ -25,7 +25,10 @@ async function requestCameraPermission(browser) { return SpecialPowers.spawn(browser, [], () => content.navigator.mediaDevices .getUserMedia({ video: true, fake: true }) - .then(() => true, () => false) + .then( + () => true, + () => false + ) ); } diff --git a/browser/base/content/test/fullscreen/head.js b/browser/base/content/test/fullscreen/head.js index 4b04d951ea232..781ab18f05a5f 100644 --- a/browser/base/content/test/fullscreen/head.js +++ b/browser/base/content/test/fullscreen/head.js @@ -94,10 +94,9 @@ async function jsWindowOpen(browser, iframeId) { let destWin = content; if (args.iframeId) { // Create a cross origin iframe - destWin = (await content.wrappedJSObject.createIframe( - args.iframeId, - true - )).contentWindow; + destWin = ( + await content.wrappedJSObject.createIframe(args.iframeId, true) + ).contentWindow; } // Send message to either the iframe or the current page to open a popup await content.wrappedJSObject.sendMessage(destWin, "open"); diff --git a/browser/base/content/test/general/browser_bug882977.js b/browser/base/content/test/general/browser_bug882977.js index ba947fbc452e7..abfbdc826ae3e 100644 --- a/browser/base/content/test/general/browser_bug882977.js +++ b/browser/base/content/test/general/browser_bug882977.js @@ -7,7 +7,10 @@ add_task(async function() { let homepage = "about:preferences"; await SpecialPowers.pushPrefEnv({ - set: [["browser.startup.homepage", homepage], ["browser.startup.page", 1]], + set: [ + ["browser.startup.homepage", homepage], + ["browser.startup.page", 1], + ], }); let win = OpenBrowserWindow(); diff --git a/browser/base/content/test/performance/browser_appmenu.js b/browser/base/content/test/performance/browser_appmenu.js index 21a0bbfd80a12..e4a8f3d17df68 100644 --- a/browser/base/content/test/performance/browser_appmenu.js +++ b/browser/base/content/test/performance/browser_appmenu.js @@ -59,12 +59,14 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect the menu button to get into the active state. - ( - r.y1 >= menuButtonRect.top && - r.y2 <= menuButtonRect.bottom && - r.x1 >= menuButtonRect.left && - r.x2 <= menuButtonRect.right + !( + // We expect the menu button to get into the active state. + ( + r.y1 >= menuButtonRect.top && + r.y2 <= menuButtonRect.bottom && + r.x1 >= menuButtonRect.left && + r.x2 <= menuButtonRect.right + ) ) // XXX For some reason the menu panel isn't in our screenshots, // but that's where we actually expect many changes. diff --git a/browser/base/content/test/performance/browser_tabclose.js b/browser/base/content/test/performance/browser_tabclose.js index edd2b3049d9d7..fb54b9ae70cfc 100644 --- a/browser/base/content/test/performance/browser_tabclose.js +++ b/browser/base/content/test/performance/browser_tabclose.js @@ -43,24 +43,26 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect all changes to be within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right && - // The closed tab should disappear at the same time as the previous - // tab gets selected, causing both tab areas to change color at once: - // this should be a single rect of the width of 2 tabs, and can - // include the '+' button if it starts its animation. - ((r.w > gBrowser.selectedTab.clientWidth && - r.x2 <= newTabButtonRect.right) || - // The '+' icon moves with an animation. At the end of the animation - // the former and new positions can touch each other causing the rect - // to have twice the icon's width. - (r.h == 14 && r.w <= 2 * 14 + kMaxEmptyPixels) || - // We sometimes have a rect for the right most 2px of the '+' button. - (r.h == 2 && r.w == 2)) + !( + // We expect all changes to be within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right && + // The closed tab should disappear at the same time as the previous + // tab gets selected, causing both tab areas to change color at once: + // this should be a single rect of the width of 2 tabs, and can + // include the '+' button if it starts its animation. + ((r.w > gBrowser.selectedTab.clientWidth && + r.x2 <= newTabButtonRect.right) || + // The '+' icon moves with an animation. At the end of the animation + // the former and new positions can touch each other causing the rect + // to have twice the icon's width. + (r.h == 14 && r.w <= 2 * 14 + kMaxEmptyPixels) || + // We sometimes have a rect for the right most 2px of the '+' button. + (r.h == 2 && r.w == 2)) + ) ) ), exceptions: [ diff --git a/browser/base/content/test/performance/browser_tabclose_grow.js b/browser/base/content/test/performance/browser_tabclose_grow.js index d403ae6ec6b65..4d2231634823a 100644 --- a/browser/base/content/test/performance/browser_tabclose_grow.js +++ b/browser/base/content/test/performance/browser_tabclose_grow.js @@ -58,19 +58,21 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect plenty of changed rects within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right && - // It would make sense for each rect to have a width smaller than - // a tab (ie. tabstrip.width / tabcount), but tabs are small enough - // that they sometimes get reported in the same rect. - // So we accept up to the width of n-1 tabs. - r.w <= - (gBrowser.tabs.length - 1) * - Math.ceil(tabStripRect.width / gBrowser.tabs.length) + !( + // We expect plenty of changed rects within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right && + // It would make sense for each rect to have a width smaller than + // a tab (ie. tabstrip.width / tabcount), but tabs are small enough + // that they sometimes get reported in the same rect. + // So we accept up to the width of n-1 tabs. + r.w <= + (gBrowser.tabs.length - 1) * + Math.ceil(tabStripRect.width / gBrowser.tabs.length) + ) ) ), }, diff --git a/browser/base/content/test/performance/browser_tabopen.js b/browser/base/content/test/performance/browser_tabopen.js index 064293897848d..be49311f92d44 100644 --- a/browser/base/content/test/performance/browser_tabopen.js +++ b/browser/base/content/test/performance/browser_tabopen.js @@ -58,32 +58,34 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect all changes to be within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right && - // The first tab should get deselected at the same time as the next - // tab starts appearing, so we should have one rect that includes the - // first tab but is wider. - ((inRange(r.w, firstTabRect.width, firstTabRect.width * 2) && - r.x1 == firstTabRect.x) || - // The second tab gets painted several times due to tabopen animation. - (inRange( - r.x1, - firstTabRect.right - 1, // -1 for the border on Win7 - firstTabRect.right + firstTabRect.width - ) && - r.x2 < firstTabRect.right + firstTabRect.width + 25) || // The + 25 is because sometimes the '+' is in the same rect. - // The '+' icon moves with an animation. At the end of the animation - // the former and new positions can touch each other causing the rect - // to have twice the icon's width. - (r.h == 14 && r.w <= 2 * 14 + kMaxEmptyPixels) || - // We sometimes have a rect for the right most 2px of the '+' button. - (r.h == 2 && r.w == 2) || - // Same for the 'X' icon. - (r.h == 10 && r.w <= 2 * 10)) + !( + // We expect all changes to be within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right && + // The first tab should get deselected at the same time as the next + // tab starts appearing, so we should have one rect that includes the + // first tab but is wider. + ((inRange(r.w, firstTabRect.width, firstTabRect.width * 2) && + r.x1 == firstTabRect.x) || + // The second tab gets painted several times due to tabopen animation. + (inRange( + r.x1, + firstTabRect.right - 1, // -1 for the border on Win7 + firstTabRect.right + firstTabRect.width + ) && + r.x2 < firstTabRect.right + firstTabRect.width + 25) || // The + 25 is because sometimes the '+' is in the same rect. + // The '+' icon moves with an animation. At the end of the animation + // the former and new positions can touch each other causing the rect + // to have twice the icon's width. + (r.h == 14 && r.w <= 2 * 14 + kMaxEmptyPixels) || + // We sometimes have a rect for the right most 2px of the '+' button. + (r.h == 2 && r.w == 2) || + // Same for the 'X' icon. + (r.h == 10 && r.w <= 2 * 10)) + ) ) ), exceptions: [ diff --git a/browser/base/content/test/performance/browser_tabopen_squeeze.js b/browser/base/content/test/performance/browser_tabopen_squeeze.js index 126d3bff22629..0588c3e478291 100644 --- a/browser/base/content/test/performance/browser_tabopen_squeeze.js +++ b/browser/base/content/test/performance/browser_tabopen_squeeze.js @@ -54,19 +54,21 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect plenty of changed rects within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right && - // It would make sense for each rect to have a width smaller than - // a tab (ie. tabstrip.width / tabcount), but tabs are small enough - // that they sometimes get reported in the same rect. - // So we accept up to the width of n-1 tabs. - r.w <= - (gBrowser.tabs.length - 1) * - Math.ceil(tabStripRect.width / gBrowser.tabs.length) + !( + // We expect plenty of changed rects within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right && + // It would make sense for each rect to have a width smaller than + // a tab (ie. tabstrip.width / tabcount), but tabs are small enough + // that they sometimes get reported in the same rect. + // So we accept up to the width of n-1 tabs. + r.w <= + (gBrowser.tabs.length - 1) * + Math.ceil(tabStripRect.width / gBrowser.tabs.length) + ) ) ), exceptions: [ diff --git a/browser/base/content/test/performance/browser_tabstrip_overflow_underflow.js b/browser/base/content/test/performance/browser_tabstrip_overflow_underflow.js index 090897284a872..84a84ae4e5859 100644 --- a/browser/base/content/test/performance/browser_tabstrip_overflow_underflow.js +++ b/browser/base/content/test/performance/browser_tabstrip_overflow_underflow.js @@ -47,12 +47,14 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect plenty of changed rects within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right + !( + // We expect plenty of changed rects within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right + ) ) ), exceptions: [ diff --git a/browser/base/content/test/performance/browser_tabswitch.js b/browser/base/content/test/performance/browser_tabswitch.js index 691a8ef484ce6..db2e7388b398f 100644 --- a/browser/base/content/test/performance/browser_tabswitch.js +++ b/browser/base/content/test/performance/browser_tabswitch.js @@ -56,19 +56,21 @@ add_task(async function() { filter: rects => rects.filter( r => - !// We expect all changes to be within the tab strip. - ( - r.y1 >= tabStripRect.top && - r.y2 <= tabStripRect.bottom && - r.x1 >= tabStripRect.left && - r.x2 <= tabStripRect.right && - // The tab selection changes between 2 adjacent tabs, so we expect - // both to change color at once: this should be a single rect of the - // width of 2 tabs. - inRange( - r.w, - (origTab.clientWidth - 1) * 2, // -1 for the border on Win7 - origTab.clientWidth * 2 + !( + // We expect all changes to be within the tab strip. + ( + r.y1 >= tabStripRect.top && + r.y2 <= tabStripRect.bottom && + r.x1 >= tabStripRect.left && + r.x2 <= tabStripRect.right && + // The tab selection changes between 2 adjacent tabs, so we expect + // both to change color at once: this should be a single rect of the + // width of 2 tabs. + inRange( + r.w, + (origTab.clientWidth - 1) * 2, // -1 for the border on Win7 + origTab.clientWidth * 2 + ) ) ) ), diff --git a/browser/base/content/test/performance/browser_windowclose.js b/browser/base/content/test/performance/browser_windowclose.js index 5165f11ab8795..ed885853ea477 100644 --- a/browser/base/content/test/performance/browser_windowclose.js +++ b/browser/base/content/test/performance/browser_windowclose.js @@ -59,13 +59,15 @@ add_task(async function() { filter: rects => rects.filter( r => - !// The dropmarker is visible when the window opens and sometimes hasn't - // finished its transition to opacity: 0 by the time waitForFocus resolves. - ( - r.x1 >= dropmarkerRect.left - 1 && - r.x2 <= dropmarkerRect.right + 1 && - r.y1 >= dropmarkerRect.top && - r.y2 <= dropmarkerRect.bottom + !( + // The dropmarker is visible when the window opens and sometimes hasn't + // finished its transition to opacity: 0 by the time waitForFocus resolves. + ( + r.x1 >= dropmarkerRect.left - 1 && + r.x2 <= dropmarkerRect.right + 1 && + r.y1 >= dropmarkerRect.top && + r.y2 <= dropmarkerRect.bottom + ) ) ), }, diff --git a/browser/base/content/test/performance/head.js b/browser/base/content/test/performance/head.js index c2bcd818c73e8..28d7d9e90ab22 100644 --- a/browser/base/content/test/performance/head.js +++ b/browser/base/content/test/performance/head.js @@ -798,18 +798,20 @@ async function runUrlbarTest( filter: rects => rects.filter( r => - !// We put text into the urlbar so expect its textbox to change. - ( - (r.x1 >= Math.floor(textBoxRect.left) && - r.x2 <= Math.ceil(textBoxRect.right) && - r.y1 >= Math.floor(textBoxRect.top) && - r.y2 <= Math.ceil(textBoxRect.bottom)) || - // The dropmarker is displayed as active during some of the test. - // dropmarkerRect.left isn't always an integer. - (r.x1 >= Math.floor(dropmarkerRect.left) && - r.x2 <= Math.ceil(dropmarkerRect.right) && - r.y1 >= Math.floor(dropmarkerRect.top) && - r.y2 <= Math.ceil(dropmarkerRect.bottom)) + !( + // We put text into the urlbar so expect its textbox to change. + ( + (r.x1 >= Math.floor(textBoxRect.left) && + r.x2 <= Math.ceil(textBoxRect.right) && + r.y1 >= Math.floor(textBoxRect.top) && + r.y2 <= Math.ceil(textBoxRect.bottom)) || + // The dropmarker is displayed as active during some of the test. + // dropmarkerRect.left isn't always an integer. + (r.x1 >= Math.floor(dropmarkerRect.left) && + r.x2 <= Math.ceil(dropmarkerRect.right) && + r.y1 >= Math.floor(dropmarkerRect.top) && + r.y2 <= Math.ceil(dropmarkerRect.bottom)) + ) ) ), }; diff --git a/browser/base/content/test/siteIdentity/browser_check_identity_state.js b/browser/base/content/test/siteIdentity/browser_check_identity_state.js index cefdb846d441c..42b8efc7b8b03 100644 --- a/browser/base/content/test/siteIdentity/browser_check_identity_state.js +++ b/browser/base/content/test/siteIdentity/browser_check_identity_state.js @@ -121,7 +121,10 @@ add_task(async function test_webpage_text_warning() { async function webpageTestTextWarningCombined(secureCheck) { await SpecialPowers.pushPrefEnv({ - set: [[INSECURE_TEXT_PREF, secureCheck], [INSECURE_ICON_PREF, secureCheck]], + set: [ + [INSECURE_TEXT_PREF, secureCheck], + [INSECURE_ICON_PREF, secureCheck], + ], }); let oldTab = await loadNewTab("about:robots"); @@ -579,10 +582,19 @@ async function pbModeTest(prefs, secureCheck) { } add_task(async function test_pb_mode() { - let prefs = [[INSECURE_ICON_PREF, true], [INSECURE_PBMODE_ICON_PREF, true]]; + let prefs = [ + [INSECURE_ICON_PREF, true], + [INSECURE_PBMODE_ICON_PREF, true], + ]; await pbModeTest(prefs, true); - prefs = [[INSECURE_ICON_PREF, false], [INSECURE_PBMODE_ICON_PREF, true]]; + prefs = [ + [INSECURE_ICON_PREF, false], + [INSECURE_PBMODE_ICON_PREF, true], + ]; await pbModeTest(prefs, true); - prefs = [[INSECURE_ICON_PREF, false], [INSECURE_PBMODE_ICON_PREF, false]]; + prefs = [ + [INSECURE_ICON_PREF, false], + [INSECURE_PBMODE_ICON_PREF, false], + ]; await pbModeTest(prefs, false); }); diff --git a/browser/base/content/test/siteIdentity/browser_no_mcb_on_http_site.js b/browser/base/content/test/siteIdentity/browser_no_mcb_on_http_site.js index d1463a31e9e53..5d4d5ecf82046 100644 --- a/browser/base/content/test/siteIdentity/browser_no_mcb_on_http_site.js +++ b/browser/base/content/test/siteIdentity/browser_no_mcb_on_http_site.js @@ -40,7 +40,10 @@ function cleanUpAfterTests() { add_task(async function init() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_ACTIVE, true], [PREF_DISPLAY, true]], + set: [ + [PREF_ACTIVE, true], + [PREF_DISPLAY, true], + ], }); let url = HTTP_TEST_ROOT + "test_no_mcb_on_http_site_img.html"; let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url); diff --git a/browser/base/content/test/static/browser_all_files_referenced.js b/browser/base/content/test/static/browser_all_files_referenced.js index a081d0817e11f..17ad5e0b131d4 100644 --- a/browser/base/content/test/static/browser_all_files_referenced.js +++ b/browser/base/content/test/static/browser_all_files_referenced.js @@ -806,9 +806,9 @@ add_task(async function checkAllTheFiles() { // read the contents. This will populate gExtensionRoots with all // embedded extension APIs, and return any manifest.json files that aren't // webextensions. - let nonWebextManifests = (await Promise.all( - jsonManifests.map(parseJsonManifest) - )).filter(uri => !!uri); + let nonWebextManifests = ( + await Promise.all(jsonManifests.map(parseJsonManifest)) + ).filter(uri => !!uri); uris.push(...nonWebextManifests); addActorModules(); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_close.js b/browser/base/content/test/tabs/browser_multiselect_tabs_close.js index 1a3bcd0eb07f5..7db4edc036c10 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_close.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_close.js @@ -3,7 +3,10 @@ const PREF_WARN_ON_CLOSE = "browser.tabs.warnOnCloseOtherTabs"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_WARN_ON_CLOSE, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_WARN_ON_CLOSE, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_close_other_tabs.js b/browser/base/content/test/tabs/browser_multiselect_tabs_close_other_tabs.js index df5efe6bcd19f..efeac9d6da146 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_close_other_tabs.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_close_other_tabs.js @@ -3,7 +3,10 @@ const PREF_WARN_ON_CLOSE = "browser.tabs.warnOnCloseOtherTabs"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_WARN_ON_CLOSE, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_WARN_ON_CLOSE, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_close_tabs_to_the_right.js b/browser/base/content/test/tabs/browser_multiselect_tabs_close_tabs_to_the_right.js index 2f29ba703e352..9ab7c58ebff9b 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_close_tabs_to_the_right.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_close_tabs_to_the_right.js @@ -3,7 +3,10 @@ const PREF_WARN_ON_CLOSE = "browser.tabs.warnOnCloseOtherTabs"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_WARN_ON_CLOSE, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_WARN_ON_CLOSE, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_close_using_shortcuts.js b/browser/base/content/test/tabs/browser_multiselect_tabs_close_using_shortcuts.js index b6a3b95bf3d1f..ca5db7fc79f24 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_close_using_shortcuts.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_close_using_shortcuts.js @@ -3,7 +3,10 @@ const PREF_WARN_ON_CLOSE = "browser.tabs.warnOnCloseOtherTabs"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_WARN_ON_CLOSE, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_WARN_ON_CLOSE, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_drag_to_bookmarks_toolbar.js b/browser/base/content/test/tabs/browser_multiselect_tabs_drag_to_bookmarks_toolbar.js index c62b00fcbdd20..af48eb5646f58 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_drag_to_bookmarks_toolbar.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_drag_to_bookmarks_toolbar.js @@ -3,7 +3,10 @@ const PREF_ANIMATIONS_ENABLED = "toolkit.cosmeticAnimations.enabled"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_ANIMATIONS_ENABLED, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_ANIMATIONS_ENABLED, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_move_to_another_window_drag.js b/browser/base/content/test/tabs/browser_multiselect_tabs_move_to_another_window_drag.js index 4cdfab1cc83e7..bf70583ef31be 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_move_to_another_window_drag.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_move_to_another_window_drag.js @@ -3,7 +3,10 @@ const PREF_ANIMATIONS_ENABLED = "toolkit.cosmeticAnimations.enabled"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_ANIMATIONS_ENABLED, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_ANIMATIONS_ENABLED, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js b/browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js index 305deb6a82b5b..4725fe5651056 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js @@ -20,7 +20,10 @@ async function addMediaTab() { add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_DELAY_AUTOPLAY, true]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_DELAY_AUTOPLAY, true], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_positional_attrs.js b/browser/base/content/test/tabs/browser_multiselect_tabs_positional_attrs.js index 00721b58b7d21..74e07a4977351 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_positional_attrs.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_positional_attrs.js @@ -3,7 +3,10 @@ const PREF_WARN_ON_CLOSE = "browser.tabs.warnOnCloseOtherTabs"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_WARN_ON_CLOSE, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_WARN_ON_CLOSE, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_multiselect_tabs_reorder.js b/browser/base/content/test/tabs/browser_multiselect_tabs_reorder.js index 11b2330111d0a..dcda42b787455 100644 --- a/browser/base/content/test/tabs/browser_multiselect_tabs_reorder.js +++ b/browser/base/content/test/tabs/browser_multiselect_tabs_reorder.js @@ -6,7 +6,10 @@ const PREF_ANIMATION = "toolkit.cosmeticAnimations.enabled"; add_task(async function setPref() { await SpecialPowers.pushPrefEnv({ - set: [[PREF_MULTISELECT_TABS, true], [PREF_ANIMATION, false]], + set: [ + [PREF_MULTISELECT_TABS, true], + [PREF_ANIMATION, false], + ], }); }); diff --git a/browser/base/content/test/tabs/browser_visibleTabs_contextMenu.js b/browser/base/content/test/tabs/browser_visibleTabs_contextMenu.js index bb12cd693b10d..501172c9847e9 100644 --- a/browser/base/content/test/tabs/browser_visibleTabs_contextMenu.js +++ b/browser/base/content/test/tabs/browser_visibleTabs_contextMenu.js @@ -2,7 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const remoteClientsFixture = [{ id: 1, name: "Foo" }, { id: 2, name: "Bar" }]; +const remoteClientsFixture = [ + { id: 1, name: "Foo" }, + { id: 2, name: "Bar" }, +]; add_task(async function test() { // There should be one tab when we start the test diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index 7683a8de8df2f..78fde3a9444b0 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -3589,7 +3589,12 @@ BrowserGlue.prototype = { // the pref was "suggestion:4,general:5" (modulo whitespace), we're done. if (prefValue) { let buckets = PlacesUtils.convertMatchBucketsStringToArray(prefValue); - if (ObjectUtils.deepEqual(buckets, [["suggestion", 4], ["general", 5]])) { + if ( + ObjectUtils.deepEqual(buckets, [ + ["suggestion", 4], + ["general", 5], + ]) + ) { return; } } diff --git a/browser/components/aboutconfig/test/browser/browser_edit.js b/browser/components/aboutconfig/test/browser/browser_edit.js index b15f00fcd112f..fd401dcb79672 100644 --- a/browser/components/aboutconfig/test/browser/browser_edit.js +++ b/browser/components/aboutconfig/test/browser/browser_edit.js @@ -73,7 +73,11 @@ add_task(async function test_add_user_pref() { }); add_task(async function test_delete_user_pref() { - for (let [radioIndex, testValue] of [[0, false], [1, -1], [2, "value"]]) { + for (let [radioIndex, testValue] of [ + [0, false], + [1, -1], + [2, "value"], + ]) { Preferences.set(PREF_NEW, testValue); await AboutConfigTest.withNewTab(async function() { // Deleting the preference should keep the row. @@ -116,7 +120,11 @@ add_task(async function test_click_type_label_multiple_forms() { let newRow = this.getRow(PREF_NEW_WHILE_DELETED); - for (let [radioIndex, expectedValue] of [[0, true], [1, 0], [2, ""]]) { + for (let [radioIndex, expectedValue] of [ + [0, true], + [1, 0], + [2, ""], + ]) { let radioLabels = newRow.element.querySelectorAll("label > span"); await this.document.l10n.translateElements(radioLabels); diff --git a/browser/components/aboutlogins/tests/browser/browser_dismissFooter.js b/browser/components/aboutlogins/tests/browser/browser_dismissFooter.js index 249eec6439790..feceb7b1eefe9 100644 --- a/browser/components/aboutlogins/tests/browser/browser_dismissFooter.js +++ b/browser/components/aboutlogins/tests/browser/browser_dismissFooter.js @@ -71,7 +71,10 @@ add_task(async function test_open_links() { }); await SpecialPowers.pushPrefEnv({ - set: [[pref, urlBase], ["services.sync.engine.passwords", true]], + set: [ + [pref, urlBase], + ["services.sync.engine.passwords", true], + ], }); Services.obs.notifyObservers(null, UIState.ON_UPDATE); diff --git a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js index dfd2f195d9b51..cd7caff4a608e 100644 --- a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js +++ b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js @@ -24,7 +24,10 @@ function openTabInUserContext(uri, userContextId) { add_task(async function setup() { // make sure userContext is enabled. await SpecialPowers.pushPrefEnv({ - set: [["privacy.userContext.enabled", true], ["dom.ipc.processCount", 1]], + set: [ + ["privacy.userContext.enabled", true], + ["dom.ipc.processCount", 1], + ], }); }); diff --git a/browser/components/contextualidentity/test/browser/browser_usercontext.js b/browser/components/contextualidentity/test/browser/browser_usercontext.js index eca3317faca6d..67869d25a1f90 100644 --- a/browser/components/contextualidentity/test/browser/browser_usercontext.js +++ b/browser/components/contextualidentity/test/browser/browser_usercontext.js @@ -23,7 +23,10 @@ function openTabInUserContext(uri, userContextId) { add_task(async function setup() { // make sure userContext is enabled. await SpecialPowers.pushPrefEnv({ - set: [["privacy.userContext.enabled", true], ["dom.ipc.processCount", 1]], + set: [ + ["privacy.userContext.enabled", true], + ["dom.ipc.processCount", 1], + ], }); }); diff --git a/browser/components/customizableui/test/browser_lwt_telemetry.js b/browser/components/customizableui/test/browser_lwt_telemetry.js index 330004aa0ec2c..ea01491226ff0 100644 --- a/browser/components/customizableui/test/browser_lwt_telemetry.js +++ b/browser/components/customizableui/test/browser_lwt_telemetry.js @@ -56,7 +56,10 @@ add_task(async function testCustomize() { // Events are now [method, object, value, extra] as expected. Assert.deepEqual( relatedEvents, - [["link", "customize", "manageThemes"], ["link", "customize", "getThemes"]], + [ + ["link", "customize", "manageThemes"], + ["link", "customize", "getThemes"], + ], "The events are recorded correctly" ); diff --git a/browser/components/customizableui/test/browser_panel_keyboard_navigation.js b/browser/components/customizableui/test/browser_panel_keyboard_navigation.js index aefa7c30e5ea6..d9344cc15841c 100644 --- a/browser/components/customizableui/test/browser_panel_keyboard_navigation.js +++ b/browser/components/customizableui/test/browser_panel_keyboard_navigation.js @@ -15,7 +15,7 @@ function getEnabledNavigableElementsForView(panelView) { panelView.querySelectorAll("button,toolbarbutton,menulist,.text-link") ).filter(element => { let bounds = element.getBoundingClientRect(); - return !element.disabled && (bounds.width > 0 && bounds.height > 0); + return !element.disabled && bounds.width > 0 && bounds.height > 0; }); } diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js index f955a7be18493..5f447a3931f98 100644 --- a/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js @@ -433,8 +433,8 @@ class TabsUpdateFilterEventManager extends EventManager { if ( filter && filter.urls && - (!extension.hasPermission("tabs") && - !extension.hasPermission("activeTab")) + !extension.hasPermission("tabs") && + !extension.hasPermission("activeTab") ) { Cu.reportError( 'Url filtering in tabs.onUpdated requires "tabs" or "activeTab" permission.' diff --git a/browser/components/extensions/test/browser/browser_ext_contentscript_animate.js b/browser/components/extensions/test/browser/browser_ext_contentscript_animate.js index 11e0b2b46829b..1562fc8122d32 100644 --- a/browser/components/extensions/test/browser/browser_ext_contentscript_animate.js +++ b/browser/components/extensions/test/browser/browser_ext_contentscript_animate.js @@ -86,7 +86,10 @@ add_task(async function test_KeyframeEffect() { let effect = new KeyframeEffect( elem, - [{ opacity: 1, offset: 0 }, { opacity: 0, offset: 1 }], + [ + { opacity: 1, offset: 0 }, + { opacity: 0, offset: 1 }, + ], { duration: 1000, fill: "forwards" } ); let frames = effect.getKeyframes(); diff --git a/browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js b/browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js index 7ac93165a0ee0..3a5bd5c669a22 100644 --- a/browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js +++ b/browser/components/extensions/test/browser/browser_ext_pageAction_show_matches.js @@ -247,7 +247,10 @@ add_task(async function test_pageAction_all_urls() { show_matches: ["*://mochi.test/*"], hide_matches: [""], }); - let rejects = await extension.startup().then(() => false, () => true); + let rejects = await extension.startup().then( + () => false, + () => true + ); is(rejects, true, "startup failed"); }); diff --git a/browser/components/extensions/test/browser/browser_ext_slow_script.js b/browser/components/extensions/test/browser/browser_ext_slow_script.js index 4f4702957afd4..02b99b3bf780a 100644 --- a/browser/components/extensions/test/browser/browser_ext_slow_script.js +++ b/browser/components/extensions/test/browser/browser_ext_slow_script.js @@ -10,7 +10,10 @@ add_task(async function test_slow_content_script() { // Make sure we get a new process for our tab, or our reportProcessHangs // preferences value won't apply to it. await SpecialPowers.pushPrefEnv({ - set: [["dom.ipc.processCount", 1], ["dom.ipc.keepProcessesAlive.web", 0]], + set: [ + ["dom.ipc.processCount", 1], + ["dom.ipc.keepProcessesAlive.web", 0], + ], }); await SpecialPowers.popPrefEnv(); diff --git a/browser/components/extensions/test/browser/browser_ext_tabs_events.js b/browser/components/extensions/test/browser/browser_ext_tabs_events.js index a0ca2757e21a2..66fa1590b4193 100644 --- a/browser/components/extensions/test/browser/browser_ext_tabs_events.js +++ b/browser/components/extensions/test/browser/browser_ext_tabs_events.js @@ -91,10 +91,12 @@ add_task(async function test_tab_events_incognito_monitored() { // Wait for a tab in each window await expectEvents(["onCreated", "onCreated"]); - let initialTab = (await browser.tabs.query({ - active: true, - windowId: otherWindowId, - }))[0]; + let initialTab = ( + await browser.tabs.query({ + active: true, + windowId: otherWindowId, + }) + )[0]; browser.test.log("Create tab in window 1"); let tab = await browser.tabs.create({ diff --git a/browser/components/extensions/test/browser/browser_ext_tabs_move_array.js b/browser/components/extensions/test/browser/browser_ext_tabs_move_array.js index b450831749ed2..364bfc313c93d 100644 --- a/browser/components/extensions/test/browser/browser_ext_tabs_move_array.js +++ b/browser/components/extensions/test/browser/browser_ext_tabs_move_array.js @@ -38,9 +38,12 @@ add_task(async function moveMultiple() { async function move(moveIndexes, moveTo) { let tabs = await browser.tabs.query({ url: "http://example.com/*" }); - await browser.tabs.move(moveIndexes.map(e => tabs[e - 1].id), { - index: moveTo, - }); + await browser.tabs.move( + moveIndexes.map(e => tabs[e - 1].id), + { + index: moveTo, + } + ); } let tests = [ @@ -64,9 +67,11 @@ add_task(async function moveMultiple() { await check(test.result); } - let firstId = (await browser.tabs.query({ - url: "http://example.com/*", - }))[0].id; + let firstId = ( + await browser.tabs.query({ + url: "http://example.com/*", + }) + )[0].id; // Assuming that tab.id of 12345 does not exist. await browser.test.assertRejects( browser.tabs.move([firstId, 12345], { index: -1 }), diff --git a/browser/components/extensions/test/browser/browser_ext_tabs_successors.js b/browser/components/extensions/test/browser/browser_ext_tabs_successors.js index 11726e7ae1347..681a131065c8c 100644 --- a/browser/components/extensions/test/browser/browser_ext_tabs_successors.js +++ b/browser/components/extensions/test/browser/browser_ext_tabs_successors.js @@ -190,7 +190,10 @@ add_task(function testMoveInSuccession_appendFalse() { await verifySuccessors([1, 2, TAB_ID_NONE], "unknown tab ID"); browser.test.assertTrue( - await browser.tabs.moveInSuccession([1e8]).then(() => true, () => false), + await browser.tabs.moveInSuccession([1e8]).then( + () => true, + () => false + ), "When all tab IDs are unknown, tabs.moveInSuccession should not throw" ); diff --git a/browser/components/extensions/test/browser/browser_ext_windows_create_cookieStoreId.js b/browser/components/extensions/test/browser/browser_ext_windows_create_cookieStoreId.js index 4e63cfa19d54d..dc7303c89eba5 100644 --- a/browser/components/extensions/test/browser/browser_ext_windows_create_cookieStoreId.js +++ b/browser/components/extensions/test/browser/browser_ext_windows_create_cookieStoreId.js @@ -201,10 +201,12 @@ add_task(async function valid_cookieStoreId() { async function executeScriptAndGetResult(tabId) { try { - return (await browser.tabs.executeScript(tabId, { - matchAboutBlank: true, - code: "`${document.URL} - ${origin}`", - }))[0]; + return ( + await browser.tabs.executeScript(tabId, { + matchAboutBlank: true, + code: "`${document.URL} - ${origin}`", + }) + )[0]; } catch (e) { return e.message; } diff --git a/browser/components/extensions/test/xpcshell/test_ext_topSites.js b/browser/components/extensions/test/xpcshell/test_ext_topSites.js index 5fc7069cd5290..7fb604338e070 100644 --- a/browser/components/extensions/test/xpcshell/test_ext_topSites.js +++ b/browser/components/extensions/test/xpcshell/test_ext_topSites.js @@ -264,16 +264,21 @@ add_task(async function test_topSites_complete() { includeSearchShortcuts: true, includeFavicon: true, }); - Assert.ok(topSites.every(f => f.favicon == IMAGE_1x1), "favicon is correct"); + Assert.ok( + topSites.every(f => f.favicon == IMAGE_1x1), + "favicon is correct" + ); // Test options.limit. Assert.equal( 1, - (await getSites({ - includePinned: true, - includeSearchShortcuts: true, - limit: 1, - })).length, + ( + await getSites({ + includePinned: true, + includeSearchShortcuts: true, + limit: 1, + }) + ).length, "limit to 1 topSite" ); diff --git a/browser/components/fxmonitor/FirefoxMonitor.jsm b/browser/components/fxmonitor/FirefoxMonitor.jsm index cfa23f9d326c5..d5b84ff9714dd 100644 --- a/browser/components/fxmonitor/FirefoxMonitor.jsm +++ b/browser/components/fxmonitor/FirefoxMonitor.jsm @@ -251,9 +251,9 @@ this.FirefoxMonitor = { onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { if ( !(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) || - (!aWebProgress.isTopLevel || - aWebProgress.isLoadingDocument || - !Components.isSuccessCode(aStatus)) + !aWebProgress.isTopLevel || + aWebProgress.isLoadingDocument || + !Components.isSuccessCode(aStatus) ) { return; } diff --git a/browser/components/migration/ChromeProfileMigrator.jsm b/browser/components/migration/ChromeProfileMigrator.jsm index 1af21e9e17c76..7d6366a24532f 100644 --- a/browser/components/migration/ChromeProfileMigrator.jsm +++ b/browser/components/migration/ChromeProfileMigrator.jsm @@ -264,7 +264,10 @@ async function GetBookmarksResource(aProfileFolder, aLocalePropertySuffix) { if (gotErrors) { throw new Error("The migration included errors."); } - })().then(() => aCallback(true), () => aCallback(false)); + })().then( + () => aCallback(true), + () => aCallback(false) + ); }, }; } diff --git a/browser/components/migration/EdgeProfileMigrator.jsm b/browser/components/migration/EdgeProfileMigrator.jsm index ef134978d27f0..8520e62037228 100644 --- a/browser/components/migration/EdgeProfileMigrator.jsm +++ b/browser/components/migration/EdgeProfileMigrator.jsm @@ -344,9 +344,9 @@ EdgeReadingListMigrator.prototype = { parentGuid, title: folderTitle, }; - this.__readingListFolderGuid = (await MigrationUtils.insertBookmarkWrapper( - folderSpec - )).guid; + this.__readingListFolderGuid = ( + await MigrationUtils.insertBookmarkWrapper(folderSpec) + ).guid; } return this.__readingListFolderGuid; }, diff --git a/browser/components/migration/MigrationUtils.jsm b/browser/components/migration/MigrationUtils.jsm index 8ed0786520524..c58bf5425c4b6 100644 --- a/browser/components/migration/MigrationUtils.jsm +++ b/browser/components/migration/MigrationUtils.jsm @@ -680,11 +680,13 @@ var MigrationUtils = Object.freeze({ async createImportedBookmarksFolder(sourceNameStr, parentGuid) { let source = this.getLocalizedString("sourceName" + sourceNameStr); let title = this.getLocalizedString("importedBookmarksFolder", [source]); - return (await PlacesUtils.bookmarks.insert({ - type: PlacesUtils.bookmarks.TYPE_FOLDER, - parentGuid, - title, - })).guid; + return ( + await PlacesUtils.bookmarks.insert({ + type: PlacesUtils.bookmarks.TYPE_FOLDER, + parentGuid, + title, + }) + ).guid; }, /** @@ -1210,7 +1212,11 @@ var MigrationUtils = Object.freeze({ initializeUndoData() { gKeepUndoData = true; - gUndoData = new Map([["bookmarks", []], ["visits", []], ["logins", []]]); + gUndoData = new Map([ + ["bookmarks", []], + ["visits", []], + ["logins", []], + ]); }, async _postProcessUndoData(state) { @@ -1225,9 +1231,10 @@ var MigrationUtils = Object.freeze({ let bmPromises = bookmarkFolders.map(({ guid }) => { // Ignore bookmarks where the promise doesn't resolve (ie that are missing) // Also check that the bookmark fetch returns isn't null before adding it. - return PlacesUtils.bookmarks - .fetch(guid) - .then(bm => bm && bookmarkFolderData.push(bm), () => {}); + return PlacesUtils.bookmarks.fetch(guid).then( + bm => bm && bookmarkFolderData.push(bm), + () => {} + ); }); await Promise.all(bmPromises); diff --git a/browser/components/migration/SafariProfileMigrator.jsm b/browser/components/migration/SafariProfileMigrator.jsm index 2c980428520d1..548bda7d5fcf6 100644 --- a/browser/components/migration/SafariProfileMigrator.jsm +++ b/browser/components/migration/SafariProfileMigrator.jsm @@ -153,11 +153,15 @@ Bookmarks.prototype = { // Reading list items are imported as regular bookmarks. // They are imported under their own folder, created either under the // bookmarks menu (in the case of startup migration). - folderGuid = (await MigrationUtils.insertBookmarkWrapper({ - parentGuid: PlacesUtils.bookmarks.menuGuid, - type: PlacesUtils.bookmarks.TYPE_FOLDER, - title: MigrationUtils.getLocalizedString("importedSafariReadingList"), - })).guid; + folderGuid = ( + await MigrationUtils.insertBookmarkWrapper({ + parentGuid: PlacesUtils.bookmarks.menuGuid, + type: PlacesUtils.bookmarks.TYPE_FOLDER, + title: MigrationUtils.getLocalizedString( + "importedSafariReadingList" + ), + }) + ).guid; break; } default: diff --git a/browser/components/newtab/lib/ASRouter.jsm b/browser/components/newtab/lib/ASRouter.jsm index 6c875e8f2cbdf..d884684c7536f 100644 --- a/browser/components/newtab/lib/ASRouter.jsm +++ b/browser/components/newtab/lib/ASRouter.jsm @@ -138,9 +138,11 @@ const MessageLoaderUtils = { async _localJsonLoader(provider) { let payload; try { - payload = await (await fetch(provider.location, { - credentials: "omit", - })).json(); + payload = await ( + await fetch(provider.location, { + credentials: "omit", + }) + ).json(); } catch (e) { return []; } @@ -212,7 +214,8 @@ const MessageLoaderUtils = { if ( response && response.ok && - (response.status >= 200 && response.status < 400) + response.status >= 200 && + response.status < 400 ) { let jsonResponse; try { @@ -607,13 +610,13 @@ class _ASRouter { ...ASRouterPreferences.providers.filter( p => p.enabled && - (ASRouterPreferences.getUserPreference(p.id) !== false && - // Provider is enabled or if provider has multiple categories - // check that at least one category is enabled - (!p.categories || - p.categories.some( - c => ASRouterPreferences.getUserPreference(c) !== false - ))) + ASRouterPreferences.getUserPreference(p.id) !== false && + // Provider is enabled or if provider has multiple categories + // check that at least one category is enabled + (!p.categories || + p.categories.some( + c => ASRouterPreferences.getUserPreference(c) !== false + )) ), ].map(_provider => { // make a copy so we don't modify the source of the pref diff --git a/browser/components/newtab/lib/FilterAdult.jsm b/browser/components/newtab/lib/FilterAdult.jsm index abb19c5a904af..52a21dfba80b6 100644 --- a/browser/components/newtab/lib/FilterAdult.jsm +++ b/browser/components/newtab/lib/FilterAdult.jsm @@ -29,7 +29,10 @@ function md5Hash(text) { gCryptoHash.init(gCryptoHash.MD5); // Convert the text to a byte array for hashing - gCryptoHash.update(text.split("").map(c => c.charCodeAt(0)), text.length); + gCryptoHash.update( + text.split("").map(c => c.charCodeAt(0)), + text.length + ); // Request the has result as ASCII base64 return gCryptoHash.finish(true); diff --git a/browser/components/newtab/lib/PersonalityProvider.jsm b/browser/components/newtab/lib/PersonalityProvider.jsm index ba3275e5f0a90..5e11b70d967e7 100644 --- a/browser/components/newtab/lib/PersonalityProvider.jsm +++ b/browser/components/newtab/lib/PersonalityProvider.jsm @@ -43,9 +43,11 @@ XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => new TextDecoder()); XPCOMUtils.defineLazyGetter(this, "baseAttachmentsURL", async () => { const server = Services.prefs.getCharPref("services.settings.server"); - const serverInfo = await (await fetch(`${server}/`, { - credentials: "omit", - })).json(); + const serverInfo = await ( + await fetch(`${server}/`, { + credentials: "omit", + }) + ).json(); const { capabilities: { attachments: { base_url }, diff --git a/browser/components/newtab/lib/TippyTopProvider.jsm b/browser/components/newtab/lib/TippyTopProvider.jsm index 69d1870e0d864..cd142e535bed2 100644 --- a/browser/components/newtab/lib/TippyTopProvider.jsm +++ b/browser/components/newtab/lib/TippyTopProvider.jsm @@ -32,9 +32,11 @@ this.TippyTopProvider = class TippyTopProvider { async init() { // Load the Tippy Top sites from the json manifest. try { - for (const site of await (await fetch(TIPPYTOP_JSON_PATH, { - credentials: "omit", - })).json()) { + for (const site of await ( + await fetch(TIPPYTOP_JSON_PATH, { + credentials: "omit", + }) + ).json()) { // The tippy top manifest can have a url property (string) or a // urls property (array of strings) for (const url of site.url ? [site.url] : site.urls || []) { diff --git a/browser/components/newtab/test/unit/asrouter/ASRouter.test.js b/browser/components/newtab/test/unit/asrouter/ASRouter.test.js index 41d503a618a5a..c571c81aca8d2 100644 --- a/browser/components/newtab/test/unit/asrouter/ASRouter.test.js +++ b/browser/components/newtab/test/unit/asrouter/ASRouter.test.js @@ -1706,7 +1706,10 @@ describe("ASRouter", () => { await Router.onMessage(msg); assert.calledWith(global.fetch, url); - assert.lengthOf(Router.state.providers.filter(p => p.url === url), 0); + assert.lengthOf( + Router.state.providers.filter(p => p.url === url), + 0 + ); }); it("should make a request to the provided endpoint on ADMIN_CONNECT_STATE and remove the endpoint", async () => { const url = "https://snippets-admin.mozilla.org/foo"; @@ -1717,7 +1720,10 @@ describe("ASRouter", () => { await Router.onMessage(msg); assert.calledWith(global.fetch, url); - assert.lengthOf(Router.state.providers.filter(p => p.url === url), 0); + assert.lengthOf( + Router.state.providers.filter(p => p.url === url), + 0 + ); }); it("should dispatch SNIPPETS_PREVIEW_MODE when adding a preview endpoint", async () => { const url = "https://snippets-admin.mozilla.org/foo"; @@ -1743,7 +1749,10 @@ describe("ASRouter", () => { }); await Router.onMessage(msg); - assert.lengthOf(Router.state.providers.filter(p => p.url === url), 0); + assert.lengthOf( + Router.state.providers.filter(p => p.url === url), + 0 + ); }); it("should reject bad urls", async () => { const url = "foo"; @@ -1753,7 +1762,10 @@ describe("ASRouter", () => { }); await Router.onMessage(msg); - assert.lengthOf(Router.state.providers.filter(p => p.url === url), 0); + assert.lengthOf( + Router.state.providers.filter(p => p.url === url), + 0 + ); }); it("should handle onboarding message provider", async () => { const handleMessageRequestStub = sandbox.stub( @@ -4025,7 +4037,10 @@ describe("ASRouter", () => { describe("#setGroupState", () => { it("should clear group impressions", async () => { await Router.setState({ - groups: [{ id: "foo", enabled: true }, { id: "bar", enabled: true }], + groups: [ + { id: "foo", enabled: true }, + { id: "bar", enabled: true }, + ], groupImpressions: { foo: [1], bar: [2] }, }); diff --git a/browser/components/newtab/test/unit/asrouter/ASRouterTargeting.test.js b/browser/components/newtab/test/unit/asrouter/ASRouterTargeting.test.js index 8841ca90af607..095f7d036cf4c 100644 --- a/browser/components/newtab/test/unit/asrouter/ASRouterTargeting.test.js +++ b/browser/components/newtab/test/unit/asrouter/ASRouterTargeting.test.js @@ -364,7 +364,10 @@ describe("ASRouterTargeting", () => { messages, returnAll: true, }), - [{ id: "FOO", targeting: "match" }, { id: "BAR", targeting: "match" }] + [ + { id: "FOO", targeting: "match" }, + { id: "BAR", targeting: "match" }, + ] ); }); it("should return an empty array if no matches were found and returnAll is true", async () => { diff --git a/browser/components/newtab/test/unit/asrouter/asrouter-content.test.jsx b/browser/components/newtab/test/unit/asrouter/asrouter-content.test.jsx index db51656e7e6e2..4f45c9a88a29c 100644 --- a/browser/components/newtab/test/unit/asrouter/asrouter-content.test.jsx +++ b/browser/components/newtab/test/unit/asrouter/asrouter-content.test.jsx @@ -179,9 +179,9 @@ describe("ASRouterUISurface", () => { it("should render a trailhead message in the header portal", async () => { // wrapper = shallow(); - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.template === "trailhead" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.template === "trailhead"); wrapper.setState({ message }); @@ -239,9 +239,9 @@ describe("ASRouterUISurface", () => { describe("trailhead", () => { it("should render trailhead if a trailhead message is received", async () => { - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.template === "trailhead" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.template === "trailhead"); wrapper.setState({ message }); assert.lengthOf(wrapper.find(Trailhead), 1); }); @@ -264,9 +264,9 @@ describe("ASRouterUISurface", () => { }, }, ]; - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.template === "trailhead" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.template === "trailhead"); wrapper.setState({ message: { ...message, bundle: FAKE_TRIPLETS_BUNDLE }, }); @@ -292,9 +292,9 @@ describe("ASRouterUISurface", () => { }, }, ]; - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.id === "TRAILHEAD_1" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.id === "TRAILHEAD_1"); wrapper.setState({ message: { ...message, bundle: FAKE_TRIPLETS_BUNDLE_1 }, }); diff --git a/browser/components/newtab/test/unit/asrouter/templates/FirstRun.test.jsx b/browser/components/newtab/test/unit/asrouter/templates/FirstRun.test.jsx index af5339148e29a..7c2a6aab2fef4 100644 --- a/browser/components/newtab/test/unit/asrouter/templates/FirstRun.test.jsx +++ b/browser/components/newtab/test/unit/asrouter/templates/FirstRun.test.jsx @@ -51,9 +51,9 @@ const FAKE_FLOW_PARAMS = { }; async function getTestMessage(id, requestNewBundle) { - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.id === id - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.id === id); // Simulate dynamic triplets by returning a different bundle if (requestNewBundle) { diff --git a/browser/components/newtab/test/unit/asrouter/templates/FullPageInterrupt.test.jsx b/browser/components/newtab/test/unit/asrouter/templates/FullPageInterrupt.test.jsx index 8e123163b7bba..6b4aea6f67707 100644 --- a/browser/components/newtab/test/unit/asrouter/templates/FullPageInterrupt.test.jsx +++ b/browser/components/newtab/test/unit/asrouter/templates/FullPageInterrupt.test.jsx @@ -59,9 +59,9 @@ describe("", () => { }, }; - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.id === "FULL_PAGE_1" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.id === "FULL_PAGE_1"); wrapper = mount( { .resolves({ content: fakeContent, source: "addons.mozilla.org" }), }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const [ translatedMessage, ] = await OnboardingMessageProvider.translateMessages(msgs); @@ -105,9 +105,9 @@ describe("OnboardingMessage", () => { .resolves({ content: fakeContent, source: "addons.mozilla.org" }), }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const [ translatedMessage, ] = await OnboardingMessageProvider.translateMessages(msgs); @@ -125,11 +125,9 @@ describe("OnboardingMessage", () => { .resolves({ content: fakeContent, source: "addons.allizom.org" }), }); - const [ - returnToAMOMsg, - ] = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const [returnToAMOMsg] = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); assert.propertyVal(returnToAMOMsg.content.text.args, "addon-name", null); }); it("should correctly add all addon information to the message after translation", async () => { @@ -140,9 +138,9 @@ describe("OnboardingMessage", () => { .resolves({ content: fakeContent, source: "addons.mozilla.org" }), }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const [ translatedMessage, ] = await OnboardingMessageProvider.translateMessages(msgs); @@ -180,9 +178,9 @@ describe("OnboardingMessage", () => { ], }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const translatedMessages = await OnboardingMessageProvider.translateMessages( msgs ); @@ -205,9 +203,9 @@ describe("OnboardingMessage", () => { ], }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const translatedMessages = await OnboardingMessageProvider.translateMessages( msgs ); @@ -230,9 +228,9 @@ describe("OnboardingMessage", () => { ], }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const translatedMessages = await OnboardingMessageProvider.translateMessages( msgs ); @@ -255,9 +253,9 @@ describe("OnboardingMessage", () => { ], }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const translatedMessages = await OnboardingMessageProvider.translateMessages( msgs ); @@ -268,9 +266,9 @@ describe("OnboardingMessage", () => { getAttrDataAsync: sandbox.stub().rejects(), }); - const msgs = (await OnboardingMessageProvider.getUntranslatedMessages()).filter( - ({ id }) => id === "RETURN_TO_AMO_1" - ); + const msgs = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).filter(({ id }) => id === "RETURN_TO_AMO_1"); const translatedMessages = await OnboardingMessageProvider.translateMessages( msgs ); diff --git a/browser/components/newtab/test/unit/asrouter/templates/Trailhead.test.jsx b/browser/components/newtab/test/unit/asrouter/templates/Trailhead.test.jsx index 1f7a9712d2089..46b5c02b620e8 100644 --- a/browser/components/newtab/test/unit/asrouter/templates/Trailhead.test.jsx +++ b/browser/components/newtab/test/unit/asrouter/templates/Trailhead.test.jsx @@ -55,9 +55,9 @@ describe("", () => { }, }; - const message = (await OnboardingMessageProvider.getUntranslatedMessages()).find( - msg => msg.id === "TRAILHEAD_1" - ); + const message = ( + await OnboardingMessageProvider.getUntranslatedMessages() + ).find(msg => msg.id === "TRAILHEAD_1"); message.cards = CARDS; wrapper = mount( { }); describe("group", () => { it("should remove duplicates inside the groups", () => { - const beforeItems = [[1, 1, 1], [2, 2, 2], [3, 3, 3]]; + const beforeItems = [ + [1, 1, 1], + [2, 2, 2], + [3, 3, 3], + ]; const afterItems = [[1], [2], [3]]; assert.deepEqual(instance.group(...beforeItems), afterItems); }); it("should remove duplicates between groups, favouring earlier groups", () => { - const beforeItems = [[1, 2, 3], [2, 3, 4], [3, 4, 5]]; + const beforeItems = [ + [1, 2, 3], + [2, 3, 4], + [3, 4, 5], + ]; const afterItems = [[1, 2, 3], [4], [5]]; assert.deepEqual(instance.group(...beforeItems), afterItems); }); diff --git a/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/CollectionCardGrid.test.jsx b/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/CollectionCardGrid.test.jsx index 40737e3cf4845..a0e9d69d189f5 100644 --- a/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/CollectionCardGrid.test.jsx +++ b/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/CollectionCardGrid.test.jsx @@ -139,7 +139,11 @@ describe("", () => { assert.deepEqual(thirdCall.args[0].data, { source: "COLLECTIONCARDGRID", block: 0, - tiles: [{ id: 123, pos: 0 }, { id: 456, pos: 1 }, { id: 789, pos: 2 }], + tiles: [ + { id: 123, pos: 0 }, + { id: 456, pos: 1 }, + { id: 789, pos: 2 }, + ], }); }); }); diff --git a/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/ImpressionStats.test.jsx b/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/ImpressionStats.test.jsx index 167258328553e..8fc3bceeb1a69 100644 --- a/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/ImpressionStats.test.jsx +++ b/browser/components/newtab/test/unit/content-src/components/DiscoveryStreamComponents/ImpressionStats.test.jsx @@ -36,7 +36,11 @@ describe("", () => { } const DEFAULT_PROPS = { - rows: [{ id: 1, pos: 0 }, { id: 2, pos: 1 }, { id: 3, pos: 2 }], + rows: [ + { id: 1, pos: 0 }, + { id: 2, pos: 1 }, + { id: 3, pos: 2 }, + ], source: SOURCE, IntersectionObserver: buildIntersectionObserver(FullIntersectEntries), document: { diff --git a/browser/components/newtab/test/unit/content-src/lib/selectLayoutRender.test.js b/browser/components/newtab/test/unit/content-src/lib/selectLayoutRender.test.js index 02fd612f78fd7..c6aedebe0ef3e 100644 --- a/browser/components/newtab/test/unit/content-src/lib/selectLayoutRender.test.js +++ b/browser/components/newtab/test/unit/content-src/lib/selectLayoutRender.test.js @@ -65,7 +65,12 @@ describe("selectLayoutRender", () => { type: "foo", feed: { url: "foo.com" }, properties: { items: 2 }, - data: { recommendations: [{ id: "foo", pos: 0 }, { id: "bar", pos: 1 }] }, + data: { + recommendations: [ + { id: "foo", pos: 0 }, + { id: "bar", pos: 1 }, + ], + }, }); }); diff --git a/browser/components/newtab/test/unit/lib/DiscoveryStreamFeed.test.js b/browser/components/newtab/test/unit/lib/DiscoveryStreamFeed.test.js index b64d53f9b7cb1..1fbaca8283d7b 100644 --- a/browser/components/newtab/test/unit/lib/DiscoveryStreamFeed.test.js +++ b/browser/components/newtab/test/unit/lib/DiscoveryStreamFeed.test.js @@ -2980,10 +2980,22 @@ describe("DiscoveryStreamFeed", () => { { id: 8, reason: "below_min_score", displayed: 0, full_recalc: 1 }, ]; const filtered = { - frequency_cap: [{ id: 1, flight_id: 1 }, { id: 2, flight_id: 2 }], - blocked_by_user: [{ id: 3, flight_id: 3 }, { id: 4, flight_id: 4 }], - flight_duplicate: [{ id: 5, flight_id: 5 }, { id: 6, flight_id: 6 }], - below_min_score: [{ id: 7, flight_id: 7 }, { id: 8, flight_id: 8 }], + frequency_cap: [ + { id: 1, flight_id: 1 }, + { id: 2, flight_id: 2 }, + ], + blocked_by_user: [ + { id: 3, flight_id: 3 }, + { id: 4, flight_id: 4 }, + ], + flight_duplicate: [ + { id: 5, flight_id: 5 }, + { id: 6, flight_id: 6 }, + ], + below_min_score: [ + { id: 7, flight_id: 7 }, + { id: 8, flight_id: 8 }, + ], }; feed._sendSpocsFill(filtered, true); @@ -2999,7 +3011,10 @@ describe("DiscoveryStreamFeed", () => { { id: 2, reason: "frequency_cap", displayed: 0, full_recalc: 0 }, ]; const filtered = { - frequency_cap: [{ id: 1, flight_id: 1 }, { id: 2, flight_id: 2 }], + frequency_cap: [ + { id: 1, flight_id: 1 }, + { id: 2, flight_id: 2 }, + ], }; feed._sendSpocsFill(filtered, false); diff --git a/browser/components/newtab/test/unit/lib/FaviconFeed.test.js b/browser/components/newtab/test/unit/lib/FaviconFeed.test.js index d06d16ca91a00..9e73a97e44881 100644 --- a/browser/components/newtab/test/unit/lib/FaviconFeed.test.js +++ b/browser/components/newtab/test/unit/lib/FaviconFeed.test.js @@ -169,7 +169,10 @@ describe("FaviconFeed", () => { it("should setAndFetchFaviconForPage if the url was redirected with a icon", async () => { sandbox .stub(global.NewTabUtils.activityStreamProvider, "executePlacesQuery") - .resolves([{ visit_id: 1, url: domain }, { visit_id: 2, url }]); + .resolves([ + { visit_id: 1, url: domain }, + { visit_id: 2, url }, + ]); sandbox .stub(global.PlacesUtils.favicons, "getFaviconDataForPage") .callsArgWith(1, { spec: iconUrl }, 0, null, null, 96); @@ -199,7 +202,10 @@ describe("FaviconFeed", () => { it("should NOT setAndFetchFaviconForPage if the original url doesn't have a icon", async () => { sandbox .stub(global.NewTabUtils.activityStreamProvider, "executePlacesQuery") - .resolves([{ visit_id: 1, url: domain }, { visit_id: 2, url }]); + .resolves([ + { visit_id: 1, url: domain }, + { visit_id: 2, url }, + ]); sandbox .stub(global.PlacesUtils.favicons, "getFaviconDataForPage") .callsArgWith(1, null, null, null, null, null); @@ -211,7 +217,10 @@ describe("FaviconFeed", () => { it("should NOT setAndFetchFaviconForPage if the original url doesn't have a rich icon", async () => { sandbox .stub(global.NewTabUtils.activityStreamProvider, "executePlacesQuery") - .resolves([{ visit_id: 1, url: domain }, { visit_id: 2, url }]); + .resolves([ + { visit_id: 1, url: domain }, + { visit_id: 2, url }, + ]); sandbox .stub(global.PlacesUtils.favicons, "getFaviconDataForPage") .callsArgWith(1, { spec: iconUrl }, 0, null, null, 16); diff --git a/browser/components/newtab/test/unit/lib/HighlightsFeed.test.js b/browser/components/newtab/test/unit/lib/HighlightsFeed.test.js index a582d9d9e8093..c09502e547084 100644 --- a/browser/components/newtab/test/unit/lib/HighlightsFeed.test.js +++ b/browser/components/newtab/test/unit/lib/HighlightsFeed.test.js @@ -200,7 +200,10 @@ describe("Highlights Feed", () => { feed.filterForThumbnailExpiration(stub); assert.calledOnce(stub); - assert.calledWithExactly(stub, rows.map(r => r.url)); + assert.calledWithExactly( + stub, + rows.map(r => r.url) + ); }); it("should include preview_image_url (if present) in the callback results", () => { const rows = [ diff --git a/browser/components/newtab/test/unit/lib/Store.test.js b/browser/components/newtab/test/unit/lib/Store.test.js index 6c53c6103ea85..9e5e5d362aa79 100644 --- a/browser/components/newtab/test/unit/lib/Store.test.js +++ b/browser/components/newtab/test/unit/lib/Store.test.js @@ -145,7 +145,12 @@ describe("Store", () => { sinon.stub(store, "initFeed"); store._prefs.set("foo", true); store._prefs.set("bar", true); - await store.init(new Map([["foo", () => {}], ["bar", () => {}]])); + await store.init( + new Map([ + ["foo", () => {}], + ["bar", () => {}], + ]) + ); assert.calledWith(store.initFeed, "foo"); assert.calledWith(store.initFeed, "bar"); }); @@ -242,7 +247,11 @@ describe("Store", () => { it("should clear .feeds and ._feedFactories", () => { store._prefs.set("a", true); store.init( - new Map([["a", () => ({})], ["b", () => ({})], ["c", () => ({})]]) + new Map([ + ["a", () => ({})], + ["b", () => ({})], + ["c", () => ({})], + ]) ); store.uninit(); diff --git a/browser/components/newtab/test/unit/lib/TelemetryFeed.test.js b/browser/components/newtab/test/unit/lib/TelemetryFeed.test.js index c3550897460af..b39db494b3f21 100644 --- a/browser/components/newtab/test/unit/lib/TelemetryFeed.test.js +++ b/browser/components/newtab/test/unit/lib/TelemetryFeed.test.js @@ -1613,8 +1613,14 @@ describe("TelemetryFeed", () => { const spy = sandbox.spy(instance, "sendStructuredIngestionEvent"); const session = { impressionSets: { - source_foo: [{ id: 1, pos: 0 }, { id: 2, pos: 1 }], - source_bar: [{ id: 3, pos: 0 }, { id: 4, pos: 1 }], + source_foo: [ + { id: 1, pos: 0 }, + { id: 2, pos: 1 }, + ], + source_bar: [ + { id: 3, pos: 0 }, + { id: 4, pos: 1 }, + ], }, }; instance.sendDiscoveryStreamImpressions("foo", session); @@ -1634,8 +1640,14 @@ describe("TelemetryFeed", () => { const spy = sandbox.spy(instance, "sendStructuredIngestionEvent"); const session = { loadedContentSets: { - source_foo: [{ id: 1, pos: 0 }, { id: 2, pos: 1 }], - source_bar: [{ id: 3, pos: 0 }, { id: 4, pos: 1 }], + source_foo: [ + { id: 1, pos: 0 }, + { id: 2, pos: 1 }, + ], + source_bar: [ + { id: 3, pos: 0 }, + { id: 4, pos: 1 }, + ], }, }; instance.sendDiscoveryStreamLoadedContent("foo", session); diff --git a/browser/components/newtab/test/unit/lib/TopStoriesFeed.test.js b/browser/components/newtab/test/unit/lib/TopStoriesFeed.test.js index 4cc028d195f99..a8fdb4ed7b2aa 100644 --- a/browser/components/newtab/test/unit/lib/TopStoriesFeed.test.js +++ b/browser/components/newtab/test/unit/lib/TopStoriesFeed.test.js @@ -1465,7 +1465,10 @@ describe("Top Stories Feed", () => { const response = { settings: { spocsPerNewTabs: 0.5 }, - spocs: [{ id: 1, campaign_id: 5 }, { id: 4, campaign_id: 6 }], + spocs: [ + { id: 1, campaign_id: 5 }, + { id: 4, campaign_id: 6 }, + ], }; instance._prefs = { get: pref => undefined, set: sinon.spy() }; @@ -1538,7 +1541,10 @@ describe("Top Stories Feed", () => { const response = { settings: { spocsPerNewTabs: 0.5 }, - spocs: [{ id: 1, campaign_id: 5 }, { id: 4, campaign_id: 6 }], + spocs: [ + { id: 1, campaign_id: 5 }, + { id: 4, campaign_id: 6 }, + ], }; instance._prefs = { get: pref => undefined, set: sinon.spy() }; @@ -1580,7 +1586,10 @@ describe("Top Stories Feed", () => { const response = { settings: { spocsPerNewTabs: 0.5 }, - spocs: [{ id: 1, campaign_id: 5 }, { id: 4, campaign_id: 6 }], + spocs: [ + { id: 1, campaign_id: 5 }, + { id: 4, campaign_id: 6 }, + ], }; fetchStub.resolves({ ok: true, diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 0a532ea7d6ae9..429b592a2d672 100644 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -53,9 +53,9 @@ PlacesInsertionPoint.prototype = { if (this.dropNearNode) { // If dropNearNode is set up we must calculate the index of the item near // which we will drop. - let index = (await PlacesUtils.bookmarks.fetch( - this.dropNearNode.bookmarkGuid - )).index; + let index = ( + await PlacesUtils.bookmarks.fetch(this.dropNearNode.bookmarkGuid) + ).index; return this.orientation == Ci.nsITreeView.DROP_BEFORE ? index : index + 1; } return this._index; diff --git a/browser/components/places/content/editBookmark.js b/browser/components/places/content/editBookmark.js index c05f2789f8d90..32a6325a37e11 100644 --- a/browser/components/places/content/editBookmark.js +++ b/browser/components/places/content/editBookmark.js @@ -308,7 +308,9 @@ var gEditItemOverlay = { // Selection count. if (showOrCollapse("selectionCount", bulkTagging)) { - this._element("itemsCountText").value = PlacesUIUtils.getPluralString( + this._element( + "itemsCountText" + ).value = PlacesUIUtils.getPluralString( "detailsPane.itemsCountLabel", uris.length, [uris.length] diff --git a/browser/components/preferences/in-content/tests/browser_languages_subdialog.js b/browser/components/preferences/in-content/tests/browser_languages_subdialog.js index 45dc25f5392f0..c574bd3aa518c 100644 --- a/browser/components/preferences/in-content/tests/browser_languages_subdialog.js +++ b/browser/components/preferences/in-content/tests/browser_languages_subdialog.js @@ -29,7 +29,10 @@ add_task(async function() { is(dialogOverlay.style.visibility, "", "The dialog is invisible."); await SpecialPowers.pushPrefEnv({ - set: [["privacy.resistFingerprinting", true], ["privacy.spoof_english", 0]], + set: [ + ["privacy.resistFingerprinting", true], + ["privacy.spoof_english", 0], + ], }); win = await languagesSubdialogOpened(); diff --git a/browser/components/preferences/in-content/tests/siteData/browser_siteData2.js b/browser/components/preferences/in-content/tests/siteData/browser_siteData2.js index 2754aeee8fec5..1238dad69d192 100644 --- a/browser/components/preferences/in-content/tests/siteData/browser_siteData2.js +++ b/browser/components/preferences/in-content/tests/siteData/browser_siteData2.js @@ -277,7 +277,10 @@ add_task(async function() { let searchBox = frameDoc.getElementById("searchBox"); searchBox.value = "xyz"; searchBox.doCommand(); - assertSitesListed(doc, hosts.filter(host => host.includes("xyz"))); + assertSitesListed( + doc, + hosts.filter(host => host.includes("xyz")) + ); // Test only removing all visible sites listed updatePromise = promiseSiteDataManagerSitesUpdated(); @@ -294,7 +297,10 @@ add_task(async function() { await settingsDialogClosePromise; await updatePromise; await openSiteDataSettingsDialog(); - assertSitesListed(doc, hosts.filter(host => !host.includes("xyz"))); + assertSitesListed( + doc, + hosts.filter(host => !host.includes("xyz")) + ); await SiteDataTestUtils.clear(); BrowserTestUtils.removeTab(gBrowser.selectedTab); diff --git a/browser/components/preferences/in-content/tests/siteData/browser_siteData3.js b/browser/components/preferences/in-content/tests/siteData/browser_siteData3.js index 1045740421678..d2a4fe9838d68 100644 --- a/browser/components/preferences/in-content/tests/siteData/browser_siteData3.js +++ b/browser/components/preferences/in-content/tests/siteData/browser_siteData3.js @@ -36,7 +36,10 @@ add_task(async function test_exclusions() { await openPreferencesViaOpenPreferencesAPI("privacy", { leaveOpen: true }); await updatePromise; await openSiteDataSettingsDialog(); - assertSitesListed(doc, hosts.filter(host => host != "shopping.xyz.com")); + assertSitesListed( + doc, + hosts.filter(host => host != "shopping.xyz.com") + ); await SiteDataTestUtils.clear(); BrowserTestUtils.removeTab(gBrowser.selectedTab); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_search_banner.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_search_banner.js index b9829418ee66c..0a2f16440dd5e 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_search_banner.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_search_banner.js @@ -34,7 +34,10 @@ add_task(async function setup() { add_task(async function test_not_shown_if_pref_off() { SpecialPowers.pushPrefEnv({ - set: [[PREF_UI_ENABLED, false], [PREF_MAX_SEARCH_BANNER_SHOW_COUNT, 5]], + set: [ + [PREF_UI_ENABLED, false], + [PREF_MAX_SEARCH_BANNER_SHOW_COUNT, 5], + ], }); const { win, tab } = await openAboutPrivateBrowsing(); @@ -62,7 +65,10 @@ add_task(async function test_not_shown_if_max_count_0() { AboutPrivateBrowsingHandler._searchBannerShownThisSession = false; SpecialPowers.pushPrefEnv({ - set: [[PREF_UI_ENABLED, true], [PREF_MAX_SEARCH_BANNER_SHOW_COUNT, 0]], + set: [ + [PREF_UI_ENABLED, true], + [PREF_MAX_SEARCH_BANNER_SHOW_COUNT, 0], + ], }); const { win, tab } = await openAboutPrivateBrowsing(); diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index 305059ce66211..866f1789d6579 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -5757,7 +5757,10 @@ var SessionStoreInternal = { ); // Ensure that the timer is both canceled once we are done with it // and not garbage-collected until then. - deferred.promise.then(() => timer.cancel(), () => timer.cancel()); + deferred.promise.then( + () => timer.cancel(), + () => timer.cancel() + ); return deferred; }, diff --git a/browser/components/sessionstore/test/browser_350525.js b/browser/components/sessionstore/test/browser_350525.js index 9132a933a6021..b046b1c65c627 100644 --- a/browser/components/sessionstore/test/browser_350525.js +++ b/browser/components/sessionstore/test/browser_350525.js @@ -59,13 +59,19 @@ add_task(async function() { tab.linkedBrowser.stop(); // test adding - ok(test(() => ss.setCustomTabValue(tab, key, value)), "store a tab value"); + ok( + test(() => ss.setCustomTabValue(tab, key, value)), + "store a tab value" + ); // test retrieving is(ss.getCustomTabValue(tab, key), value, "stored tab value match original"); // test deleting - ok(test(() => ss.deleteCustomTabValue(tab, key)), "delete the tab value"); + ok( + test(() => ss.deleteCustomTabValue(tab, key)), + "delete the tab value" + ); // value should not exist post-delete is(ss.getCustomTabValue(tab, key), "", "tab value was deleted"); diff --git a/browser/components/sessionstore/test/browser_480893.js b/browser/components/sessionstore/test/browser_480893.js index 8a09968dd4f9b..3b2816da7da2c 100644 --- a/browser/components/sessionstore/test/browser_480893.js +++ b/browser/components/sessionstore/test/browser_480893.js @@ -25,7 +25,10 @@ add_task(async function() { // if Firefox is configured to display a homepage at startup (browser.startup.page = 1) let homepage = "http://mochi.test:8888/"; await SpecialPowers.pushPrefEnv({ - set: [["browser.startup.homepage", homepage], ["browser.startup.page", 1]], + set: [ + ["browser.startup.homepage", homepage], + ["browser.startup.page", 1], + ], }); BrowserTestUtils.loadURI(browser, "about:sessionrestore"); diff --git a/browser/components/sessionstore/test/browser_capabilities.js b/browser/components/sessionstore/test/browser_capabilities.js index 7f5399fa0ba6d..2e41c341adcce 100644 --- a/browser/components/sessionstore/test/browser_capabilities.js +++ b/browser/components/sessionstore/test/browser_capabilities.js @@ -19,7 +19,10 @@ add_task(async function docshell_capabilities() { // Check that everything is allowed by default for new tabs. let state = JSON.parse(ss.getTabState(tab)); ok(!("disallow" in state), "everything allowed by default"); - ok(flags.every(f => docShell[f]), "all flags set to true"); + ok( + flags.every(f => docShell[f]), + "all flags set to true" + ); // Flip a couple of allow* flags. docShell.allowImages = false; @@ -52,7 +55,10 @@ add_task(async function docshell_capabilities() { // After restoring disallowed features must be available again. state = JSON.parse(ss.getTabState(tab)); ok(!("disallow" in state), "everything allowed again"); - ok(flags.every(f => docShell[f]), "all flags set to true"); + ok( + flags.every(f => docShell[f]), + "all flags set to true" + ); // Restore the state with disallowed features. await promiseTabState(tab, disallowedState); diff --git a/browser/components/sessionstore/test/browser_formdata_format.js b/browser/components/sessionstore/test/browser_formdata_format.js index 0a1a3e484a0af..d4ac1f6e1b687 100644 --- a/browser/components/sessionstore/test/browser_formdata_format.js +++ b/browser/components/sessionstore/test/browser_formdata_format.js @@ -112,7 +112,10 @@ function test() { promises.push(testTabRestoreData(formData[i], expectedValues[i])); } - Promise.all(promises).then(() => finish(), ex => ok(false, ex)); + Promise.all(promises).then( + () => finish(), + ex => ok(false, ex) + ); } async function testTabRestoreData(aFormData, aExpectedValue) { diff --git a/browser/components/ssb/SiteSpecificBrowserService.jsm b/browser/components/ssb/SiteSpecificBrowserService.jsm index 80bf5eb67ab32..b1e59099d26c0 100644 --- a/browser/components/ssb/SiteSpecificBrowserService.jsm +++ b/browser/components/ssb/SiteSpecificBrowserService.jsm @@ -206,25 +206,27 @@ async function buildManifestForBrowser(browser) { // Cache all the icons as data URIs since we can need access to them when // the website is not loaded. - manifest.icons = (await Promise.all( - manifest.icons.map(async icon => { - if (icon.src.startsWith("data:")) { - return icon; - } + manifest.icons = ( + await Promise.all( + manifest.icons.map(async icon => { + if (icon.src.startsWith("data:")) { + return icon; + } - let actor = browser.browsingContext.currentWindowGlobal.getActor( - "SiteSpecificBrowser" - ); - try { - icon.src = await actor.sendQuery("LoadIcon", icon.src); - } catch (e) { - // Bad icon, drop it from the list. - return null; - } + let actor = browser.browsingContext.currentWindowGlobal.getActor( + "SiteSpecificBrowser" + ); + try { + icon.src = await actor.sendQuery("LoadIcon", icon.src); + } catch (e) { + // Bad icon, drop it from the list. + return null; + } - return icon; - }) - )).filter(icon => icon); + return icon; + }) + ) + ).filter(icon => icon); // If the site provided no icons then try to use the normal page icons. if (!manifest.icons.length) { diff --git a/browser/components/tests/browser/browser_bug538331.js b/browser/components/tests/browser/browser_bug538331.js index 03fda70c66001..874b4aecbe4a3 100644 --- a/browser/components/tests/browser/browser_bug538331.js +++ b/browser/components/tests/browser/browser_bug538331.js @@ -91,7 +91,10 @@ add_task(async function test_bug538331() { // Set the preferences needed for the test: they will be cleared up // after it runs. await SpecialPowers.pushPrefEnv({ - set: [[PREF_MSTONE, originalMstone], [PREF_OVERRIDE_URL, DEFAULT_PREF_URL]], + set: [ + [PREF_MSTONE, originalMstone], + [PREF_OVERRIDE_URL, DEFAULT_PREF_URL], + ], }); registerCleanupFunction(async () => { diff --git a/browser/components/translation/BingTranslator.jsm b/browser/components/translation/BingTranslator.jsm index ab11200fc8ad8..590984ff5fbd5 100644 --- a/browser/components/translation/BingTranslator.jsm +++ b/browser/components/translation/BingTranslator.jsm @@ -314,7 +314,10 @@ BingRequest.prototype = { ); // Prepare request headers. - let headers = [["Content-type", "text/xml"], ["Authorization", auth]]; + let headers = [ + ["Content-type", "text/xml"], + ["Authorization", auth], + ]; // Prepare the request body. let requestString = diff --git a/browser/components/urlbar/tests/browser/browser_locationBarCommand.js b/browser/components/urlbar/tests/browser/browser_locationBarCommand.js index 6fe9d80600e05..aeffac30456ab 100644 --- a/browser/components/urlbar/tests/browser/browser_locationBarCommand.js +++ b/browser/components/urlbar/tests/browser/browser_locationBarCommand.js @@ -11,7 +11,10 @@ const START_VALUE = "example.org"; add_task(async function setup() { await SpecialPowers.pushPrefEnv({ - set: [["browser.altClickSave", true], ["browser.urlbar.autoFill", false]], + set: [ + ["browser.altClickSave", true], + ["browser.urlbar.autoFill", false], + ], }); }); diff --git a/browser/components/urlbar/tests/browser/browser_view_resultDisplay.js b/browser/components/urlbar/tests/browser/browser_view_resultDisplay.js index fd59892261388..7003854048ba2 100644 --- a/browser/components/urlbar/tests/browser/browser_view_resultDisplay.js +++ b/browser/components/urlbar/tests/browser/browser_view_resultDisplay.js @@ -209,7 +209,11 @@ add_task(async function test_case_insensitive_highlights_1() { ["EXAM", true], ["ple", false], ], - highlightedUrl: [["exam", true], ["ple.com/", false], ["ExAm", true]], + highlightedUrl: [ + ["exam", true], + ["ple.com/", false], + ["ExAm", true], + ], } ); }); @@ -232,7 +236,11 @@ add_task(async function test_case_insensitive_highlights_2() { ["EXAM", true], ["ple", false], ], - highlightedUrl: [["exam", true], ["ple.com/", false], ["ExAm", true]], + highlightedUrl: [ + ["exam", true], + ["ple.com/", false], + ["ExAm", true], + ], } ); }); @@ -255,7 +263,11 @@ add_task(async function test_case_insensitive_highlights_3() { ["EXAM", true], ["ple", false], ], - highlightedUrl: [["exam", true], ["ple.com/", false], ["ExAm", true]], + highlightedUrl: [ + ["exam", true], + ["ple.com/", false], + ["ExAm", true], + ], } ); }); @@ -278,7 +290,11 @@ add_task(async function test_case_insensitive_highlights_4() { ["EXAM", true], ["ple", false], ], - highlightedUrl: [["exam", true], ["ple.com/", false], ["ExAm", true]], + highlightedUrl: [ + ["exam", true], + ["ple.com/", false], + ["ExAm", true], + ], } ); }); diff --git a/browser/components/urlbar/tests/unit/test_UrlbarQueryContext_restrictSource.js b/browser/components/urlbar/tests/unit/test_UrlbarQueryContext_restrictSource.js index 986e5daae2ff2..5889b47986dff 100644 --- a/browser/components/urlbar/tests/unit/test_UrlbarQueryContext_restrictSource.js +++ b/browser/components/urlbar/tests/unit/test_UrlbarQueryContext_restrictSource.js @@ -40,9 +40,10 @@ add_task(async function test_restrictions() { searchString: "match", }); // Skip the heuristic result. - Assert.deepEqual(results.filter(r => !r.heuristic).map(r => r.payload.url), [ - "http://bookmark.com/", - ]); + Assert.deepEqual( + results.filter(r => !r.heuristic).map(r => r.payload.url), + ["http://bookmark.com/"] + ); info("History restrict"); results = await get_results({ @@ -50,9 +51,10 @@ add_task(async function test_restrictions() { searchString: "match", }); // Skip the heuristic result. - Assert.deepEqual(results.filter(r => !r.heuristic).map(r => r.payload.url), [ - "http://history.com/", - ]); + Assert.deepEqual( + results.filter(r => !r.heuristic).map(r => r.payload.url), + ["http://history.com/"] + ); info("tabs restrict"); results = await get_results({ @@ -60,9 +62,10 @@ add_task(async function test_restrictions() { searchString: "match", }); // Skip the heuristic result. - Assert.deepEqual(results.filter(r => !r.heuristic).map(r => r.payload.url), [ - "http://openpagematch.com/", - ]); + Assert.deepEqual( + results.filter(r => !r.heuristic).map(r => r.payload.url), + ["http://openpagematch.com/"] + ); info("search restrict"); results = await get_results({ diff --git a/browser/components/urlbar/tests/unit/test_UrlbarUtils_getTokenMatches.js b/browser/components/urlbar/tests/unit/test_UrlbarUtils_getTokenMatches.js index 3c9a9da94714e..9ffce25a827d9 100644 --- a/browser/components/urlbar/tests/unit/test_UrlbarUtils_getTokenMatches.js +++ b/browser/components/urlbar/tests/unit/test_UrlbarUtils_getTokenMatches.js @@ -12,42 +12,66 @@ add_task(function test() { { tokens: ["mozilla", "is", "i"], phrase: "mozilla is for the Open Web", - expected: [[0, 7], [8, 2]], + expected: [ + [0, 7], + [8, 2], + ], }, { tokens: ["mozilla", "is", "i"], phrase: "MOZILLA IS for the Open Web", - expected: [[0, 7], [8, 2]], + expected: [ + [0, 7], + [8, 2], + ], }, { tokens: ["mozilla", "is", "i"], phrase: "MoZiLlA Is for the Open Web", - expected: [[0, 7], [8, 2]], + expected: [ + [0, 7], + [8, 2], + ], }, { tokens: ["MOZILLA", "IS", "I"], phrase: "mozilla is for the Open Web", - expected: [[0, 7], [8, 2]], + expected: [ + [0, 7], + [8, 2], + ], }, { tokens: ["MoZiLlA", "Is", "I"], phrase: "mozilla is for the Open Web", - expected: [[0, 7], [8, 2]], + expected: [ + [0, 7], + [8, 2], + ], }, { tokens: ["mo", "b"], phrase: "mozilla is for the Open Web", - expected: [[0, 2], [26, 1]], + expected: [ + [0, 2], + [26, 1], + ], }, { tokens: ["mo", "b"], phrase: "MOZILLA is for the OPEN WEB", - expected: [[0, 2], [26, 1]], + expected: [ + [0, 2], + [26, 1], + ], }, { tokens: ["MO", "B"], phrase: "mozilla is for the Open Web", - expected: [[0, 2], [26, 1]], + expected: [ + [0, 2], + [26, 1], + ], }, { tokens: ["mo", ""], @@ -137,17 +161,29 @@ add_task(function test() { { tokens: ["mo", "om"], phrase: "mozilla mozzarella momo", - expected: [[0, 2], [8, 2], [19, 4]], + expected: [ + [0, 2], + [8, 2], + [19, 4], + ], }, { tokens: ["mo", "om"], phrase: "MOZILLA MOZZARELLA MOMO", - expected: [[0, 2], [8, 2], [19, 4]], + expected: [ + [0, 2], + [8, 2], + [19, 4], + ], }, { tokens: ["MO", "OM"], phrase: "mozilla mozzarella momo", - expected: [[0, 2], [8, 2], [19, 4]], + expected: [ + [0, 2], + [8, 2], + [19, 4], + ], }, { tokens: ["resume"], @@ -180,12 +216,18 @@ add_task(function testReverse() { { tokens: ["mozilla", "is", "i"], phrase: "mozilla is for the Open Web", - expected: [[7, 1], [10, 17]], + expected: [ + [7, 1], + [10, 17], + ], }, { tokens: ["\u9996"], phrase: "Test \u9996\u9875 Test", - expected: [[0, 5], [6, 6]], + expected: [ + [0, 5], + [6, 6], + ], }, { tokens: ["mo", "zilla"], @@ -205,17 +247,26 @@ add_task(function testReverse() { { tokens: ["mo", "om"], phrase: "mozilla mozzarella momo", - expected: [[2, 6], [10, 9]], + expected: [ + [2, 6], + [10, 9], + ], }, { tokens: ["mo", "om"], phrase: "MOZILLA MOZZARELLA MOMO", - expected: [[2, 6], [10, 9]], + expected: [ + [2, 6], + [10, 9], + ], }, { tokens: ["MO", "OM"], phrase: "mozilla mozzarella momo", - expected: [[2, 6], [10, 9]], + expected: [ + [2, 6], + [10, 9], + ], }, ]; for (let { tokens, phrase, expected } of tests) { diff --git a/browser/extensions/formautofill/FormAutofillHeuristics.jsm b/browser/extensions/formautofill/FormAutofillHeuristics.jsm index e53d01783dad0..6ef61d46da80b 100644 --- a/browser/extensions/formautofill/FormAutofillHeuristics.jsm +++ b/browser/extensions/formautofill/FormAutofillHeuristics.jsm @@ -472,7 +472,10 @@ this.FormAutofillHeuristics = { options.map(e => +e.value), desiredValues ) || - this._matchContiguousSubArray(options.map(e => +e.label), desiredValues) + this._matchContiguousSubArray( + options.map(e => +e.label), + desiredValues + ) ); }, @@ -502,7 +505,10 @@ this.FormAutofillHeuristics = { options.map(e => +e.value), desiredValues ) || - this._matchContiguousSubArray(options.map(e => +e.label), desiredValues) + this._matchContiguousSubArray( + options.map(e => +e.label), + desiredValues + ) ); }, diff --git a/browser/extensions/formautofill/FormAutofillStorage.jsm b/browser/extensions/formautofill/FormAutofillStorage.jsm index eb36047ff7339..4318679d197af 100644 --- a/browser/extensions/formautofill/FormAutofillStorage.jsm +++ b/browser/extensions/formautofill/FormAutofillStorage.jsm @@ -1505,10 +1505,9 @@ class Addresses extends AutofillRecords { if (!("country-name" in address)) { if (address.country) { try { - address["country-name"] = Services.intl.getRegionDisplayNames( - undefined, - [address.country] - ); + address[ + "country-name" + ] = Services.intl.getRegionDisplayNames(undefined, [address.country]); } catch (e) { address["country-name"] = ""; } diff --git a/browser/extensions/formautofill/FormAutofillUtils.jsm b/browser/extensions/formautofill/FormAutofillUtils.jsm index d907b9f80e054..e3ee010c3e382 100644 --- a/browser/extensions/formautofill/FormAutofillUtils.jsm +++ b/browser/extensions/formautofill/FormAutofillUtils.jsm @@ -615,8 +615,8 @@ this.FormAutofillUtils = { !subKeys || !subKeys.length || (!subNames && !subLnames) || - ((subNames && subKeys.length != subNames.length) || - (subLnames && subKeys.length != subLnames.length)) + (subNames && subKeys.length != subNames.length) || + (subLnames && subKeys.length != subLnames.length) ) { return null; } diff --git a/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js b/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js index d2f297ce9a75a..0af905d2f0ac9 100644 --- a/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js +++ b/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js @@ -5,7 +5,10 @@ add_task(async function test_first_time_save() { let addresses = await getAddresses(); is(addresses.length, 0, "No address in storage"); await SpecialPowers.pushPrefEnv({ - set: [[FTU_PREF, true], [ENABLED_AUTOFILL_ADDRESSES_PREF, true]], + set: [ + [FTU_PREF, true], + [ENABLED_AUTOFILL_ADDRESSES_PREF, true], + ], }); await BrowserTestUtils.withNewTab({ gBrowser, url: FORM_URL }, async function( diff --git a/browser/extensions/formautofill/test/unit/test_addressRecords.js b/browser/extensions/formautofill/test/unit/test_addressRecords.js index c1cd2a4db8238..c479ff5b3a546 100644 --- a/browser/extensions/formautofill/test/unit/test_addressRecords.js +++ b/browser/extensions/formautofill/test/unit/test_addressRecords.js @@ -808,9 +808,11 @@ add_task(async function test_mergeToStorage() { // Empty computed fields shouldn't cause any problem. Assert.equal( - (await profileStorage.addresses.mergeToStorage( - TEST_ADDRESS_WITH_EMPTY_COMPUTED_FIELD - )).length, + ( + await profileStorage.addresses.mergeToStorage( + TEST_ADDRESS_WITH_EMPTY_COMPUTED_FIELD + ) + ).length, 3 ); }); @@ -835,10 +837,12 @@ add_task(async function test_mergeToStorage_strict() { // Empty computed fields shouldn't cause any problem. Assert.equal( - (await profileStorage.addresses.mergeToStorage( - TEST_ADDRESS_WITH_EMPTY_COMPUTED_FIELD, - true - )).length, + ( + await profileStorage.addresses.mergeToStorage( + TEST_ADDRESS_WITH_EMPTY_COMPUTED_FIELD, + true + ) + ).length, 1 ); }); diff --git a/browser/extensions/formautofill/test/unit/test_creditCardRecords.js b/browser/extensions/formautofill/test/unit/test_creditCardRecords.js index 5b55c498428eb..8e95a7bbba9dc 100644 --- a/browser/extensions/formautofill/test/unit/test_creditCardRecords.js +++ b/browser/extensions/formautofill/test/unit/test_creditCardRecords.js @@ -754,9 +754,11 @@ add_task(async function test_mergeToStorage() { // Empty computed fields shouldn't cause any problem. Assert.equal( - (await profileStorage.creditCards.mergeToStorage( - TEST_CREDIT_CARD_WITH_EMPTY_COMPUTED_FIELD - )).length, + ( + await profileStorage.creditCards.mergeToStorage( + TEST_CREDIT_CARD_WITH_EMPTY_COMPUTED_FIELD + ) + ).length, 0 ); }); diff --git a/browser/extensions/formautofill/test/unit/test_findLabelElements.js b/browser/extensions/formautofill/test/unit/test_findLabelElements.js index 4da3f19a7709a..97c305f160817 100644 --- a/browser/extensions/formautofill/test/unit/test_findLabelElements.js +++ b/browser/extensions/formautofill/test/unit/test_findLabelElements.js @@ -94,7 +94,10 @@ TESTCASES.forEach(testcase => { let input = doc.getElementById(testcase.inputId); let labels = LabelUtils.findLabelElements(input); - Assert.deepEqual(labels.map(l => l.id), testcase.expectedLabelIds); + Assert.deepEqual( + labels.map(l => l.id), + testcase.expectedLabelIds + ); LabelUtils.clearLabelMap(); }); }); diff --git a/browser/extensions/formautofill/test/unit/test_sync.js b/browser/extensions/formautofill/test/unit/test_sync.js index 62e36471ee4c1..537809ea1ef86 100644 --- a/browser/extensions/formautofill/test/unit/test_sync.js +++ b/browser/extensions/formautofill/test/unit/test_sync.js @@ -55,7 +55,10 @@ async function expectLocalProfiles(profileStorage, expected) { expected.sort((a, b) => a.guid.localeCompare(b.guid)); profiles.sort((a, b) => a.guid.localeCompare(b.guid)); try { - deepEqual(profiles.map(p => p.guid), expected.map(p => p.guid)); + deepEqual( + profiles.map(p => p.guid), + expected.map(p => p.guid) + ); for (let i = 0; i < expected.length; i++) { let thisExpected = expected[i]; let thisGot = profiles[i]; @@ -395,9 +398,11 @@ add_task(async function test_applyIncoming_nonexistent_tombstone() { !(await profileStorage.addresses.get(guid)), "Should not return record for uknown deleted item" ); - let localTombstone = (await profileStorage.addresses.getAll({ - includeDeleted: true, - })).find(record => record.guid == guid); + let localTombstone = ( + await profileStorage.addresses.getAll({ + includeDeleted: true, + }) + ).find(record => record.guid == guid); ok(localTombstone, "Should store tombstone for unknown item"); } finally { await cleanup(server); @@ -431,9 +436,11 @@ add_task(async function test_applyIncoming_incoming_deleted() { "Should delete unmodified item locally" ); - let localTombstone = (await profileStorage.addresses.getAll({ - includeDeleted: true, - })).find(record => record.guid == guid); + let localTombstone = ( + await profileStorage.addresses.getAll({ + includeDeleted: true, + }) + ).find(record => record.guid == guid); ok(localTombstone, "Should keep local tombstone for remotely deleted item"); strictEqual( getSyncChangeCounter(profileStorage.addresses, guid), diff --git a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm index 0e0d02f113a10..87c2235582d1d 100644 --- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm +++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm @@ -151,7 +151,9 @@ function isValidMatchesCount(data) { if ( typeof total !== "number" || total < 0 || - (typeof current !== "number" || current < 0 || current > total) + typeof current !== "number" || + current < 0 || + current > total ) { return false; } diff --git a/browser/extensions/webcompat/about-compat/AboutCompat.jsm b/browser/extensions/webcompat/about-compat/AboutCompat.jsm index 4c883b02558ad..846cd704e586e 100644 --- a/browser/extensions/webcompat/about-compat/AboutCompat.jsm +++ b/browser/extensions/webcompat/about-compat/AboutCompat.jsm @@ -27,11 +27,10 @@ AboutCompat.prototype = { const channel = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo); channel.originalURI = aURI; - channel.owner = (Services.scriptSecurityManager.createContentPrincipal || - Services.scriptSecurityManager.createCodebasePrincipal)( - uri, - aLoadInfo.originAttributes - ); + channel.owner = ( + Services.scriptSecurityManager.createContentPrincipal || + Services.scriptSecurityManager.createCodebasePrincipal + )(uri, aLoadInfo.originAttributes); return channel; }, }; diff --git a/browser/modules/Sanitizer.jsm b/browser/modules/Sanitizer.jsm index e5372421efeb1..30e7f1451bcf8 100644 --- a/browser/modules/Sanitizer.jsm +++ b/browser/modules/Sanitizer.jsm @@ -724,12 +724,10 @@ async function sanitizeInternal(items, aItemsToClear, progress, options = {}) { // Catch errors here, so later we can just loop through these. handles.push({ name, - promise: item - .clear(range, options) - .then( - () => (progress[name] = "cleared"), - ex => annotateError(name, ex) - ), + promise: item.clear(range, options).then( + () => (progress[name] = "cleared"), + ex => annotateError(name, ex) + ), }); } catch (ex) { annotateError(name, ex); diff --git a/browser/modules/test/browser/browser_EveryWindow.js b/browser/modules/test/browser/browser_EveryWindow.js index 7031a9007a92b..7cadfaadad631 100644 --- a/browser/modules/test/browser/browser_EveryWindow.js +++ b/browser/modules/test/browser/browser_EveryWindow.js @@ -13,9 +13,11 @@ const { EveryWindow } = ChromeUtils.import( async function windowInited(aId, aWin) { // TestUtils.topicObserved returns [subject, data]. We return the // subject, which in this case is the window. - return (await TestUtils.topicObserved(`${aId}:init`, win => { - return aWin ? win == aWin : true; - }))[0]; + return ( + await TestUtils.topicObserved(`${aId}:init`, win => { + return aWin ? win == aWin : true; + }) + )[0]; } function windowUninited(aId, aWin, aClosing) { diff --git a/devtools/client/aboutdebugging/src/components/App.js b/devtools/client/aboutdebugging/src/components/App.js index a03f220a9d5c0..869cfc6d32b66 100644 --- a/devtools/client/aboutdebugging/src/components/App.js +++ b/devtools/client/aboutdebugging/src/components/App.js @@ -206,8 +206,5 @@ const mapDispatchToProps = dispatch => ({ }); module.exports = FluentReact.withLocalization( - connect( - mapStateToProps, - mapDispatchToProps - )(App) + connect(mapStateToProps, mapDispatchToProps)(App) ); diff --git a/devtools/client/aboutdebugging/src/components/ProfilerDialog.js b/devtools/client/aboutdebugging/src/components/ProfilerDialog.js index 6a6b837bfc171..964129335709c 100644 --- a/devtools/client/aboutdebugging/src/components/ProfilerDialog.js +++ b/devtools/client/aboutdebugging/src/components/ProfilerDialog.js @@ -150,7 +150,4 @@ const mapDispatchToProps = { switchProfilerContext: Actions.switchProfilerContext, }; -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(ProfilerDialog); +module.exports = connect(mapStateToProps, mapDispatchToProps)(ProfilerDialog); diff --git a/devtools/client/accessibility/components/AccessibilityRow.js b/devtools/client/accessibility/components/AccessibilityRow.js index 48e571c5631f9..fa562a971d57f 100644 --- a/devtools/client/accessibility/components/AccessibilityRow.js +++ b/devtools/client/accessibility/components/AccessibilityRow.js @@ -325,9 +325,6 @@ const mapStateToProps = ({ scrollContentNodeIntoView, }); -module.exports = connect( - mapStateToProps, - null, - null, - { withRef: true } -)(AccessibilityRow); +module.exports = connect(mapStateToProps, null, null, { withRef: true })( + AccessibilityRow +); diff --git a/devtools/client/application/src/components/manifest/ManifestLoader.js b/devtools/client/application/src/components/manifest/ManifestLoader.js index 55e90e7e9741c..157e20916b0a6 100644 --- a/devtools/client/application/src/components/manifest/ManifestLoader.js +++ b/devtools/client/application/src/components/manifest/ManifestLoader.js @@ -103,7 +103,4 @@ const mapStateToProps = state => ({ isLoading: state.manifest.isLoading, }); -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(ManifestLoader); +module.exports = connect(mapStateToProps, mapDispatchToProps)(ManifestLoader); diff --git a/devtools/client/application/test/browser/browser_application_panel_manifest-display.js b/devtools/client/application/test/browser/browser_application_panel_manifest-display.js index 9c530a60def60..ce2b0af96ce70 100644 --- a/devtools/client/application/test/browser/browser_application_panel_manifest-display.js +++ b/devtools/client/application/test/browser/browser_application_panel_manifest-display.js @@ -58,9 +58,9 @@ add_task(async function() { const issuesEl = doc.querySelector(".js-manifest-issues"); ok(issuesEl !== null, "Validation issues are displayed"); - const warningEl = [...issuesEl.querySelectorAll(".js-manifest-issue")].find( - x => x.textContent.includes("background_color") - ); + const warningEl = [ + ...issuesEl.querySelectorAll(".js-manifest-issue"), + ].find(x => x.textContent.includes("background_color")); ok(warningEl !== null, "A warning about background_color is displayed"); // close the tab diff --git a/devtools/client/debugger/packages/devtools-reps/src/reps/error.js b/devtools/client/debugger/packages/devtools-reps/src/reps/error.js index 17ed75fe28934..d67edd1dc2c5c 100644 --- a/devtools/client/debugger/packages/devtools-reps/src/reps/error.js +++ b/devtools/client/debugger/packages/devtools-reps/src/reps/error.js @@ -59,7 +59,7 @@ function ErrorRep(props) { content.push(`${name}: "${preview.message}"`); } - if (preview.stack && (mode !== MODE.TINY && mode !== MODE.SHORT)) { + if (preview.stack && mode !== MODE.TINY && mode !== MODE.SHORT) { const stacktrace = props.renderStacktrace ? props.renderStacktrace(parseStackString(preview.stack)) : getStacktraceElements(props, preview); diff --git a/devtools/client/debugger/packages/devtools-reps/src/reps/stubs/grip-map.js b/devtools/client/debugger/packages/devtools-reps/src/reps/stubs/grip-map.js index 9b5a29dd4a10f..cb330a3eb88d8 100644 --- a/devtools/client/debugger/packages/devtools-reps/src/reps/stubs/grip-map.js +++ b/devtools/client/debugger/packages/devtools-reps/src/reps/stubs/grip-map.js @@ -91,7 +91,11 @@ stubs.set("testMaxEntries", { preview: { kind: "MapLike", size: 3, - entries: [["key-a", "value-a"], ["key-b", "value-b"], ["key-c", "value-c"]], + entries: [ + ["key-a", "value-a"], + ["key-b", "value-b"], + ["key-c", "value-c"], + ], }, }); diff --git a/devtools/client/debugger/packages/devtools-source-map/src/utils/fetchSourceMap.js b/devtools/client/debugger/packages/devtools-source-map/src/utils/fetchSourceMap.js index a5d895f612991..46c86c9d409a4 100644 --- a/devtools/client/debugger/packages/devtools-source-map/src/utils/fetchSourceMap.js +++ b/devtools/client/debugger/packages/devtools-source-map/src/utils/fetchSourceMap.js @@ -97,7 +97,10 @@ function fetchSourceMap(generatedSource: SourceMapInput): SourceMapConsumer { const req = _resolveAndFetch(generatedSource); // Make sure the cached promise does not reject, because we only // want to report the error once. - setSourceMap(generatedSource.id, req.catch(() => null)); + setSourceMap( + generatedSource.id, + req.catch(() => null) + ); return req; } diff --git a/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js b/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js index 69d1cfe9f0ad5..9565bacb60f04 100644 --- a/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js +++ b/devtools/client/debugger/src/actions/breakpoints/breakpointPositions.js @@ -47,9 +47,10 @@ async function mapLocations( generatedLocations ); - return zip(originalLocations, generatedLocations).map( - ([location, generatedLocation]) => ({ location, generatedLocation }) - ); + return zip( + originalLocations, + generatedLocations + ).map(([location, generatedLocation]) => ({ location, generatedLocation })); } // Filter out positions, that are not in the original source Id diff --git a/devtools/client/debugger/src/actions/tests/file-search.spec.js b/devtools/client/debugger/src/actions/tests/file-search.spec.js index 5b2781fc4ddde..06118edc8d220 100644 --- a/devtools/client/debugger/src/actions/tests/file-search.spec.js +++ b/devtools/client/debugger/src/actions/tests/file-search.spec.js @@ -22,7 +22,10 @@ describe("file text search", () => { count: 0, }); - const matches = [{ line: 1, ch: 3 }, { line: 3, ch: 2 }]; + const matches = [ + { line: 1, ch: 3 }, + { line: 3, ch: 2 }, + ]; dispatch(actions.updateSearchResults(cx, 2, 3, matches)); expect(getFileSearchResults(getState())).toEqual({ diff --git a/devtools/client/debugger/src/actions/tests/navigation.spec.js b/devtools/client/debugger/src/actions/tests/navigation.spec.js index 864c67fbdcb94..2654bbce593e2 100644 --- a/devtools/client/debugger/src/actions/tests/navigation.spec.js +++ b/devtools/client/debugger/src/actions/tests/navigation.spec.js @@ -87,7 +87,10 @@ describe("navigation", () => { it("navigation clears the file-search results", async () => { const { dispatch, getState, cx } = createStore(threadFront); - const searchResults = [{ line: 1, ch: 3 }, { line: 3, ch: 2 }]; + const searchResults = [ + { line: 1, ch: 3 }, + { line: 3, ch: 2 }, + ]; dispatch(actions.updateSearchResults(cx, 2, 3, searchResults)); expect(getFileSearchResults(getState())).toEqual({ count: 2, diff --git a/devtools/client/debugger/src/components/App.js b/devtools/client/debugger/src/components/App.js index 0d488b67194fa..52b1fed7d0a5d 100644 --- a/devtools/client/debugger/src/components/App.js +++ b/devtools/client/debugger/src/components/App.js @@ -344,14 +344,11 @@ const mapStateToProps = state => ({ orientation: getOrientation(state), }); -export default connect( - mapStateToProps, - { - setActiveSearch: actions.setActiveSearch, - closeActiveSearch: actions.closeActiveSearch, - closeProjectSearch: actions.closeProjectSearch, - openQuickOpen: actions.openQuickOpen, - closeQuickOpen: actions.closeQuickOpen, - setOrientation: actions.setOrientation, - } -)(App); +export default connect(mapStateToProps, { + setActiveSearch: actions.setActiveSearch, + closeActiveSearch: actions.closeActiveSearch, + closeProjectSearch: actions.closeProjectSearch, + openQuickOpen: actions.openQuickOpen, + closeQuickOpen: actions.closeQuickOpen, + setOrientation: actions.setOrientation, +})(App); diff --git a/devtools/client/debugger/src/components/Editor/Footer.js b/devtools/client/debugger/src/components/Editor/Footer.js index 5667f6ad201af..7425fce1effeb 100644 --- a/devtools/client/debugger/src/components/Editor/Footer.js +++ b/devtools/client/debugger/src/components/Editor/Footer.js @@ -287,12 +287,9 @@ const mapStateToProps = state => { }; }; -export default connect( - mapStateToProps, - { - togglePrettyPrint: actions.togglePrettyPrint, - toggleBlackBox: actions.toggleBlackBox, - jumpToMappedLocation: actions.jumpToMappedLocation, - togglePaneCollapse: actions.togglePaneCollapse, - } -)(SourceFooter); +export default connect(mapStateToProps, { + togglePrettyPrint: actions.togglePrettyPrint, + toggleBlackBox: actions.toggleBlackBox, + jumpToMappedLocation: actions.jumpToMappedLocation, + togglePaneCollapse: actions.togglePaneCollapse, +})(SourceFooter); diff --git a/devtools/client/debugger/src/components/Editor/InlinePreviewRow.js b/devtools/client/debugger/src/components/Editor/InlinePreviewRow.js index ce396cbcb9784..244b888122dc3 100644 --- a/devtools/client/debugger/src/components/Editor/InlinePreviewRow.js +++ b/devtools/client/debugger/src/components/Editor/InlinePreviewRow.js @@ -113,11 +113,8 @@ class InlinePreviewRow extends PureComponent { } } -export default connect( - () => ({}), - { - openElementInInspector: actions.openElementInInspectorCommand, - highlightDomElement: actions.highlightDomElement, - unHighlightDomElement: actions.unHighlightDomElement, - } -)(InlinePreviewRow); +export default connect(() => ({}), { + openElementInInspector: actions.openElementInInspectorCommand, + highlightDomElement: actions.highlightDomElement, + unHighlightDomElement: actions.unHighlightDomElement, +})(InlinePreviewRow); diff --git a/devtools/client/debugger/src/components/Editor/Preview/index.js b/devtools/client/debugger/src/components/Editor/Preview/index.js index 497c2d88ef8af..3c437fd175ae4 100644 --- a/devtools/client/debugger/src/components/Editor/Preview/index.js +++ b/devtools/client/debugger/src/components/Editor/Preview/index.js @@ -123,11 +123,8 @@ const mapStateToProps = state => { }; }; -export default connect( - mapStateToProps, - { - clearPreview: actions.clearPreview, - addExpression: actions.addExpression, - updatePreview: actions.updatePreview, - } -)(Preview); +export default connect(mapStateToProps, { + clearPreview: actions.clearPreview, + addExpression: actions.addExpression, + updatePreview: actions.updatePreview, +})(Preview); diff --git a/devtools/client/debugger/src/components/Editor/SearchBar.js b/devtools/client/debugger/src/components/Editor/SearchBar.js index 6ad5e79af8022..c7d606513195d 100644 --- a/devtools/client/debugger/src/components/Editor/SearchBar.js +++ b/devtools/client/debugger/src/components/Editor/SearchBar.js @@ -385,14 +385,11 @@ const mapStateToProps = (state, p: OwnProps) => { }; }; -export default connect( - mapStateToProps, - { - toggleFileSearchModifier: actions.toggleFileSearchModifier, - setFileSearchQuery: actions.setFileSearchQuery, - setActiveSearch: actions.setActiveSearch, - closeFileSearch: actions.closeFileSearch, - doSearch: actions.doSearch, - traverseResults: actions.traverseResults, - } -)(SearchBar); +export default connect(mapStateToProps, { + toggleFileSearchModifier: actions.toggleFileSearchModifier, + setFileSearchQuery: actions.setFileSearchQuery, + setActiveSearch: actions.setActiveSearch, + closeFileSearch: actions.closeFileSearch, + doSearch: actions.doSearch, + traverseResults: actions.traverseResults, +})(SearchBar); diff --git a/devtools/client/debugger/src/components/Editor/Tab.js b/devtools/client/debugger/src/components/Editor/Tab.js index 4d453287caa4e..759622546ce1c 100644 --- a/devtools/client/debugger/src/components/Editor/Tab.js +++ b/devtools/client/debugger/src/components/Editor/Tab.js @@ -118,7 +118,10 @@ class Tab extends PureComponent { ...tabMenuItems.closeTabsToEnd, click: () => { const tabIndex = tabSources.findIndex(t => t.id == tab); - closeTabs(cx, tabURLs.filter((t, i) => i > tabIndex)); + closeTabs( + cx, + tabURLs.filter((t, i) => i > tabIndex) + ); }, disabled: tabCount === 1 || @@ -200,7 +203,8 @@ class Tab extends PureComponent { const active = selectedSource && sourceId == selectedSource.id && - (!this.isProjectSearchEnabled() && !this.isSourceSearchEnabled()); + !this.isProjectSearchEnabled() && + !this.isSourceSearchEnabled(); const isPrettyCode = isPretty(source); function onClickClose(e) { diff --git a/devtools/client/debugger/src/components/Editor/Tabs.js b/devtools/client/debugger/src/components/Editor/Tabs.js index ac3b70ef2d03d..e0d774f30733a 100644 --- a/devtools/client/debugger/src/components/Editor/Tabs.js +++ b/devtools/client/debugger/src/components/Editor/Tabs.js @@ -343,14 +343,11 @@ const mapStateToProps = state => ({ isPaused: getIsPaused(state, getCurrentThread(state)), }); -export default connect( - mapStateToProps, - { - selectSource: actions.selectSource, - moveTab: actions.moveTab, - moveTabBySourceId: actions.moveTabBySourceId, - closeTab: actions.closeTab, - togglePaneCollapse: actions.togglePaneCollapse, - showSource: actions.showSource, - } -)(Tabs); +export default connect(mapStateToProps, { + selectSource: actions.selectSource, + moveTab: actions.moveTab, + moveTabBySourceId: actions.moveTabBySourceId, + closeTab: actions.closeTab, + togglePaneCollapse: actions.togglePaneCollapse, + showSource: actions.showSource, +})(Tabs); diff --git a/devtools/client/debugger/src/components/PrimaryPanes/Outline.js b/devtools/client/debugger/src/components/PrimaryPanes/Outline.js index e0741726ea880..04f21b48ec42f 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/Outline.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/Outline.js @@ -369,10 +369,7 @@ const mapStateToProps = state => { }; }; -export default connect( - mapStateToProps, - { - selectLocation: actions.selectLocation, - flashLineRange: actions.flashLineRange, - } -)(Outline); +export default connect(mapStateToProps, { + selectLocation: actions.selectLocation, + flashLineRange: actions.flashLineRange, +})(Outline); diff --git a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js index b394176fccd4f..1fba372dacb0e 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js @@ -367,11 +367,8 @@ const mapStateToProps = (state, props) => { }; }; -export default connect( - mapStateToProps, - { - selectSource: actions.selectSource, - setExpandedState: actions.setExpandedState, - focusItem: actions.focusItem, - } -)(SourcesTree); +export default connect(mapStateToProps, { + selectSource: actions.selectSource, + setExpandedState: actions.setExpandedState, + focusItem: actions.focusItem, +})(SourcesTree); diff --git a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js index da8deccf37e46..77b13f1ab83a7 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTreeItem.js @@ -405,12 +405,9 @@ const mapStateToProps = (state, props: OwnProps) => { }; }; -export default connect( - mapStateToProps, - { - setProjectDirectoryRoot: actions.setProjectDirectoryRoot, - clearProjectDirectoryRoot: actions.clearProjectDirectoryRoot, - toggleBlackBox: actions.toggleBlackBox, - loadSourceText: actions.loadSourceText, - } -)(SourceTreeItem); +export default connect(mapStateToProps, { + setProjectDirectoryRoot: actions.setProjectDirectoryRoot, + clearProjectDirectoryRoot: actions.clearProjectDirectoryRoot, + toggleBlackBox: actions.toggleBlackBox, + loadSourceText: actions.loadSourceText, +})(SourceTreeItem); diff --git a/devtools/client/debugger/src/components/PrimaryPanes/index.js b/devtools/client/debugger/src/components/PrimaryPanes/index.js index 3b9b642f96539..02abee0b0c883 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/index.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/index.js @@ -202,14 +202,11 @@ const mapStateToProps = state => { }; }; -const connector = connect( - mapStateToProps, - { - setPrimaryPaneTab: actions.setPrimaryPaneTab, - setActiveSearch: actions.setActiveSearch, - closeActiveSearch: actions.closeActiveSearch, - clearProjectDirectoryRoot: actions.clearProjectDirectoryRoot, - } -); +const connector = connect(mapStateToProps, { + setPrimaryPaneTab: actions.setPrimaryPaneTab, + setActiveSearch: actions.setActiveSearch, + closeActiveSearch: actions.closeActiveSearch, + clearProjectDirectoryRoot: actions.clearProjectDirectoryRoot, +}); export default connector(PrimaryPanes); diff --git a/devtools/client/debugger/src/components/ProjectSearch.js b/devtools/client/debugger/src/components/ProjectSearch.js index 7263de82f7cdb..8ee9105cc4571 100644 --- a/devtools/client/debugger/src/components/ProjectSearch.js +++ b/devtools/client/debugger/src/components/ProjectSearch.js @@ -343,14 +343,11 @@ const mapStateToProps = state => ({ status: getTextSearchStatus(state), }); -export default connect( - mapStateToProps, - { - closeProjectSearch: actions.closeProjectSearch, - searchSources: actions.searchSources, - clearSearch: actions.clearSearch, - selectSpecificLocation: actions.selectSpecificLocation, - setActiveSearch: actions.setActiveSearch, - doSearchForHighlight: actions.doSearchForHighlight, - } -)(ProjectSearch); +export default connect(mapStateToProps, { + closeProjectSearch: actions.closeProjectSearch, + searchSources: actions.searchSources, + clearSearch: actions.clearSearch, + selectSpecificLocation: actions.selectSpecificLocation, + setActiveSearch: actions.setActiveSearch, + doSearchForHighlight: actions.doSearchForHighlight, +})(ProjectSearch); diff --git a/devtools/client/debugger/src/components/QuickOpenModal.js b/devtools/client/debugger/src/components/QuickOpenModal.js index 147b3e5f80416..ee57b178458ab 100644 --- a/devtools/client/debugger/src/components/QuickOpenModal.js +++ b/devtools/client/debugger/src/components/QuickOpenModal.js @@ -481,12 +481,9 @@ function mapStateToProps(state) { } /* istanbul ignore next: ignoring testing of redux connection stuff */ -export default connect( - mapStateToProps, - { - selectSpecificLocation: actions.selectSpecificLocation, - setQuickOpenQuery: actions.setQuickOpenQuery, - highlightLineRange: actions.highlightLineRange, - closeQuickOpen: actions.closeQuickOpen, - } -)(QuickOpenModal); +export default connect(mapStateToProps, { + selectSpecificLocation: actions.selectSpecificLocation, + setQuickOpenQuery: actions.setQuickOpenQuery, + highlightLineRange: actions.highlightLineRange, + closeQuickOpen: actions.closeQuickOpen, +})(QuickOpenModal); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.js b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.js index 32485b93af6ac..c3a8ef00bed05 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.js @@ -223,19 +223,16 @@ const mapStateToProps = (state, p: OwnProps) => ({ frame: getFormattedFrame(state, getCurrentThread(state)), }); -export default connect( - mapStateToProps, - { - enableBreakpoint: actions.enableBreakpoint, - removeBreakpoint: actions.removeBreakpoint, - removeBreakpoints: actions.removeBreakpoints, - removeAllBreakpoints: actions.removeAllBreakpoints, - disableBreakpoint: actions.disableBreakpoint, - selectSpecificLocation: actions.selectSpecificLocation, - setBreakpointOptions: actions.setBreakpointOptions, - toggleAllBreakpoints: actions.toggleAllBreakpoints, - toggleBreakpoints: actions.toggleBreakpoints, - toggleDisabledBreakpoint: actions.toggleDisabledBreakpoint, - openConditionalPanel: actions.openConditionalPanel, - } -)(Breakpoint); +export default connect(mapStateToProps, { + enableBreakpoint: actions.enableBreakpoint, + removeBreakpoint: actions.removeBreakpoint, + removeBreakpoints: actions.removeBreakpoints, + removeAllBreakpoints: actions.removeAllBreakpoints, + disableBreakpoint: actions.disableBreakpoint, + selectSpecificLocation: actions.selectSpecificLocation, + setBreakpointOptions: actions.setBreakpointOptions, + toggleAllBreakpoints: actions.toggleAllBreakpoints, + toggleBreakpoints: actions.toggleBreakpoints, + toggleDisabledBreakpoint: actions.toggleDisabledBreakpoint, + openConditionalPanel: actions.openConditionalPanel, +})(Breakpoint); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.js b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.js index ded9d0d689445..d4f00b560203a 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/BreakpointHeading.js @@ -82,12 +82,9 @@ const mapStateToProps = (state, { source }) => ({ breakpointsForSource: getBreakpointsForSource(state, source.id), }); -export default connect( - mapStateToProps, - { - selectSource: actions.selectSource, - enableBreakpointsInSource: actions.enableBreakpointsInSource, - disableBreakpointsInSource: actions.disableBreakpointsInSource, - removeBreakpointsInSource: actions.removeBreakpointsInSource, - } -)(BreakpointHeading); +export default connect(mapStateToProps, { + selectSource: actions.selectSource, + enableBreakpointsInSource: actions.enableBreakpointsInSource, + disableBreakpointsInSource: actions.disableBreakpointsInSource, + removeBreakpointsInSource: actions.removeBreakpointsInSource, +})(BreakpointHeading); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/index.js b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/index.js index 6f9cb0323bfab..435aea8878071 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/index.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/index.js @@ -158,9 +158,6 @@ const mapStateToProps = state => ({ selectedSource: getSelectedSource(state), }); -export default connect( - mapStateToProps, - { - pauseOnExceptions: actions.pauseOnExceptions, - } -)(Breakpoints); +export default connect(mapStateToProps, { + pauseOnExceptions: actions.pauseOnExceptions, +})(Breakpoints); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js b/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js index 35cdee1576442..6bce60d451552 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js @@ -249,15 +249,12 @@ const mapStateToProps = state => ({ skipPausing: getSkipPausing(state), }); -export default connect( - mapStateToProps, - { - resume: actions.resume, - stepIn: actions.stepIn, - stepOut: actions.stepOut, - stepOver: actions.stepOver, - breakOnNext: actions.breakOnNext, - pauseOnExceptions: actions.pauseOnExceptions, - toggleSkipPausing: actions.toggleSkipPausing, - } -)(CommandBar); +export default connect(mapStateToProps, { + resume: actions.resume, + stepIn: actions.stepIn, + stepOut: actions.stepOut, + stepOver: actions.stepOver, + breakOnNext: actions.breakOnNext, + pauseOnExceptions: actions.pauseOnExceptions, + toggleSkipPausing: actions.toggleSkipPausing, +})(CommandBar); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/DOMMutationBreakpoints.js b/devtools/client/debugger/src/components/SecondaryPanes/DOMMutationBreakpoints.js index a76706d6fda62..a4277fa82589c 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/DOMMutationBreakpoints.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/DOMMutationBreakpoints.js @@ -152,15 +152,12 @@ class DomMutationBreakpoints extends Component { } } -export default connect( - undefined, - { - // the debugger-specific action bound to the debugger store - // since there is no `storeKey` - openElementInInspector: actions.openElementInInspectorCommand, - highlightDomElement: actions.highlightDomElement, - unHighlightDomElement: actions.unHighlightDomElement, - setSkipPausing: actions.setSkipPausing, - openInspector: actions.openInspector, - } -)(DomMutationBreakpoints); +export default connect(undefined, { + // the debugger-specific action bound to the debugger store + // since there is no `storeKey` + openElementInInspector: actions.openElementInInspectorCommand, + highlightDomElement: actions.highlightDomElement, + unHighlightDomElement: actions.unHighlightDomElement, + setSkipPausing: actions.setSkipPausing, + openInspector: actions.openInspector, +})(DomMutationBreakpoints); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/EventListeners.js b/devtools/client/debugger/src/components/SecondaryPanes/EventListeners.js index bb2792686db4c..0c94b38969b58 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/EventListeners.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/EventListeners.js @@ -299,12 +299,9 @@ const mapStateToProps = state => ({ expandedCategories: getEventListenerExpanded(state), }); -export default connect( - mapStateToProps, - { - addEventListeners: actions.addEventListenerBreakpoints, - removeEventListeners: actions.removeEventListenerBreakpoints, - addEventListenerExpanded: actions.addEventListenerExpanded, - removeEventListenerExpanded: actions.removeEventListenerExpanded, - } -)(EventListeners); +export default connect(mapStateToProps, { + addEventListeners: actions.addEventListenerBreakpoints, + removeEventListeners: actions.removeEventListenerBreakpoints, + addEventListenerExpanded: actions.addEventListenerExpanded, + removeEventListenerExpanded: actions.removeEventListenerExpanded, +})(EventListeners); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Expressions.js b/devtools/client/debugger/src/components/SecondaryPanes/Expressions.js index dcaf71bd3660d..d72bec61ecbe6 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Expressions.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Expressions.js @@ -397,18 +397,15 @@ const mapStateToProps = state => ({ expressionError: getExpressionError(state), }); -export default connect( - mapStateToProps, - { - autocomplete: actions.autocomplete, - clearAutocomplete: actions.clearAutocomplete, - addExpression: actions.addExpression, - clearExpressionError: actions.clearExpressionError, - updateExpression: actions.updateExpression, - deleteExpression: actions.deleteExpression, - openLink: actions.openLink, - openElementInInspector: actions.openElementInInspectorCommand, - highlightDomElement: actions.highlightDomElement, - unHighlightDomElement: actions.unHighlightDomElement, - } -)(Expressions); +export default connect(mapStateToProps, { + autocomplete: actions.autocomplete, + clearAutocomplete: actions.clearAutocomplete, + addExpression: actions.addExpression, + clearExpressionError: actions.clearExpressionError, + updateExpression: actions.updateExpression, + deleteExpression: actions.deleteExpression, + openLink: actions.openLink, + openElementInInspector: actions.openElementInInspectorCommand, + highlightDomElement: actions.highlightDomElement, + unHighlightDomElement: actions.unHighlightDomElement, +})(Expressions); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Frames/index.js b/devtools/client/debugger/src/components/SecondaryPanes/Frames/index.js index f4258ed5e3d16..8681c42159555 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Frames/index.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Frames/index.js @@ -233,15 +233,12 @@ const mapStateToProps = state => ({ displayFullUrl: false, }); -export default connect( - mapStateToProps, - { - selectFrame: actions.selectFrame, - selectLocation: actions.selectLocation, - toggleBlackBox: actions.toggleBlackBox, - toggleFrameworkGrouping: actions.toggleFrameworkGrouping, - } -)(Frames); +export default connect(mapStateToProps, { + selectFrame: actions.selectFrame, + selectLocation: actions.selectLocation, + toggleBlackBox: actions.toggleBlackBox, + toggleFrameworkGrouping: actions.toggleFrameworkGrouping, +})(Frames); // Export the non-connected component in order to use it outside of the debugger // panel (e.g. console, netmonitor, …). diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Scopes.js b/devtools/client/debugger/src/components/SecondaryPanes/Scopes.js index e7e4fa47b841c..90390c608945c 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Scopes.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Scopes.js @@ -300,16 +300,13 @@ const mapStateToProps = state => { }; }; -export default connect( - mapStateToProps, - { - openLink: actions.openLink, - openElementInInspector: actions.openElementInInspectorCommand, - highlightDomElement: actions.highlightDomElement, - unHighlightDomElement: actions.unHighlightDomElement, - toggleMapScopes: actions.toggleMapScopes, - setExpandedScope: actions.setExpandedScope, - addWatchpoint: actions.addWatchpoint, - removeWatchpoint: actions.removeWatchpoint, - } -)(Scopes); +export default connect(mapStateToProps, { + openLink: actions.openLink, + openElementInInspector: actions.openElementInInspectorCommand, + highlightDomElement: actions.highlightDomElement, + unHighlightDomElement: actions.unHighlightDomElement, + toggleMapScopes: actions.toggleMapScopes, + setExpandedScope: actions.setExpandedScope, + addWatchpoint: actions.addWatchpoint, + removeWatchpoint: actions.removeWatchpoint, +})(Scopes); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/Thread.js b/devtools/client/debugger/src/components/SecondaryPanes/Thread.js index 135122066357c..bf9edd7273b06 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/Thread.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/Thread.js @@ -69,9 +69,6 @@ const mapStateToProps = (state, props) => ({ isPaused: getIsPaused(state, props.thread.actor), }); -export default connect( - mapStateToProps, - { - selectThread: actions.selectThread, - } -)(Thread); +export default connect(mapStateToProps, { + selectThread: actions.selectThread, +})(Thread); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js b/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js index d7551f877e62f..6c1cff45db073 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js @@ -165,11 +165,8 @@ const mapStateToProps = state => ({ why: getWhy(state, getCurrentThread(state)), }); -export default connect( - mapStateToProps, - { - openElementInInspector: actions.openElementInInspectorCommand, - highlightDomElement: actions.highlightDomElement, - unHighlightDomElement: actions.unHighlightDomElement, - } -)(WhyPaused); +export default connect(mapStateToProps, { + openElementInInspector: actions.openElementInInspectorCommand, + highlightDomElement: actions.highlightDomElement, + unHighlightDomElement: actions.unHighlightDomElement, +})(WhyPaused); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/XHRBreakpoints.js b/devtools/client/debugger/src/components/SecondaryPanes/XHRBreakpoints.js index 3762ba8f10495..2adbab2f867dd 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/XHRBreakpoints.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/XHRBreakpoints.js @@ -366,14 +366,11 @@ const mapStateToProps = state => ({ shouldPauseOnAny: shouldPauseOnAnyXHR(state), }); -export default connect( - mapStateToProps, - { - setXHRBreakpoint: actions.setXHRBreakpoint, - removeXHRBreakpoint: actions.removeXHRBreakpoint, - enableXHRBreakpoint: actions.enableXHRBreakpoint, - disableXHRBreakpoint: actions.disableXHRBreakpoint, - updateXHRBreakpoint: actions.updateXHRBreakpoint, - togglePauseOnAny: actions.togglePauseOnAny, - } -)(XHRBreakpoints); +export default connect(mapStateToProps, { + setXHRBreakpoint: actions.setXHRBreakpoint, + removeXHRBreakpoint: actions.removeXHRBreakpoint, + enableXHRBreakpoint: actions.enableXHRBreakpoint, + disableXHRBreakpoint: actions.disableXHRBreakpoint, + updateXHRBreakpoint: actions.updateXHRBreakpoint, + togglePauseOnAny: actions.togglePauseOnAny, +})(XHRBreakpoints); diff --git a/devtools/client/debugger/src/components/SecondaryPanes/index.js b/devtools/client/debugger/src/components/SecondaryPanes/index.js index 7a9e3a734bd36..c53f3b1a3749d 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/index.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/index.js @@ -557,14 +557,11 @@ const mapStateToProps = state => { }; }; -export default connect( - mapStateToProps, - { - toggleAllBreakpoints: actions.toggleAllBreakpoints, - evaluateExpressions: actions.evaluateExpressions, - pauseOnExceptions: actions.pauseOnExceptions, - toggleMapScopes: actions.toggleMapScopes, - breakOnNext: actions.breakOnNext, - toggleEventLogging: actions.toggleEventLogging, - } -)(SecondaryPanes); +export default connect(mapStateToProps, { + toggleAllBreakpoints: actions.toggleAllBreakpoints, + evaluateExpressions: actions.evaluateExpressions, + pauseOnExceptions: actions.pauseOnExceptions, + toggleMapScopes: actions.toggleMapScopes, + breakOnNext: actions.breakOnNext, + toggleEventLogging: actions.toggleEventLogging, +})(SecondaryPanes); diff --git a/devtools/client/debugger/src/components/WelcomeBox.js b/devtools/client/debugger/src/components/WelcomeBox.js index 790c3016d78c5..d6f76f66c0bd2 100644 --- a/devtools/client/debugger/src/components/WelcomeBox.js +++ b/devtools/client/debugger/src/components/WelcomeBox.js @@ -89,11 +89,8 @@ const mapStateToProps = state => ({ endPanelCollapsed: getPaneCollapse(state, "end"), }); -export default connect( - mapStateToProps, - { - togglePaneCollapse: actions.togglePaneCollapse, - setActiveSearch: actions.setActiveSearch, - openQuickOpen: actions.openQuickOpen, - } -)(WelcomeBox); +export default connect(mapStateToProps, { + togglePaneCollapse: actions.togglePaneCollapse, + setActiveSearch: actions.setActiveSearch, + openQuickOpen: actions.openQuickOpen, +})(WelcomeBox); diff --git a/devtools/client/debugger/src/components/shared/SearchInput.js b/devtools/client/debugger/src/components/shared/SearchInput.js index 02b6577ea0208..896f9caf9e4ac 100644 --- a/devtools/client/debugger/src/components/shared/SearchInput.js +++ b/devtools/client/debugger/src/components/shared/SearchInput.js @@ -204,7 +204,7 @@ class SearchInput extends Component { renderNav() { const { count, handleNext, handlePrev } = this.props; - if ((!handleNext && !handlePrev) || (!count || count == 1)) { + if ((!handleNext && !handlePrev) || !count || count == 1) { return; } diff --git a/devtools/client/debugger/src/workers/parser/tests/getScopes.spec.js b/devtools/client/debugger/src/workers/parser/tests/getScopes.spec.js index bcfe0ad1c1420..3fd0a27eae626 100644 --- a/devtools/client/debugger/src/workers/parser/tests/getScopes.spec.js +++ b/devtools/client/debugger/src/workers/parser/tests/getScopes.spec.js @@ -30,7 +30,12 @@ cases( { name: "finds scope bindings in fn body with both lex and non-lex items", file: "scopes/fn-body-lex-and-nonlex", - locations: [[4, 0], [10, 0], [16, 0], [22, 0]], + locations: [ + [4, 0], + [10, 0], + [16, 0], + [22, 0], + ], }, { name: "finds scope bindings in a vue file", @@ -42,13 +47,23 @@ cases( name: "finds scope bindings in a typescript file", file: "scopes/ts-sample", type: "ts", - locations: [[9, 0], [13, 4], [17, 0], [33, 0]], + locations: [ + [9, 0], + [13, 4], + [17, 0], + [33, 0], + ], }, { name: "finds scope bindings in a typescript-jsx file", file: "scopes/tsx-sample", type: "tsx", - locations: [[9, 0], [13, 4], [17, 0], [33, 0]], + locations: [ + [9, 0], + [13, 4], + [17, 0], + [33, 0], + ], }, { name: "finds scope bindings in a module", @@ -63,32 +78,57 @@ cases( { name: "finds scope bindings for complex binding nesting", file: "scopes/complex-nesting", - locations: [[16, 4], [20, 6]], + locations: [ + [16, 4], + [20, 6], + ], }, { name: "finds scope bindings for function declarations", file: "scopes/function-declaration", - locations: [[2, 0], [3, 20], [5, 1], [9, 0]], + locations: [ + [2, 0], + [3, 20], + [5, 1], + [9, 0], + ], }, { name: "finds scope bindings for function expressions", file: "scopes/function-expression", - locations: [[2, 0], [3, 23], [6, 0]], + locations: [ + [2, 0], + [3, 23], + [6, 0], + ], }, { name: "finds scope bindings for arrow functions", file: "scopes/arrow-function", - locations: [[2, 0], [4, 0], [7, 0], [8, 0]], + locations: [ + [2, 0], + [4, 0], + [7, 0], + [8, 0], + ], }, { name: "finds scope bindings for class declarations", file: "scopes/class-declaration", - locations: [[2, 0], [5, 0], [7, 0]], + locations: [ + [2, 0], + [5, 0], + [7, 0], + ], }, { name: "finds scope bindings for class expressions", file: "scopes/class-expression", - locations: [[2, 0], [5, 0], [7, 0]], + locations: [ + [2, 0], + [5, 0], + [7, 0], + ], }, { name: "finds scope bindings for for loops", @@ -109,27 +149,48 @@ cases( { name: "finds scope bindings for try..catch", file: "scopes/try-catch", - locations: [[2, 0], [4, 0], [7, 0]], + locations: [ + [2, 0], + [4, 0], + [7, 0], + ], }, { name: "finds scope bindings for out of order declarations", file: "scopes/out-of-order-declarations", - locations: [[2, 0], [5, 0], [11, 0], [14, 0], [17, 0]], + locations: [ + [2, 0], + [5, 0], + [11, 0], + [14, 0], + [17, 0], + ], }, { name: "finds scope bindings for block statements", file: "scopes/block-statement", - locations: [[2, 0], [6, 0]], + locations: [ + [2, 0], + [6, 0], + ], }, { name: "finds scope bindings for class properties", file: "scopes/class-property", - locations: [[2, 0], [4, 16], [6, 12], [7, 0]], + locations: [ + [2, 0], + [4, 16], + [6, 12], + [7, 0], + ], }, { name: "finds scope bindings and exclude Flowtype", file: "scopes/flowtype-bindings", - locations: [[8, 0], [10, 0]], + locations: [ + [8, 0], + [10, 0], + ], }, { name: "finds scope bindings for declarations with patterns", @@ -139,12 +200,25 @@ cases( { name: "finds scope bindings for switch statements", file: "scopes/switch-statement", - locations: [[2, 0], [5, 0], [7, 0], [9, 0], [11, 0], [17, 0], [21, 0]], + locations: [ + [2, 0], + [5, 0], + [7, 0], + [9, 0], + [11, 0], + [17, 0], + [21, 0], + ], }, { name: "finds scope bindings with proper types", file: "scopes/binding-types", - locations: [[5, 0], [9, 0], [18, 0], [23, 0]], + locations: [ + [5, 0], + [9, 0], + [18, 0], + [23, 0], + ], }, { name: "finds scope bindings with expression metadata", diff --git a/devtools/client/debugger/src/workers/parser/utils/helpers.js b/devtools/client/debugger/src/workers/parser/utils/helpers.js index 514e00b4556a1..84cb749f5e944 100644 --- a/devtools/client/debugger/src/workers/parser/utils/helpers.js +++ b/devtools/client/debugger/src/workers/parser/utils/helpers.js @@ -22,7 +22,8 @@ export function isAwaitExpression(path: SimplePath) { const { node, parent } = path; return ( t.isAwaitExpression(node) || - (t.isAwaitExpression(parent.init) || t.isAwaitExpression(parent)) + t.isAwaitExpression(parent.init) || + t.isAwaitExpression(parent) ); } @@ -30,7 +31,8 @@ export function isYieldExpression(path: SimplePath) { const { node, parent } = path; return ( t.isYieldExpression(node) || - (t.isYieldExpression(parent.init) || t.isYieldExpression(parent)) + t.isYieldExpression(parent.init) || + t.isYieldExpression(parent) ); } diff --git a/devtools/client/inspector/animation/test/browser_animation_infinity-duration_summary-graph.js b/devtools/client/inspector/animation/test/browser_animation_infinity-duration_summary-graph.js index acc71fa6e70fa..310c4ec04d2d2 100644 --- a/devtools/client/inspector/animation/test/browser_animation_infinity-duration_summary-graph.js +++ b/devtools/client/inspector/animation/test/browser_animation_infinity-duration_summary-graph.js @@ -11,19 +11,28 @@ const TEST_DATA = [ { targetClass: "infinity", - expectedIterationPath: [{ x: 0, y: 0 }, { x: 200000, y: 0 }], + expectedIterationPath: [ + { x: 0, y: 0 }, + { x: 200000, y: 0 }, + ], expectedTooltip: { duration: "\u221E", }, }, { targetClass: "infinity-delay-iteration-start", - expectedDelayPath: [{ x: 0, y: 0 }, { x: 100000, y: 0 }], + expectedDelayPath: [ + { x: 0, y: 0 }, + { x: 100000, y: 0 }, + ], expectedDelaySign: { marginInlineStart: "0%", width: "50%", }, - expectedIterationPath: [{ x: 100000, y: 50 }, { x: 200000, y: 50 }], + expectedIterationPath: [ + { x: 100000, y: 50 }, + { x: 200000, y: 50 }, + ], expectedTooltip: { delay: "100s", duration: "\u221E", @@ -32,7 +41,10 @@ const TEST_DATA = [ }, { targetClass: "limited", - expectedIterationPath: [{ x: 0, y: 0 }, { x: 100000, y: 100 }], + expectedIterationPath: [ + { x: 0, y: 0 }, + { x: 100000, y: 100 }, + ], expectedTooltip: { duration: "100s", }, diff --git a/devtools/client/inspector/animation/test/browser_animation_keyframes-graph_computed-value-path_easing-hint.js b/devtools/client/inspector/animation/test/browser_animation_keyframes-graph_computed-value-path_easing-hint.js index 585464280ec75..b6e72f366307e 100644 --- a/devtools/client/inspector/animation/test/browser_animation_keyframes-graph_computed-value-path_easing-hint.js +++ b/devtools/client/inspector/animation/test/browser_animation_keyframes-graph_computed-value-path_easing-hint.js @@ -17,7 +17,11 @@ const TEST_DATA = [ expectedHints: [ { hint: "linear", - path: [{ x: 0, y: 100 }, { x: 500, y: 50 }, { x: 1000, y: 0 }], + path: [ + { x: 0, y: 100 }, + { x: 500, y: 50 }, + { x: 1000, y: 0 }, + ], }, ], }, @@ -76,7 +80,11 @@ const TEST_DATA = [ expectedHints: [ { hint: "steps(1)", - path: [{ x: 0, y: 0 }, { x: 999, y: 0 }, { x: 1000, y: 100 }], + path: [ + { x: 0, y: 0 }, + { x: 999, y: 0 }, + { x: 1000, y: 100 }, + ], }, ], }, @@ -105,15 +113,24 @@ const TEST_DATA = [ expectedHints: [ { hint: "linear", - path: [{ x: 0, y: 0 }, { x: 100, y: 100 }], + path: [ + { x: 0, y: 0 }, + { x: 100, y: 100 }, + ], }, { hint: "steps(1)", - path: [{ x: 129, y: 100 }, { x: 130, y: 0 }], + path: [ + { x: 129, y: 100 }, + { x: 130, y: 0 }, + ], }, { hint: "linear", - path: [{ x: 130, y: 0 }, { x: 1000, y: 100 }], + path: [ + { x: 130, y: 0 }, + { x: 1000, y: 100 }, + ], }, ], }, @@ -127,15 +144,25 @@ const TEST_DATA = [ expectedHints: [ { hint: "linear", - path: [{ x: 0, y: 0 }, { x: 500, y: 100 }], + path: [ + { x: 0, y: 0 }, + { x: 500, y: 100 }, + ], }, { hint: "", - path: [{ x: 500, y: 100 }, { x: 500, y: 0 }], + path: [ + { x: 500, y: 100 }, + { x: 500, y: 0 }, + ], }, { hint: "steps(1)", - path: [{ x: 500, y: 0 }, { x: 999, y: 0 }, { x: 1000, y: 100 }], + path: [ + { x: 500, y: 0 }, + { x: 999, y: 0 }, + { x: 1000, y: 100 }, + ], }, ], }, diff --git a/devtools/client/inspector/animation/test/browser_animation_pseudo-element.js b/devtools/client/inspector/animation/test/browser_animation_pseudo-element.js index ba95f46aa6e43..36afc84f2b56a 100644 --- a/devtools/client/inspector/animation/test/browser_animation_pseudo-element.js +++ b/devtools/client/inspector/animation/test/browser_animation_pseudo-element.js @@ -9,12 +9,18 @@ const TEST_DATA = [ { expectedTargetLabel: "::before", expectedAnimationNameLabel: "body", - expectedKeyframsGraphPathSegments: [{ x: 0, y: 0 }, { x: 1000, y: 100 }], + expectedKeyframsGraphPathSegments: [ + { x: 0, y: 0 }, + { x: 1000, y: 100 }, + ], }, { expectedTargetLabel: "::before", expectedAnimationNameLabel: "div-before", - expectedKeyframsGraphPathSegments: [{ x: 0, y: 100 }, { x: 1000, y: 0 }], + expectedKeyframsGraphPathSegments: [ + { x: 0, y: 100 }, + { x: 1000, y: 0 }, + ], }, { expectedTargetLabel: "::after", diff --git a/devtools/client/inspector/animation/test/browser_animation_short-duration.js b/devtools/client/inspector/animation/test/browser_animation_short-duration.js index 708d945ab944e..350ba2921e0f1 100644 --- a/devtools/client/inspector/animation/test/browser_animation_short-duration.js +++ b/devtools/client/inspector/animation/test/browser_animation_short-duration.js @@ -34,6 +34,10 @@ function assertIterationPath(summaryGraphEl) { const pathEl = summaryGraphEl.querySelector( ".animation-computed-timing-path .animation-iteration-path" ); - const expected = [{ x: 0, y: 0 }, { x: 0.999, y: 99.9 }, { x: 1, y: 0 }]; + const expected = [ + { x: 0, y: 0 }, + { x: 0.999, y: 99.9 }, + { x: 1, y: 0 }, + ]; assertPathSegments(pathEl, true, expected); } diff --git a/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path.js b/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path.js index e2bbbb57db85d..76a2ab53c187f 100644 --- a/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path.js +++ b/devtools/client/inspector/animation/test/browser_animation_summary-graph_computed-timing-path.js @@ -39,7 +39,10 @@ const TEST_DATA = [ }, { targetClass: "delay-positive", - expectedDelayPath: [{ x: 0, y: 0 }, { x: 500000, y: 0 }], + expectedDelayPath: [ + { x: 0, y: 0 }, + { x: 500000, y: 0 }, + ], expectedIterationPathList: [ [ { x: 500000, y: 0 }, @@ -75,7 +78,10 @@ const TEST_DATA = [ { x: 1000000, y: 0 }, ], ], - expectedEndDelayPath: [{ x: 1000000, y: 0 }, { x: 1500000, y: 0 }], + expectedEndDelayPath: [ + { x: 1000000, y: 0 }, + { x: 1500000, y: 0 }, + ], }, { targetClass: "enddelay-negative", @@ -106,7 +112,10 @@ const TEST_DATA = [ { x: 1500000, y: 100 }, { x: 1500000, y: 0 }, ], - expectedForwardsPath: [{ x: 1500000, y: 0 }, { x: 1500000, y: 100 }], + expectedForwardsPath: [ + { x: 1500000, y: 0 }, + { x: 1500000, y: 100 }, + ], }, { targetClass: "enddelay-with-iterations-infinity", @@ -119,7 +128,11 @@ const TEST_DATA = [ { x: 1000000, y: 100 }, { x: 1000000, y: 0 }, ], - [{ x: 1000000, y: 0 }, { x: 1250000, y: 25 }, { x: 1500000, y: 50 }], + [ + { x: 1000000, y: 0 }, + { x: 1250000, y: 25 }, + { x: 1500000, y: 50 }, + ], ], isInfinity: true, }, @@ -154,7 +167,11 @@ const TEST_DATA = [ { x: 750000, y: 25 }, { x: 1000000, y: 0 }, ], - [{ x: 1000000, y: 0 }, { x: 1250000, y: 25 }, { x: 1500000, y: 50 }], + [ + { x: 1000000, y: 0 }, + { x: 1250000, y: 25 }, + { x: 1500000, y: 50 }, + ], ], isInfinity: true, }, @@ -255,7 +272,10 @@ const TEST_DATA = [ { x: 1500000, y: 0 }, ], ], - expectedForwardsPath: [{ x: 1500000, y: 0 }, { x: 1500000, y: 50 }], + expectedForwardsPath: [ + { x: 1500000, y: 0 }, + { x: 1500000, y: 50 }, + ], }, { targetClass: "fill-forwards", diff --git a/devtools/client/inspector/animation/test/browser_animation_timing_negative-playback-rate_summary-graph.js b/devtools/client/inspector/animation/test/browser_animation_timing_negative-playback-rate_summary-graph.js index 233712ade6480..38141ab29cde5 100644 --- a/devtools/client/inspector/animation/test/browser_animation_timing_negative-playback-rate_summary-graph.js +++ b/devtools/client/inspector/animation/test/browser_animation_timing_negative-playback-rate_summary-graph.js @@ -15,7 +15,11 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 0, y: 100 }, { x: 50000, y: 50 }, { x: 100000, y: 0 }], + path: [ + { x: 0, y: 100 }, + { x: 50000, y: 50 }, + { x: 100000, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -1", @@ -26,7 +30,11 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 0, y: 100 }, { x: 50000, y: 50 }, { x: 100000, y: 0 }], + path: [ + { x: 0, y: 100 }, + { x: 50000, y: 50 }, + { x: 100000, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -2", @@ -46,7 +54,11 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 0, y: 100 }, { x: 50000, y: 50 }, { x: 100000, y: 0 }], + path: [ + { x: 0, y: 100 }, + { x: 50000, y: 50 }, + { x: 100000, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -1", @@ -65,11 +77,18 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 0, y: 100 }, { x: 50000, y: 50 }, { x: 50000, y: 0 }], + path: [ + { x: 0, y: 100 }, + { x: 50000, y: 50 }, + { x: 50000, y: 0 }, + ], }, { selector: ".animation-negative-delay-path path", - path: [{ x: 50000, y: 50 }, { x: 100000, y: 0 }], + path: [ + { x: 50000, y: 50 }, + { x: 100000, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -1", @@ -89,7 +108,11 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 50000, y: 100 }, { x: 100000, y: 50 }, { x: 150000, y: 0 }], + path: [ + { x: 50000, y: 100 }, + { x: 100000, y: 50 }, + { x: 150000, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -1", @@ -109,11 +132,17 @@ const TEST_DATA = [ expectedPathList: [ { selector: ".animation-iteration-path", - path: [{ x: 0, y: 50 }, { x: 50000, y: 0 }], + path: [ + { x: 0, y: 50 }, + { x: 50000, y: 0 }, + ], }, { selector: ".animation-negative-end-delay-path path", - path: [{ x: -50000, y: 100 }, { x: 0, y: 0 }], + path: [ + { x: -50000, y: 100 }, + { x: 0, y: 0 }, + ], }, ], expectedTooltip: "Playback rate: -1", diff --git a/devtools/client/inspector/grids/components/GridOutline.js b/devtools/client/inspector/grids/components/GridOutline.js index baa58fbc50487..7f4f84168632a 100644 --- a/devtools/client/inspector/grids/components/GridOutline.js +++ b/devtools/client/inspector/grids/components/GridOutline.js @@ -136,7 +136,8 @@ class GridOutline extends PureComponent { area => area.rowStart <= rowNumber && area.rowEnd > rowNumber && - (area.columnStart <= columnNumber && area.columnEnd > columnNumber) + area.columnStart <= columnNumber && + area.columnEnd > columnNumber ); if (!gridArea) { diff --git a/devtools/client/inspector/grids/test/xpcshell/test_compare_fragments_geometry.js b/devtools/client/inspector/grids/test/xpcshell/test_compare_fragments_geometry.js index 453ba454d62ad..e6947caa878cd 100644 --- a/devtools/client/inspector/grids/test/xpcshell/test_compare_fragments_geometry.js +++ b/devtools/client/inspector/grids/test/xpcshell/test_compare_fragments_geometry.js @@ -15,7 +15,10 @@ const TESTS = [ }, { desc: "Different number of fragments", - grids: [[{}, {}, {}], [{}, {}]], + grids: [ + [{}, {}, {}], + [{}, {}], + ], expected: false, }, { diff --git a/devtools/client/inspector/markup/test/head.js b/devtools/client/inspector/markup/test/head.js index a3b86a082ca46..4dba1b6c7b901 100644 --- a/devtools/client/inspector/markup/test/head.js +++ b/devtools/client/inspector/markup/test/head.js @@ -467,10 +467,9 @@ function checkFocusedAttribute(attrName, editMode) { * (e.g. ["id", "class", "href"]) */ var getAttributesFromEditor = async function(selector, inspector) { - const nodeList = (await getContainerForSelector( - selector, - inspector - )).tagLine.querySelectorAll("[data-attr]"); + const nodeList = ( + await getContainerForSelector(selector, inspector) + ).tagLine.querySelectorAll("[data-attr]"); return [...nodeList].map(node => node.getAttribute("data-attr")); }; diff --git a/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js b/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js index 4853b087883fc..2b6126a067011 100644 --- a/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js +++ b/devtools/client/inspector/test/browser_inspector_search-suggests-ids-and-classes.js @@ -14,18 +14,74 @@ // ] count can be left to represent 1 // ] const KEY_STATES = [ - ["s", [["span", 1], [".span", 1], ["#span", 1]]], - ["p", [["span", 1], [".span", 1], ["#span", 1]]], - ["a", [["span", 1], [".span", 1], ["#span", 1]]], - ["n", [["span", 1], [".span", 1], ["#span", 1]]], + [ + "s", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "p", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "a", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "n", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], [" ", [["span div", 1]]], // mixed tag/class/id suggestions only work for the first word ["d", [["span div", 1]]], ["VK_BACK_SPACE", [["span div", 1]]], - ["VK_BACK_SPACE", [["span", 1], [".span", 1], ["#span", 1]]], - ["VK_BACK_SPACE", [["span", 1], [".span", 1], ["#span", 1]]], - ["VK_BACK_SPACE", [["span", 1], [".span", 1], ["#span", 1]]], - ["VK_BACK_SPACE", [["span", 1], [".span", 1], ["#span", 1]]], + [ + "VK_BACK_SPACE", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "VK_BACK_SPACE", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "VK_BACK_SPACE", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], + [ + "VK_BACK_SPACE", + [ + ["span", 1], + [".span", 1], + ["#span", 1], + ], + ], ["VK_BACK_SPACE", []], // Test that mixed tags, classes and ids are grouped by types, sorted by // count and alphabetical order diff --git a/devtools/client/memory/utils.js b/devtools/client/memory/utils.js index 6ff5e0d885a75..36e6785dc8bd7 100644 --- a/devtools/client/memory/utils.js +++ b/devtools/client/memory/utils.js @@ -351,7 +351,8 @@ exports.canTakeCensus = function(snapshot) { snapshot.state === states.READ && (!snapshot.census || snapshot.census.state === censusState.SAVED || - (!snapshot.treeMap || snapshot.treeMap.state === treeMapState.SAVED)) + !snapshot.treeMap || + snapshot.treeMap.state === treeMapState.SAVED) ); }; diff --git a/devtools/client/netmonitor/src/components/HeadersPanel.js b/devtools/client/netmonitor/src/components/HeadersPanel.js index 38ac9ed1b469a..37383341fdf90 100644 --- a/devtools/client/netmonitor/src/components/HeadersPanel.js +++ b/devtools/client/netmonitor/src/components/HeadersPanel.js @@ -614,9 +614,6 @@ class HeadersPanel extends Component { } } -module.exports = connect( - null, - dispatch => ({ - resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), - }) -)(HeadersPanel); +module.exports = connect(null, dispatch => ({ + resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), +}))(HeadersPanel); diff --git a/devtools/client/netmonitor/src/components/PropertiesView.js b/devtools/client/netmonitor/src/components/PropertiesView.js index 9603a22a14d7b..caa0f848e3acb 100644 --- a/devtools/client/netmonitor/src/components/PropertiesView.js +++ b/devtools/client/netmonitor/src/components/PropertiesView.js @@ -324,9 +324,6 @@ class PropertiesView extends Component { } } -module.exports = connect( - null, - dispatch => ({ - resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), - }) -)(PropertiesView); +module.exports = connect(null, dispatch => ({ + resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), +}))(PropertiesView); diff --git a/devtools/client/netmonitor/src/components/SourceEditor.js b/devtools/client/netmonitor/src/components/SourceEditor.js index d707733cd758b..16eb9169e709e 100644 --- a/devtools/client/netmonitor/src/components/SourceEditor.js +++ b/devtools/client/netmonitor/src/components/SourceEditor.js @@ -130,9 +130,6 @@ class SourceEditor extends Component { } } -module.exports = connect( - null, - dispatch => ({ - resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), - }) -)(SourceEditor); +module.exports = connect(null, dispatch => ({ + resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), +}))(SourceEditor); diff --git a/devtools/client/netmonitor/src/components/previews/SourcePreview.js b/devtools/client/netmonitor/src/components/previews/SourcePreview.js index d3df484d6c331..e034ee54437a5 100644 --- a/devtools/client/netmonitor/src/components/previews/SourcePreview.js +++ b/devtools/client/netmonitor/src/components/previews/SourcePreview.js @@ -206,9 +206,6 @@ class SourcePreview extends Component { } } -module.exports = connect( - null, - dispatch => ({ - resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), - }) -)(SourcePreview); +module.exports = connect(null, dispatch => ({ + resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), +}))(SourcePreview); diff --git a/devtools/client/netmonitor/src/components/request-details/ParamsPanel.js b/devtools/client/netmonitor/src/components/request-details/ParamsPanel.js index b007658bcd4bb..66c2d0bec4477 100644 --- a/devtools/client/netmonitor/src/components/request-details/ParamsPanel.js +++ b/devtools/client/netmonitor/src/components/request-details/ParamsPanel.js @@ -263,10 +263,7 @@ class ParamsPanel extends Component { } } -module.exports = connect( - null, - dispatch => ({ - updateRequest: (id, data, batch) => - dispatch(Actions.updateRequest(id, data, batch)), - }) -)(ParamsPanel); +module.exports = connect(null, dispatch => ({ + updateRequest: (id, data, batch) => + dispatch(Actions.updateRequest(id, data, batch)), +}))(ParamsPanel); diff --git a/devtools/client/netmonitor/src/components/request-details/PropertiesView.js b/devtools/client/netmonitor/src/components/request-details/PropertiesView.js index cff4b4897c826..2a18a9aa9a918 100644 --- a/devtools/client/netmonitor/src/components/request-details/PropertiesView.js +++ b/devtools/client/netmonitor/src/components/request-details/PropertiesView.js @@ -222,9 +222,6 @@ class PropertiesView extends Component { } } -module.exports = connect( - null, - dispatch => ({ - resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), - }) -)(PropertiesView); +module.exports = connect(null, dispatch => ({ + resetTargetSearchResult: () => dispatch(setTargetSearchResult(null)), +}))(PropertiesView); diff --git a/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js b/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js index 330d3f53ffa92..34c85e57d3a90 100644 --- a/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js +++ b/devtools/client/netmonitor/src/components/request-list/RequestListEmptyNotice.js @@ -85,11 +85,8 @@ class RequestListEmptyNotice extends Component { } } -module.exports = connect( - undefined, - (dispatch, props) => ({ - onPerfClick: () => dispatch(Actions.openStatistics(props.connector, true)), - onReloadClick: () => - props.connector.triggerActivity(ACTIVITY_TYPE.RELOAD.WITH_CACHE_DEFAULT), - }) -)(RequestListEmptyNotice); +module.exports = connect(undefined, (dispatch, props) => ({ + onPerfClick: () => dispatch(Actions.openStatistics(props.connector, true)), + onReloadClick: () => + props.connector.triggerActivity(ACTIVITY_TYPE.RELOAD.WITH_CACHE_DEFAULT), +}))(RequestListEmptyNotice); diff --git a/devtools/client/netmonitor/test/browser_net_complex-params.js b/devtools/client/netmonitor/test/browser_net_complex-params.js index 8f304719785a2..280d6949ab8b3 100644 --- a/devtools/client/netmonitor/test/browser_net_complex-params.js +++ b/devtools/client/netmonitor/test/browser_net_complex-params.js @@ -127,7 +127,12 @@ add_task(async function() { document.querySelectorAll(".request-list-item")[11] ); await wait; - testParamsTabGetWithArgs(new Map([["a", ["b", "c"]], ["d", "1"]])); + testParamsTabGetWithArgs( + new Map([ + ["a", ["b", "c"]], + ["d", "1"], + ]) + ); await teardown(monitor); diff --git a/devtools/client/netmonitor/test/browser_net_streaming-response.js b/devtools/client/netmonitor/test/browser_net_streaming-response.js index a16b4bea32a07..79d5ed352990d 100644 --- a/devtools/client/netmonitor/test/browser_net_streaming-response.js +++ b/devtools/client/netmonitor/test/browser_net_streaming-response.js @@ -20,7 +20,10 @@ add_task(async function() { store.dispatch(Actions.batchEnable(false)); - const REQUESTS = [["hls-m3u8", /^#EXTM3U/], ["mpeg-dash", /^<\?xml/]]; + const REQUESTS = [ + ["hls-m3u8", /^#EXTM3U/], + ["mpeg-dash", /^<\?xml/], + ]; let wait = waitForNetworkEvents(monitor, REQUESTS.length); for (const [fmt] of REQUESTS) { diff --git a/devtools/client/performance-new/components/Presets.js b/devtools/client/performance-new/components/Presets.js index 77124625964cd..14a24fdb61224 100644 --- a/devtools/client/performance-new/components/Presets.js +++ b/devtools/client/performance-new/components/Presets.js @@ -123,7 +123,4 @@ const mapDispatchToProps = { changePreset: actions.changePreset, }; -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(Presets); +module.exports = connect(mapStateToProps, mapDispatchToProps)(Presets); diff --git a/devtools/client/performance-new/components/RecordingButton.js b/devtools/client/performance-new/components/RecordingButton.js index b36cff2b2603c..99e3b39f8d555 100644 --- a/devtools/client/performance-new/components/RecordingButton.js +++ b/devtools/client/performance-new/components/RecordingButton.js @@ -235,7 +235,4 @@ const mapDispatchToProps = { getProfileAndStopProfiler: actions.getProfileAndStopProfiler, }; -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(RecordingButton); +module.exports = connect(mapStateToProps, mapDispatchToProps)(RecordingButton); diff --git a/devtools/client/performance-new/popup/menu-button.jsm.js b/devtools/client/performance-new/popup/menu-button.jsm.js index 9d73efaa01d17..4f3b3bdebe9eb 100644 --- a/devtools/client/performance-new/popup/menu-button.jsm.js +++ b/devtools/client/performance-new/popup/menu-button.jsm.js @@ -103,7 +103,7 @@ function toggle(document) { // The widgets are not being properly destroyed. This is a workaround // until Bug 1552565 lands. const element = document.getElementById("PanelUI-profiler"); - delete /** @type {any} */ (element)._addedEventListeners; + delete (/** @type {any} */ (element._addedEventListeners)); } } diff --git a/devtools/client/performance/test/xpcshell/test_perf-utils-allocations-to-samples.js b/devtools/client/performance/test/xpcshell/test_perf-utils-allocations-to-samples.js index bbea67f516be4..e1c2c145e873d 100644 --- a/devtools/client/performance/test/xpcshell/test_perf-utils-allocations-to-samples.js +++ b/devtools/client/performance/test/xpcshell/test_perf-utils-allocations-to-samples.js @@ -58,7 +58,11 @@ var EXPECTED_OUTPUT = { time: 1, size: 2, }, - data: [[1, 150, 100], [2, 200, 200], [3, 250, 300]], + data: [ + [1, 150, 100], + [2, 200, 200], + [3, 250, 300], + ], }, stackTable: { schema: { diff --git a/devtools/client/performance/test/xpcshell/test_profiler-categories.js b/devtools/client/performance/test/xpcshell/test_profiler-categories.js index 737b39efc97ba..ae21efbae920d 100644 --- a/devtools/client/performance/test/xpcshell/test_profiler-categories.js +++ b/devtools/client/performance/test/xpcshell/test_profiler-categories.js @@ -15,7 +15,10 @@ add_task(function() { ok(count, "Should have a non-empty list of categories available."); - ok(CATEGORIES.some(e => e.color), "All categories have an associated color."); + ok( + CATEGORIES.some(e => e.color), + "All categories have an associated color." + ); ok( CATEGORIES.every(e => e.label), diff --git a/devtools/client/performance/test/xpcshell/test_tree-model-10.js b/devtools/client/performance/test/xpcshell/test_tree-model-10.js index 4bfe8a73544db..b928c99e4b091 100644 --- a/devtools/client/performance/test/xpcshell/test_tree-model-10.js +++ b/devtools/client/performance/test/xpcshell/test_tree-model-10.js @@ -42,7 +42,15 @@ add_task(function() { [ // total, self, name - [50, 50, "C", [[40, 0, "B", [[30, 0, "A"]]], [10, 0, "A"]]], + [ + 50, + 50, + "C", + [ + [40, 0, "B", [[30, 0, "A"]]], + [10, 0, "A"], + ], + ], [40, 40, "D", [[40, 0, "B", [[40, 0, "A"]]]]], [10, 10, "B", [[10, 0, "A"]]], ].forEach(compareFrameInfo(thread)); diff --git a/devtools/client/shared/test/browser_cubic-bezier-07.js b/devtools/client/shared/test/browser_cubic-bezier-07.js index 66ef1533d7b2a..f30a56202f598 100644 --- a/devtools/client/shared/test/browser_cubic-bezier-07.js +++ b/devtools/client/shared/test/browser_cubic-bezier-07.js @@ -40,9 +40,7 @@ async function previewDotReactsToChanges(widget, coords, expectedEasing) { const animations = animatedDot.getAnimations(); if (!expectedEasing) { - expectedEasing = `cubic-bezier(${coords[0]}, ${coords[1]}, ${coords[2]}, ${ - coords[3] - })`; + expectedEasing = `cubic-bezier(${coords[0]}, ${coords[1]}, ${coords[2]}, ${coords[3]})`; } is(animations.length, 1, "The dot is animated"); diff --git a/devtools/client/shared/test/browser_graphs-02.js b/devtools/client/shared/test/browser_graphs-02.js index b093e83680f02..d129e277f3ee9 100644 --- a/devtools/client/shared/test/browser_graphs-02.js +++ b/devtools/client/shared/test/browser_graphs-02.js @@ -46,7 +46,10 @@ const TEST_DATA = [ { delta: 4080, value: 60 }, { delta: 4180, value: 60 }, ]; -const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }]; +const TEST_REGIONS = [ + { start: 320, end: 460 }, + { start: 780, end: 860 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/shared/test/browser_graphs-05.js b/devtools/client/shared/test/browser_graphs-05.js index e00411acc22f6..416f6470bdab0 100644 --- a/devtools/client/shared/test/browser_graphs-05.js +++ b/devtools/client/shared/test/browser_graphs-05.js @@ -46,7 +46,10 @@ const TEST_DATA = [ { delta: 4080, value: 60 }, { delta: 4180, value: 60 }, ]; -const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }]; +const TEST_REGIONS = [ + { start: 320, end: 460 }, + { start: 780, end: 860 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/shared/test/browser_graphs-06.js b/devtools/client/shared/test/browser_graphs-06.js index e4b9a84667f4a..b34d11e8ca91b 100644 --- a/devtools/client/shared/test/browser_graphs-06.js +++ b/devtools/client/shared/test/browser_graphs-06.js @@ -46,7 +46,10 @@ const TEST_DATA = [ { delta: 4080, value: 60 }, { delta: 4180, value: 60 }, ]; -const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }]; +const TEST_REGIONS = [ + { start: 320, end: 460 }, + { start: 780, end: 860 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/shared/test/browser_graphs-07d.js b/devtools/client/shared/test/browser_graphs-07d.js index 0b90c92371ed8..501961a3ca314 100644 --- a/devtools/client/shared/test/browser_graphs-07d.js +++ b/devtools/client/shared/test/browser_graphs-07d.js @@ -46,7 +46,10 @@ const TEST_DATA = [ { delta: 4080, value: 60 }, { delta: 4180, value: 60 }, ]; -const TEST_REGIONS = [{ start: 320, end: 460 }, { start: 780, end: 860 }]; +const TEST_REGIONS = [ + { start: 320, end: 460 }, + { start: 780, end: 860 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/shared/test/browser_graphs-09d.js b/devtools/client/shared/test/browser_graphs-09d.js index c19e149b57f40..3f34884490947 100644 --- a/devtools/client/shared/test/browser_graphs-09d.js +++ b/devtools/client/shared/test/browser_graphs-09d.js @@ -6,7 +6,10 @@ // Tests that line graphs hide the 'max' tooltip when the distance between // the 'min' and 'max' tooltip is too small. -const TEST_DATA = [{ delta: 100, value: 60 }, { delta: 200, value: 59.9 }]; +const TEST_DATA = [ + { delta: 100, value: 60 }, + { delta: 200, value: 59.9 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/shared/test/browser_graphs-09f.js b/devtools/client/shared/test/browser_graphs-09f.js index 12e27767fc66c..8513347a7d970 100644 --- a/devtools/client/shared/test/browser_graphs-09f.js +++ b/devtools/client/shared/test/browser_graphs-09f.js @@ -6,7 +6,10 @@ // Tests the constructor options for `min`, `max` and `avg` on displaying the // gutter/tooltips and lines. -const TEST_DATA = [{ delta: 100, value: 60 }, { delta: 200, value: 1 }]; +const TEST_DATA = [ + { delta: 100, value: 60 }, + { delta: 200, value: 1 }, +]; const LineGraphWidget = require("devtools/client/shared/widgets/LineGraphWidget"); add_task(async function() { diff --git a/devtools/client/storage/test/browser_storage_basic.js b/devtools/client/storage/test/browser_storage_basic.js index 1829ebf3a00ec..7788f1feeee0a 100644 --- a/devtools/client/storage/test/browser_storage_basic.js +++ b/devtools/client/storage/test/browser_storage_basic.js @@ -53,10 +53,16 @@ const testCases = [ ), ], ], - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], diff --git a/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js b/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js index f65b987282057..6434e5a1aa34c 100644 --- a/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js +++ b/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js @@ -38,10 +38,16 @@ const testCases = [ ), ], ], - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], diff --git a/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js b/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js index 1e0694dcc6d70..f500d0fc89b0c 100644 --- a/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js +++ b/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js @@ -29,7 +29,10 @@ const testCasesUserContextId = [ ), ], ], - [["localStorage", "http://test1.example.org"], ["ls1uc1", "ls2uc1"]], + [ + ["localStorage", "http://test1.example.org"], + ["ls1uc1", "ls2uc1"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1uc1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1uc1"]], [["sessionStorage", "http://test1.example.org"], ["ss1uc1"]], diff --git a/devtools/client/storage/test/browser_storage_basic_with_fragment.js b/devtools/client/storage/test/browser_storage_basic_with_fragment.js index 82bdc494f9d63..fa15f1ed5b060 100644 --- a/devtools/client/storage/test/browser_storage_basic_with_fragment.js +++ b/devtools/client/storage/test/browser_storage_basic_with_fragment.js @@ -56,7 +56,10 @@ const testCases = [ ), ], ], - [["localStorage", "http://test1.example.org"], ["ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], [["sessionStorage", "http://test1.example.org"], ["ss1"]], diff --git a/devtools/client/storage/test/browser_storage_cookies_samesite.js b/devtools/client/storage/test/browser_storage_cookies_samesite.js index dbc82e1eb1545..7fe96db8a3a2f 100644 --- a/devtools/client/storage/test/browser_storage_cookies_samesite.js +++ b/devtools/client/storage/test/browser_storage_cookies_samesite.js @@ -28,7 +28,10 @@ add_task(async function() { ); await checkState([ - [["cookies", "http://test1.example.org"], [id1, id2, id3]], + [ + ["cookies", "http://test1.example.org"], + [id1, id2, id3], + ], ]); const sameSite1 = getRowValues(id1).sameSite; diff --git a/devtools/client/storage/test/browser_storage_delete_all.js b/devtools/client/storage/test/browser_storage_delete_all.js index 2a3ed36452402..f19cade8990f2 100644 --- a/devtools/client/storage/test/browser_storage_delete_all.js +++ b/devtools/client/storage/test/browser_storage_delete_all.js @@ -20,10 +20,16 @@ add_task(async function() { info("test state before delete"); const beforeState = [ - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], @@ -84,10 +90,16 @@ add_task(async function() { const afterState = [ // iframes from the same host, one secure, one unsecure, are independent // from each other. Delete all in one doesn't touch the other one. - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], []], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], diff --git a/devtools/client/storage/test/browser_storage_delete_tree.js b/devtools/client/storage/test/browser_storage_delete_tree.js index ad58e6b1e0fdb..27ca21548b27b 100644 --- a/devtools/client/storage/test/browser_storage_delete_tree.js +++ b/devtools/client/storage/test/browser_storage_delete_tree.js @@ -31,8 +31,14 @@ add_task(async function() { getCookieId("uc2", ".example.org", "/"), ], ], - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["indexedDB", "http://test1.example.org", "idb1 (default)", "obj1"], [1, 2, 3], diff --git a/devtools/client/storage/test/browser_storage_delete_usercontextid.js b/devtools/client/storage/test/browser_storage_delete_usercontextid.js index 731fe8be912cb..60dbf7dd24534 100644 --- a/devtools/client/storage/test/browser_storage_delete_usercontextid.js +++ b/devtools/client/storage/test/browser_storage_delete_usercontextid.js @@ -61,10 +61,16 @@ const storageItemsForDefault = [ ), ], ], - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], diff --git a/devtools/client/storage/test/browser_storage_dom_cache_disabled.js b/devtools/client/storage/test/browser_storage_dom_cache_disabled.js index 54a635040ea43..cdf372b923cb7 100644 --- a/devtools/client/storage/test/browser_storage_dom_cache_disabled.js +++ b/devtools/client/storage/test/browser_storage_dom_cache_disabled.js @@ -15,10 +15,16 @@ add_task(async function() { await openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html"); const state = [ - [["localStorage", "http://test1.example.org"], ["key", "ls1", "ls2"]], + [ + ["localStorage", "http://test1.example.org"], + ["key", "ls1", "ls2"], + ], [["localStorage", "http://sectest1.example.org"], ["iframe-u-ls1"]], [["localStorage", "https://sectest1.example.org"], ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], ["key", "ss1"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["key", "ss1"], + ], [ ["sessionStorage", "http://sectest1.example.org"], ["iframe-u-ss1", "iframe-u-ss2"], diff --git a/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js b/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js index 6800694df1a4b..b86290781b8a2 100644 --- a/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js +++ b/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js @@ -14,7 +14,10 @@ add_task(async function() { ok(gUI.sidebar.hidden, "Sidebar is initially hidden"); await checkState([ - [["sessionStorage", "http://test1.example.org"], ["ss1", "ss2", "ss3"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["ss1", "ss2", "ss3"], + ], ]); await setSessionStorageItem("ss4", "new-item"); @@ -39,7 +42,10 @@ add_task(async function() { await gUI.once("store-objects-edit"); await checkState([ - [["sessionStorage", "http://test1.example.org"], ["ss2", "ss4"]], + [ + ["sessionStorage", "http://test1.example.org"], + ["ss2", "ss4"], + ], ]); await selectTableItem("ss2"); diff --git a/devtools/client/storage/test/browser_storage_file_url.js b/devtools/client/storage/test/browser_storage_file_url.js index de680bd3de2a8..461a4c23c9ad9 100644 --- a/devtools/client/storage/test/browser_storage_file_url.js +++ b/devtools/client/storage/test/browser_storage_file_url.js @@ -54,8 +54,14 @@ add_task(async function() { ["indexedDB", actualPath, "MyDatabase (default)", "MyObjectStore"], [12345, 54321, 67890, 98765], ], - [["localStorage", actualPath], ["test3", "test4"]], - [["sessionStorage", actualPath], ["test5", "test6"]], + [ + ["localStorage", actualPath], + ["test3", "test4"], + ], + [ + ["sessionStorage", actualPath], + ["test5", "test6"], + ], ]); await finishTests(); diff --git a/devtools/client/webconsole/components/App.js b/devtools/client/webconsole/components/App.js index 99cba3b1132e9..172597ac9460c 100644 --- a/devtools/client/webconsole/components/App.js +++ b/devtools/client/webconsole/components/App.js @@ -480,7 +480,4 @@ const mapDispatchToProps = dispatch => ({ dispatch, }); -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(App); +module.exports = connect(mapStateToProps, mapDispatchToProps)(App); diff --git a/devtools/client/webconsole/components/Input/ConfirmDialog.js b/devtools/client/webconsole/components/Input/ConfirmDialog.js index 34b3be8baf08f..f7c8c88ea3f2d 100644 --- a/devtools/client/webconsole/components/Input/ConfirmDialog.js +++ b/devtools/client/webconsole/components/Input/ConfirmDialog.js @@ -109,7 +109,8 @@ class ConfirmDialog extends Component { render() { if ( (this.state && this.state.hasError) || - (!this.props || !this.props.getterPath) + !this.props || + !this.props.getterPath ) { return null; } @@ -192,7 +193,4 @@ function mapDispatchToProps(dispatch) { }; } -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(ConfirmDialog); +module.exports = connect(mapStateToProps, mapDispatchToProps)(ConfirmDialog); diff --git a/devtools/client/webconsole/components/Input/EagerEvaluation.js b/devtools/client/webconsole/components/Input/EagerEvaluation.js index b8040c5c3b0d1..162b59d0fb9d6 100644 --- a/devtools/client/webconsole/components/Input/EagerEvaluation.js +++ b/devtools/client/webconsole/components/Input/EagerEvaluation.js @@ -123,7 +123,4 @@ function mapDispatchToProps(dispatch) { dispatch(actions.unHighlightDomElement(grip)), }; } -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(EagerEvaluation); +module.exports = connect(mapStateToProps, mapDispatchToProps)(EagerEvaluation); diff --git a/devtools/client/webconsole/components/Input/JSTerm.js b/devtools/client/webconsole/components/Input/JSTerm.js index 7288d98703785..e83fb5c3dd278 100644 --- a/devtools/client/webconsole/components/Input/JSTerm.js +++ b/devtools/client/webconsole/components/Input/JSTerm.js @@ -1417,7 +1417,4 @@ function mapDispatchToProps(dispatch) { }; } -module.exports = connect( - mapStateToProps, - mapDispatchToProps -)(JSTerm); +module.exports = connect(mapStateToProps, mapDispatchToProps)(JSTerm); diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_async_stack.js b/devtools/client/webconsole/test/browser/browser_webconsole_async_stack.js index 663d8d2c240db..0982116b1a9b5 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_async_stack.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_async_stack.js @@ -74,9 +74,9 @@ async function getSimplifiedStack(messageEl) { return Array.from(framesEl) .map(frameEl => - Array.from(frameEl.querySelectorAll(".title,.location-async-cause")).map( - el => el.textContent.trim() - ) + Array.from( + frameEl.querySelectorAll(".title,.location-async-cause") + ).map(el => el.textContent.trim()) ) .flat() .join("\n"); diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_console_table.js b/devtools/client/webconsole/test/browser/browser_webconsole_console_table.js index 78e4618651c92..ffd9b9e9266c6 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_console_table.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_console_table.js @@ -29,7 +29,11 @@ add_task(async function() { input: ["apples", "oranges", "bananas"], expected: { columns: ["(index)", "Values"], - rows: [["0", "apples"], ["1", "oranges"], ["2", "bananas"]], + rows: [ + ["0", "apples"], + ["1", "oranges"], + ["2", "bananas"], + ], }, }, { @@ -62,15 +66,24 @@ add_task(async function() { input: new Person("John", "Smith"), expected: { columns: ["(index)", "Values"], - rows: [["firstName", "John"], ["lastName", "Smith"]], + rows: [ + ["firstName", "John"], + ["lastName", "Smith"], + ], }, }, { info: "Testing when data argument is an array of arrays", - input: [["Jane", "Doe"], ["Emily", "Jones"]], + input: [ + ["Jane", "Doe"], + ["Emily", "Jones"], + ], expected: { columns: ["(index)", "0", "1"], - rows: [["0", "Jane", "Doe"], ["1", "Emily", "Jones"]], + rows: [ + ["0", "Jane", "Doe"], + ["1", "Emily", "Jones"], + ], }, }, { @@ -111,15 +124,25 @@ add_task(async function() { input: new Set(["a", "b", "c"]), expected: { columns: ["(iteration index)", "Values"], - rows: [["0", "a"], ["1", "b"], ["2", "c"]], + rows: [ + ["0", "a"], + ["1", "b"], + ["2", "c"], + ], }, }, { info: "Testing when data argument is a Map", - input: new Map([["key-a", "value-a"], ["key-b", "value-b"]]), + input: new Map([ + ["key-a", "value-a"], + ["key-b", "value-b"], + ]), expected: { columns: ["(iteration index)", "Key", "Values"], - rows: [["0", "key-a", "value-a"], ["1", "key-b", "value-b"]], + rows: [ + ["0", "key-a", "value-a"], + ["1", "key-b", "value-b"], + ], }, }, { @@ -127,7 +150,12 @@ add_task(async function() { input: new Int8Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -135,7 +163,12 @@ add_task(async function() { input: new Uint8Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -143,7 +176,12 @@ add_task(async function() { input: new Int16Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -151,7 +189,12 @@ add_task(async function() { input: new Uint16Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -159,7 +202,12 @@ add_task(async function() { input: new Int32Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -167,7 +215,12 @@ add_task(async function() { input: new Uint32Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -175,7 +228,12 @@ add_task(async function() { input: new Float32Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -183,7 +241,12 @@ add_task(async function() { input: new Float64Array([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -191,7 +254,12 @@ add_task(async function() { input: new Uint8ClampedArray([1, 2, 3, 4]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1"], ["1", "2"], ["2", "3"], ["3", "4"]], + rows: [ + ["0", "1"], + ["1", "2"], + ["2", "3"], + ["3", "4"], + ], }, }, { @@ -200,7 +268,12 @@ add_task(async function() { input: new BigInt64Array([1n, 2n, 3n, 4n]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1n"], ["1", "2n"], ["2", "3n"], ["3", "4n"]], + rows: [ + ["0", "1n"], + ["1", "2n"], + ["2", "3n"], + ["3", "4n"], + ], }, }, { @@ -209,7 +282,12 @@ add_task(async function() { input: new BigUint64Array([1n, 2n, 3n, 4n]), expected: { columns: ["(index)", "Values"], - rows: [["0", "1n"], ["1", "2n"], ["2", "3n"], ["3", "4n"]], + rows: [ + ["0", "1n"], + ["1", "2n"], + ["2", "3n"], + ["3", "4n"], + ], }, }, { @@ -218,7 +296,10 @@ add_task(async function() { headers: ["firstName"], expected: { columns: ["(index)", "firstName"], - rows: [["0", "Sam"], ["1", "Elena"]], + rows: [ + ["0", "Sam"], + ["1", "Elena"], + ], }, }, { @@ -241,7 +322,11 @@ add_task(async function() { headers: [[]], expected: { columns: ["(index)", "Values"], - rows: [["0", "apples"], ["1", "oranges"], ["2", "bananas"]], + rows: [ + ["0", "apples"], + ["1", "oranges"], + ["2", "bananas"], + ], }, }, { diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_console_table_post_alterations.js b/devtools/client/webconsole/test/browser/browser_webconsole_console_table_post_alterations.js index 95394753e3ed4..cbbe4188bb100 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_console_table_post_alterations.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_console_table_post_alterations.js @@ -31,13 +31,24 @@ add_task(async function() { }); info("Check the rows of the first table"); - checkTable(table1, [[0, "a"], [1, "b"]]); + checkTable(table1, [ + [0, "a"], + [1, "b"], + ]); info("Check the rows of the table after adding an element to the array"); - checkTable(table2, [[0, "a"], [1, "b"], [2, "c"]]); + checkTable(table2, [ + [0, "a"], + [1, "b"], + [2, "c"], + ]); info("Check the rows of the table after sorting the array"); - checkTable(table3, [[0, "c"], [1, "b"], [2, "a"]]); + checkTable(table3, [ + [0, "c"], + [1, "b"], + [2, "a"], + ]); }); function checkTable(node, expectedRows) { diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_entire_message.js b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_entire_message.js index 9183fb421f1f8..f7bd52264958f 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_entire_message.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_entire_message.js @@ -198,7 +198,10 @@ async function copyMessageContent(hud, messageEl) { const copyMenuItem = menuPopup.querySelector("#console-menu-copy"); ok(copyMenuItem, "copy menu item is enabled"); - return waitForClipboardPromise(() => copyMenuItem.click(), data => data); + return waitForClipboardPromise( + () => copyMenuItem.click(), + data => data + ); } /** diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_async_stacktrace.js b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_async_stacktrace.js index a4a769c627aea..7cf1aafac06fe 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_async_stacktrace.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_async_stacktrace.js @@ -84,5 +84,8 @@ async function copyMessageContent(hud, messageEl) { const copyMenuItem = menuPopup.querySelector("#console-menu-copy"); ok(copyMenuItem, "copy menu item is enabled"); - return waitForClipboardPromise(() => copyMenuItem.click(), data => data); + return waitForClipboardPromise( + () => copyMenuItem.click(), + data => data + ); } diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_framework_stacktrace.js b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_framework_stacktrace.js index afa6bd4f5f205..64d86fa4ddd88 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_framework_stacktrace.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_context_menu_copy_message_with_framework_stacktrace.js @@ -122,5 +122,8 @@ async function copyMessageContent(hud, messageEl) { const copyMenuItem = menuPopup.querySelector("#console-menu-copy"); ok(copyMenuItem, "copy menu item is enabled"); - return waitForClipboardPromise(() => copyMenuItem.click(), data => data); + return waitForClipboardPromise( + () => copyMenuItem.click(), + data => data + ); } diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js b/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js index 03eee572698b5..82b57d4da553d 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js @@ -12,7 +12,10 @@ const TEST_URI = add_task(async function() { await SpecialPowers.pushPrefEnv({ - set: [["dom.audioworklet.enabled", true], ["dom.worklet.enabled", true]], + set: [ + ["dom.audioworklet.enabled", true], + ["dom.worklet.enabled", true], + ], }); const hud = await openNewTabAndConsole(TEST_URI); diff --git a/devtools/server/actors/highlighters/css-grid.js b/devtools/server/actors/highlighters/css-grid.js index 901f7e500f881..56e7d982052a7 100644 --- a/devtools/server/actors/highlighters/css-grid.js +++ b/devtools/server/actors/highlighters/css-grid.js @@ -1945,7 +1945,12 @@ class CssGridHighlighter extends AutoRefreshHighlighter { const container = this.getElement("line-infobar-container"); moveInfobar( container, - getBoundsFromPoints([{ x, y }, { x, y }, { x, y }, { x, y }]), + getBoundsFromPoints([ + { x, y }, + { x, y }, + { x, y }, + { x, y }, + ]), this.win ); } diff --git a/devtools/server/actors/highlighters/css-transform.js b/devtools/server/actors/highlighters/css-transform.js index d832f7245a0fa..018d6e6bfdb49 100644 --- a/devtools/server/actors/highlighters/css-transform.js +++ b/devtools/server/actors/highlighters/css-transform.js @@ -167,7 +167,7 @@ class CssTransformHighlighter extends AutoRefreshHighlighter { */ _isTransformed(node) { const style = getComputedStyle(node); - return style && (style.transform !== "none" && style.display !== "inline"); + return style && style.transform !== "none" && style.display !== "inline"; } _setPolygonPoints(quad, id) { diff --git a/devtools/server/actors/highlighters/shapes.js b/devtools/server/actors/highlighters/shapes.js index bb3f3c307edf9..acc7b79334e7b 100644 --- a/devtools/server/actors/highlighters/shapes.js +++ b/devtools/server/actors/highlighters/shapes.js @@ -2645,13 +2645,25 @@ class ShapesHighlighter extends AutoRefreshHighlighter { // Shape renders for "circle()" and "ellipse()" use the same SVG nodes. this._updateEllipseShape(width, height, zoom); // Draw markers for center and radius points. - this._drawMarkers([[cx, cy], [cx + rx, cy]], width, height, zoom); + this._drawMarkers( + [ + [cx, cy], + [cx + rx, cy], + ], + width, + height, + zoom + ); } else if (this.shapeType === "ellipse") { const { rx, ry, cx, cy } = this.coordinates; this._updateEllipseShape(width, height, zoom); // Draw markers for center, horizontal radius and vertical radius points. this._drawMarkers( - [[cx, cy], [cx + rx, cy], [cx, cy + ry]], + [ + [cx, cy], + [cx + rx, cy], + [cx, cy + ry], + ], width, height, zoom diff --git a/devtools/server/actors/highlighters/utils/canvas.js b/devtools/server/actors/highlighters/utils/canvas.js index 7d6b3f9389cd1..06f143d04d4d1 100644 --- a/devtools/server/actors/highlighters/utils/canvas.js +++ b/devtools/server/actors/highlighters/utils/canvas.js @@ -451,7 +451,12 @@ function getPathDescriptionFromPoints(points) { * matrix given. */ function getPointsFromDiagonal(x1, y1, x2, y2, matrix = identity()) { - return [[x1, y1], [x2, y1], [x2, y2], [x1, y2]].map(point => { + return [ + [x1, y1], + [x2, y1], + [x2, y2], + [x1, y2], + ].map(point => { const transformedPoint = apply(matrix, point); return { x: transformedPoint[0], y: transformedPoint[1] }; diff --git a/devtools/server/actors/inspector/walker.js b/devtools/server/actors/inspector/walker.js index 6778159c1d700..443e2cdfffb2d 100644 --- a/devtools/server/actors/inspector/walker.js +++ b/devtools/server/actors/inspector/walker.js @@ -1320,7 +1320,10 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, { */ search: function(query) { const results = this.walkerSearch.search(query); - const nodeList = new NodeListActor(this, results.map(r => r.node)); + const nodeList = new NodeListActor( + this, + results.map(r => r.node) + ); return { list: nodeList, diff --git a/devtools/server/actors/object.js b/devtools/server/actors/object.js index a3d614025c1cb..b7317b3096b61 100644 --- a/devtools/server/actors/object.js +++ b/devtools/server/actors/object.js @@ -484,8 +484,8 @@ const proto = { // by not including it as a safe getter value (see Bug 1477765). if ( getterValue && - (getterValue.class == "Promise" && - getterValue.promiseState == "rejected") + getterValue.class == "Promise" && + getterValue.promiseState == "rejected" ) { // Until we have a good way to handle Promise rejections through the // debugger API (Bug 1478076), call `catch` when it's safe to do so. diff --git a/devtools/server/actors/webconsole/eager-function-whitelist.js b/devtools/server/actors/webconsole/eager-function-whitelist.js index 36b941441ec07..01f8147fb9dca 100644 --- a/devtools/server/actors/webconsole/eager-function-whitelist.js +++ b/devtools/server/actors/webconsole/eager-function-whitelist.js @@ -10,7 +10,10 @@ const idlPureWhitelist = require("devtools/server/actors/webconsole/webidl-pure- // TODO: Bug 1616013 - Move more of these to be part of the pure list. const customEagerFunctions = { - Document: [["prototype", "getSelection"], ["prototype", "hasStorageAccess"]], + Document: [ + ["prototype", "getSelection"], + ["prototype", "hasStorageAccess"], + ], Range: [ ["prototype", "isPointInRange"], ["prototype", "comparePoint"], @@ -22,7 +25,10 @@ const customEagerFunctions = { ["prototype", "getClientRects"], ["prototype", "getBoundingClientRect"], ], - Selection: [["prototype", "getRangeAt"], ["prototype", "containsNode"]], + Selection: [ + ["prototype", "getRangeAt"], + ["prototype", "containsNode"], + ], }; const mergedFunctions = {}; diff --git a/devtools/server/actors/webconsole/webidl-pure-whitelist.js b/devtools/server/actors/webconsole/webidl-pure-whitelist.js index 658dd189cbec1..eca87f481d71c 100644 --- a/devtools/server/actors/webconsole/webidl-pure-whitelist.js +++ b/devtools/server/actors/webconsole/webidl-pure-whitelist.js @@ -7,7 +7,10 @@ "use strict"; module.exports = { - DOMTokenList: [["prototype", "item"], ["prototype", "contains"]], + DOMTokenList: [ + ["prototype", "item"], + ["prototype", "contains"], + ], Document: [ ["prototype", "getElementsByTagName"], ["prototype", "getElementsByTagNameNS"], diff --git a/devtools/server/tests/browser/browser_accessibility_simulator.js b/devtools/server/tests/browser/browser_accessibility_simulator.js index b0a60c962fb98..1476a6a6cc2c9 100644 --- a/devtools/server/tests/browser/browser_accessibility_simulator.js +++ b/devtools/server/tests/browser/browser_accessibility_simulator.js @@ -68,7 +68,10 @@ async function testSimulate(simulator, matrix, type = null) { } add_task(async function() { - const { target, accessibility } = await initAccessibilityFrontsForUrl( + const { + target, + accessibility, + } = await initAccessibilityFrontsForUrl( MAIN_DOMAIN + "doc_accessibility.html", { enableByDefault: false } ); diff --git a/devtools/server/tests/browser/browser_animation_emitMutations.js b/devtools/server/tests/browser/browser_animation_emitMutations.js index b902fb56be2ce..2d2ac8e9d0b23 100644 --- a/devtools/server/tests/browser/browser_animation_emitMutations.js +++ b/devtools/server/tests/browser/browser_animation_emitMutations.js @@ -54,7 +54,10 @@ add_task(async function() { ok(true, "The mutations event was emitted"); is(changes.length, 2, "There are 2 changes in the mutation event"); - ok(changes.every(({ type }) => type === "removed"), "Both are removals"); + ok( + changes.every(({ type }) => type === "removed"), + "Both are removals" + ); ok( changes[0].player === p1 || changes[0].player === p2, "The first removed player was one of the previously added players" diff --git a/devtools/server/tests/browser/browser_inspector-search.js b/devtools/server/tests/browser/browser_inspector-search.js index 875e59fbaa67d..8038b8250112b 100644 --- a/devtools/server/tests/browser/browser_inspector-search.js +++ b/devtools/server/tests/browser/browser_inspector-search.js @@ -224,7 +224,10 @@ add_task(async function() { results = walkerSearch.search("before element"); isDeeply( results, - [{ node: styleText, type: "text" }, { node: beforeElt, type: "text" }], + [ + { node: styleText, type: "text" }, + { node: beforeElt, type: "text" }, + ], "Text search works for pseudo element" ); @@ -242,7 +245,10 @@ add_task(async function() { results = walkerSearch.search("after element"); isDeeply( results, - [{ node: styleText, type: "text" }, { node: afterElt, type: "text" }], + [ + { node: styleText, type: "text" }, + { node: afterElt, type: "text" }, + ], "Text search works for pseudo element" ); diff --git a/devtools/server/tests/xpcshell/test_objectgrips-07.js b/devtools/server/tests/xpcshell/test_objectgrips-07.js index 7632d994f7373..3e38b57348714 100644 --- a/devtools/server/tests/xpcshell/test_objectgrips-07.js +++ b/devtools/server/tests/xpcshell/test_objectgrips-07.js @@ -21,9 +21,12 @@ add_task( ); const [f, s, ne, e] = packet.frame.arguments; - const [fClient, sClient, neClient, eClient] = packet.frame.arguments.map( - a => threadFront.pauseGrip(a) - ); + const [ + fClient, + sClient, + neClient, + eClient, + ] = packet.frame.arguments.map(a => threadFront.pauseGrip(a)); Assert.ok(!f.extensible); Assert.ok(!fClient.isExtensible); diff --git a/devtools/server/tests/xpcshell/test_objectgrips-20.js b/devtools/server/tests/xpcshell/test_objectgrips-20.js index 8c608b085ad77..5188bea40d9b0 100644 --- a/devtools/server/tests/xpcshell/test_objectgrips-20.js +++ b/devtools/server/tests/xpcshell/test_objectgrips-20.js @@ -42,27 +42,42 @@ add_task( { evaledObject: { 1: 1, length: 42, a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", 42], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", 42], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: 2.34, a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", 2.34], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", 2.34], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: -0, a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", -0], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", -0], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: -10, a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", -10], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", -10], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: true, a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", true], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", true], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: null, a: 10 }, @@ -75,12 +90,18 @@ add_task( { evaledObject: { 1: 1, length: Math.pow(2, 53), a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", 9007199254740992], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", 9007199254740992], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: "fake", a: 10 }, expectedIndexedProperties: [["1", 1]], - expectedNonIndexedProperties: [["length", "fake"], ["a", 10]], + expectedNonIndexedProperties: [ + ["length", "fake"], + ["a", 10], + ], }, { evaledObject: { 1: 1, length: Infinity, a: 10 }, @@ -97,7 +118,10 @@ add_task( }, { evaledObject: { 0: 0, 1: 1, length: 1 }, - expectedIndexedProperties: [["0", 0], ["1", 1]], + expectedIndexedProperties: [ + ["0", 0], + ["1", 1], + ], expectedNonIndexedProperties: [["length", 1]], }, { @@ -113,7 +137,10 @@ add_task( { evaledObject: { a: 1, [2 ** 32 - 2]: 2, [2 ** 32 - 1]: 3 }, expectedIndexedProperties: [["4294967294", 2]], - expectedNonIndexedProperties: [["a", 1], ["4294967295", 3]], + expectedNonIndexedProperties: [ + ["a", 1], + ["4294967295", 3], + ], }, { evaledObject: `(() => { @@ -121,8 +148,14 @@ add_task( x.foo = 90; return x; })()`, - expectedIndexedProperties: [["0", 12], ["1", 42]], - expectedNonIndexedProperties: [["length", 2], ["foo", 90]], + expectedIndexedProperties: [ + ["0", 12], + ["1", 42], + ], + expectedNonIndexedProperties: [ + ["length", 2], + ["foo", 90], + ], }, { evaledObject: `(() => { @@ -130,7 +163,11 @@ add_task( x.length = 3; return x; })()`, - expectedIndexedProperties: [["0", 12], ["1", 42], ["2", undefined]], + expectedIndexedProperties: [ + ["0", 12], + ["1", 42], + ["2", undefined], + ], expectedNonIndexedProperties: [["length", 3]], }, { @@ -153,7 +190,10 @@ add_task( ["1", 42], ["2", undefined], ], - expectedNonIndexedProperties: [["length", 3], ["foo", 90]], + expectedNonIndexedProperties: [ + ["length", 3], + ["foo", 90], + ], }, { evaledObject: `(() => { @@ -162,7 +202,10 @@ add_task( x.bar = "foo"; return x; })()`, - expectedIndexedProperties: [["0", undefined], ["1", undefined]], + expectedIndexedProperties: [ + ["0", undefined], + ["1", undefined], + ], expectedNonIndexedProperties: [ ["length", 2], ["foo", "bar"], @@ -176,7 +219,10 @@ add_task( x.bar = "foo"; return x; })()`, - expectedIndexedProperties: [["0", 0], ["1", 0]], + expectedIndexedProperties: [ + ["0", 0], + ["1", 0], + ], expectedNonIndexedProperties: [ ["foo", "bar"], ["bar", "foo"], @@ -192,7 +238,10 @@ add_task( Object.defineProperty(x, 'length', {value: 0}); return x; })()`, - expectedIndexedProperties: [["0", 1], ["1", 2]], + expectedIndexedProperties: [ + ["0", 1], + ["1", 2], + ], expectedNonIndexedProperties: [ ["length", 0], ["buffer", DO_NOT_CHECK_VALUE], @@ -206,14 +255,20 @@ add_task( Object.setPrototypeOf(x, null); return x; })()`, - expectedIndexedProperties: [["0", 1], ["1", 2]], + expectedIndexedProperties: [ + ["0", 1], + ["1", 2], + ], expectedNonIndexedProperties: [], }, { evaledObject: `(() => { return new (class extends Int8Array {})([1, 2]); })()`, - expectedIndexedProperties: [["0", 1], ["1", 2]], + expectedIndexedProperties: [ + ["0", 1], + ["1", 2], + ], expectedNonIndexedProperties: [ ["length", 2], ["buffer", DO_NOT_CHECK_VALUE], diff --git a/devtools/server/tests/xpcshell/test_objectgrips-fn-apply-01.js b/devtools/server/tests/xpcshell/test_objectgrips-fn-apply-01.js index ab5c4d6d4da71..25d2ccb0f7bbe 100644 --- a/devtools/server/tests/xpcshell/test_objectgrips-fn-apply-01.js +++ b/devtools/server/tests/xpcshell/test_objectgrips-fn-apply-01.js @@ -21,14 +21,12 @@ add_task( const objectFront = threadFront.pauseGrip(arg1); - const obj1 = (await objectFront.getPropertyValue( - "obj1", - null - )).value.return.getGrip(); - const obj2 = (await objectFront.getPropertyValue( - "obj2", - null - )).value.return.getGrip(); + const obj1 = ( + await objectFront.getPropertyValue("obj1", null) + ).value.return.getGrip(); + const obj2 = ( + await objectFront.getPropertyValue("obj2", null) + ).value.return.getGrip(); info(`Retrieve "context" function reference`); const context = (await objectFront.getPropertyValue("context", null)).value diff --git a/devtools/shared/fronts/walker.js b/devtools/shared/fronts/walker.js index ad041aa58fe36..96969f9a13ebe 100644 --- a/devtools/shared/fronts/walker.js +++ b/devtools/shared/fronts/walker.js @@ -486,9 +486,9 @@ class WalkerFront extends FrontClassWithSpec(walkerSpec) { const parentWalker = (await parentTarget.getFront("inspector")).walker; // As this