Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop.
authorFlorian Quèze <florian@queze.net>
Thu, 01 Feb 2018 20:45:22 +0100
changeset 454622 d5a5ad1dbbf2c53a80386e7397ba6b32153b2b8e
parent 454620 bffbab07fdc4c9a92b7a6ff5d68459961cc786ab
child 454623 5f88a7c7be35a52e8bc7a0798fefd62047199388
push id8799
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 16:46:23 +0000
treeherdermozilla-beta@15334014dc67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1339461
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop.
accessible/jsat/AccessFu.jsm
accessible/jsat/EventManager.jsm
accessible/jsat/Traversal.jsm
accessible/jsat/Utils.jsm
accessible/tests/mochitest/aom/test_general.html
accessible/tests/mochitest/autocomplete.js
accessible/tests/mochitest/common.js
accessible/tests/mochitest/jsat/jsatcommon.js
accessible/tests/mochitest/states/test_tree.xul
accessible/tests/mochitest/table/test_sels_listbox.xul
accessible/tests/mochitest/text/test_atcaretoffset.html
browser/base/content/browser-addons.js
browser/base/content/browser-thumbnails.js
browser/base/content/browser.js
browser/base/content/newtab/updater.js
browser/base/content/tabbrowser.xml
browser/base/content/test/forms/browser_selectpopup.js
browser/base/content/test/general/browser_bug521216.js
browser/base/content/test/general/browser_bug553455.js
browser/base/content/test/general/browser_clipboard.js
browser/base/content/test/general/browser_tab_dragdrop2_frame1.xul
browser/base/content/test/general/browser_tabfocus.js
browser/base/content/test/general/head.js
browser/base/content/test/general/test_remoteTroubleshoot.html
browser/base/content/test/permissions/browser_reservedkey.js
browser/base/content/test/permissions/head.js
browser/base/content/test/siteIdentity/head.js
browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
browser/base/content/test/urlbar/browser_urlbar_autoFill_backspaced.js
browser/base/content/test/urlbar/head.js
browser/base/content/test/webextensions/head.js
browser/base/content/test/webrtc/get_user_media_content_script.js
browser/base/content/urlbarBindings.xml
browser/components/contextualidentity/test/browser/browser_aboutURLs.js
browser/components/customizableui/CustomizableUI.jsm
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/content/toolbar.xml
browser/components/customizableui/test/browser_940013_registerToolbarNode_calls_registerArea.js
browser/components/customizableui/test/browser_982656_restore_defaults_builtin_widgets.js
browser/components/distribution.js
browser/components/downloads/content/downloads.js
browser/components/extensions/test/browser/browser_ext_getViews.js
browser/components/feeds/WebContentConverter.js
browser/components/migration/EdgeProfileMigrator.js
browser/components/migration/FirefoxProfileMigrator.js
browser/components/migration/IEProfileMigrator.js
browser/components/migration/MSMigrationUtils.jsm
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
browser/components/places/content/editBookmarkOverlay.js
browser/components/places/tests/browser/browser_bookmarks_sidebar_search.js
browser/components/preferences/containers.js
browser/components/preferences/cookies.js
browser/components/preferences/in-content/findInPage.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/tests/browser_bug705422.js
browser/components/preferences/translation.js
browser/components/search/test/browser_searchbar_openpopup.js
browser/components/sessionstore/SessionStore.jsm
browser/components/sessionstore/test/browser_backup_recovery.js
browser/components/sessionstore/test/browser_formdata_format.js
browser/components/sessionstore/test/browser_privatetabs.js
browser/components/sessionstore/test/browser_upgrade_backup.js
browser/components/sessionstore/test/content.js
browser/components/syncedtabs/SyncedTabsDeckStore.js
browser/components/tests/browser/browser_bug538331.js
browser/components/translation/BingTranslator.jsm
browser/components/translation/Translation.jsm
browser/components/translation/YandexTranslator.jsm
browser/components/translation/translation-infobar.xml
browser/components/uitour/UITour.jsm
browser/components/uitour/test/browser_UITour.js
browser/components/uitour/test/browser_trackingProtection_tour.js
browser/components/uitour/test/head.js
browser/experiments/Experiments.jsm
browser/extensions/asan-reporter/bootstrap.js
browser/extensions/aushelper/bootstrap.js
browser/extensions/formautofill/FormAutofillHandler.jsm
browser/extensions/mortar/host/pdf/chrome/js/l20n.js
browser/extensions/pdfjs/content/PdfJs.jsm
browser/extensions/pdfjs/content/PdfStreamConverter.jsm
browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
browser/extensions/pdfjs/content/build/pdf.js
browser/extensions/pdfjs/content/build/pdf.worker.js
browser/extensions/pocket/content/panels/js/saved.js
browser/extensions/screenshots/webextension/build/raven.js
browser/extensions/screenshots/webextension/build/shot.js
browser/extensions/screenshots/webextension/selector/uicontrol.js
browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm
browser/modules/BrowserUITelemetry.jsm
browser/modules/CastingApps.jsm
browser/modules/ContentCrashHandlers.jsm
browser/modules/ContentSearch.jsm
browser/modules/WindowsJumpLists.jsm
build/pgo/js-input/crypto-otp.html
caps/tests/mochitest/test_bug995943.xul
devtools/client/animationinspector/components/animation-timeline.js
devtools/client/animationinspector/test/browser_animation_participate_in_inspector_update.js
devtools/client/animationinspector/test/browser_animation_running_on_compositor.js
devtools/client/commandline/test/browser_cmd_inject.js
devtools/client/commandline/test/helpers.js
devtools/client/debugger/content/actions/sources.js
devtools/client/debugger/content/views/event-listeners-view.js
devtools/client/debugger/debugger-controller.js
devtools/client/debugger/new/parser-worker.js
devtools/client/debugger/new/pretty-print-worker.js
devtools/client/debugger/new/test/mochitest/examples/wasm-sourcemaps/average.js
devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
devtools/client/debugger/test/mochitest/browser_dbg_search-symbols.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-01.js
devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js
devtools/client/debugger/views/filter-view.js
devtools/client/debugger/views/watch-expressions-view.js
devtools/client/dom/content/grip-provider.js
devtools/client/framework/devtools.js
devtools/client/framework/sidebar.js
devtools/client/inspector/computed/computed.js
devtools/client/inspector/inspector.js
devtools/client/inspector/local-toolbox.js
devtools/client/inspector/markup/markup.js
devtools/client/inspector/rules/test/browser_rules_cubicbezier-commit-on-ENTER.js
devtools/client/inspector/rules/test/browser_rules_user-agent-styles.js
devtools/client/inspector/shared/test/browser_styleinspector_tooltip-background-image.js
devtools/client/inspector/test/browser_inspector_highlighter-geometry_03.js
devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
devtools/client/jsonview/components/JsonPanel.js
devtools/client/memory/reducers/snapshots.js
devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
devtools/client/memory/test/chrome/test_Heap_01.html
devtools/client/memory/test/chrome/test_Heap_05.html
devtools/client/memory/test/chrome/test_ShortestPaths_02.html
devtools/client/netmonitor/src/components/SecurityPanel.js
devtools/client/netmonitor/test/browser_net_resend.js
devtools/client/performance/components/jit-optimizations.js
devtools/client/performance/modules/logic/frame-utils.js
devtools/client/performance/modules/logic/telemetry.js
devtools/client/performance/modules/marker-blueprint-utils.js
devtools/client/performance/modules/marker-dom-utils.js
devtools/client/performance/modules/widgets/markers-overview.js
devtools/client/performance/performance-controller.js
devtools/client/performance/test/browser_perf-marker-details.js
devtools/client/performance/test/browser_perf-recording-notices-03.js
devtools/client/performance/test/browser_perf-recording-notices-04.js
devtools/client/performance/test/browser_timeline-waterfall-sidebar.js
devtools/client/performance/test/unit/test_profiler-categories.js
devtools/client/shared/AppCacheUtils.jsm
devtools/client/shared/components/reps/reps.js
devtools/client/shared/components/test/mochitest/test_sidebar_toggle.html
devtools/client/shared/demangle.js
devtools/client/shared/output-parser.js
devtools/client/shared/source-map/worker.js
devtools/client/shared/test/leakhunt.js
devtools/client/shared/widgets/VariablesView.jsm
devtools/client/shared/widgets/tooltip/Tooltip.js
devtools/client/sourceeditor/editor.js
devtools/client/sourceeditor/tern/condense.js
devtools/client/sourceeditor/tern/infer.js
devtools/client/sourceeditor/tern/tests/unit/test_autocompletion.js
devtools/client/sourceeditor/test/codemirror/test.js
devtools/client/sourceeditor/test/codemirror/vim_test.js
devtools/client/styleeditor/test/browser_styleeditor_missing_stylesheet.js
devtools/client/styleeditor/test/browser_styleeditor_sourcemaps.js
devtools/client/webconsole/console-output.js
devtools/client/webconsole/net/utils/json.js
devtools/client/webconsole/new-console-output/new-console-output-wrapper.js
devtools/client/webconsole/test/browser_console_certificate_imminent_distrust.js
devtools/client/webconsole/test/browser_webconsole_bug_582201_duplicate_errors.js
devtools/client/webconsole/test/browser_webconsole_bug_588730_text_node_insertion.js
devtools/client/webconsole/test/browser_webconsole_certificate_messages.js
devtools/client/webconsole/test/head.js
devtools/client/webconsole/webconsole.js
devtools/client/webide/content/monitor.js
devtools/client/webide/modules/addons.js
devtools/client/webide/modules/app-validator.js
devtools/client/webide/modules/config-view.js
devtools/server/actors/call-watcher.js
devtools/server/actors/highlighters/box-model.js
devtools/server/actors/highlighters/geometry-editor.js
devtools/server/actors/object.js
devtools/server/actors/script.js
devtools/server/actors/source.js
devtools/server/actors/utils/walker-search.js
devtools/server/actors/webconsole/listeners.js
devtools/server/actors/webgl.js
devtools/server/main.js
devtools/server/performance/recorder.js
devtools/server/tests/browser/head.js
devtools/server/tests/mochitest/test_device.html
devtools/server/tests/mochitest/test_framerate_04.html
devtools/server/tests/unit/test_blackboxing-06.js
devtools/server/tests/unit/test_frameactor-03.js
devtools/server/tests/unit/test_sourcemaps-04.js
devtools/server/tests/unit/test_sourcemaps-05.js
devtools/shared/acorn/acorn.js
devtools/shared/apps/app-actor-front.js
devtools/shared/client/debugger-client.js
devtools/shared/css/generated/generate-properties-db.js
devtools/shared/gcli/source/lib/gcli/cli.js
devtools/shared/gcli/source/lib/gcli/commands/help.js
devtools/shared/gcli/source/lib/gcli/commands/mocks.js
devtools/shared/gcli/source/lib/gcli/commands/test.js
devtools/shared/gcli/source/lib/gcli/languages/javascript.js
devtools/shared/gcli/source/lib/gcli/settings.js
devtools/shared/gcli/source/lib/gcli/types/command.js
devtools/shared/gcli/source/lib/gcli/types/date.js
devtools/shared/gcli/source/lib/gcli/types/javascript.js
devtools/shared/gcli/source/lib/gcli/types/number.js
devtools/shared/gcli/source/lib/gcli/types/selection.js
devtools/shared/gcli/source/lib/gcli/types/types.js
devtools/shared/gcli/source/lib/gcli/types/union.js
devtools/shared/gcli/source/lib/gcli/types/url.js
devtools/shared/gcli/source/lib/gcli/util/util.js
devtools/shared/gcli/templater.js
devtools/shared/jsbeautify/lib/urlencode_unpacker.js
devtools/shared/jsbeautify/src/beautify-css.js
devtools/shared/jsbeautify/src/beautify-html.js
devtools/shared/jsbeautify/src/beautify-tests.js
devtools/shared/task.js
devtools/shared/tests/unit/test_css-properties-db.js
devtools/shared/transport/transport.js
devtools/shared/webconsole/js-property-provider.js
devtools/shared/webconsole/network-monitor.js
devtools/shared/webconsole/server-logger-monitor.js
devtools/shared/webconsole/server-logger.js
devtools/shared/webconsole/test/unit/test_js_property_provider.js
devtools/shared/worker/worker.js
docshell/test/browser/frame-head.js
docshell/test/chrome/bug301397_window.xul
docshell/test/chrome/test_private_hidden_window.html
docshell/test/navigation/file_bug462076_1.html
docshell/test/navigation/file_bug462076_2.html
docshell/test/navigation/file_bug462076_3.html
docshell/test/navigation/file_bug508537_1.html
docshell/test/navigation/file_nested_frames.html
docshell/test/navigation/file_static_and_dynamic_1.html
dom/base/test/chrome/test_bug884693.xul
dom/base/test/chrome/window_nsITextInputProcessor.xul
dom/base/test/copypaste.js
dom/base/test/file_bug1008126_worker.js
dom/base/test/file_bug416317.xhtml
dom/base/test/file_bug945152_worker.js
dom/base/test/referrerHelper.js
dom/base/test/test_bug116083.html
dom/base/test/test_bug166235.html
dom/base/test/test_bug338583.html
dom/base/test/test_bug704320_preload.html
dom/base/test/test_copyimage.html
dom/base/test/test_mutationobservers.html
dom/base/test/test_postMessages.html
dom/base/test/test_urgent_start.html
dom/bindings/test/test_async_stacks.html
dom/bindings/test/test_dom_xrays.html
dom/browser-element/mochitest/browserElementTestHelpers.js
dom/browser-element/mochitest/browserElement_OpenWindowRejected.js
dom/browser-element/mochitest/browserElement_OpenWindowRejected2.js
dom/browser-element/mochitest/file_browserElement_PrivateBrowsing.html
dom/cache/test/mochitest/test_cache.js
dom/cache/test/mochitest/test_cache_delete.js
dom/cache/test/mochitest/test_cache_keys.js
dom/cache/test/mochitest/test_cache_match_vary.js
dom/cache/test/mochitest/test_cache_put_reorder.js
dom/canvas/test/chrome/test_webgl_debug_renderer_info.html
dom/canvas/test/test_canvas.html
dom/canvas/test/webgl-conf/mochi-single.html
dom/canvas/test/webgl-mochitest/driver-info.js
dom/canvas/test/webgl-mochitest/test_webgl_compressed_texture_es3.html
dom/console/tests/test_jsm.xul
dom/events/test/pointerevents/test_bug1420589_1.html
dom/events/test/pointerevents/test_bug1420589_2.html
dom/events/test/pointerevents/test_bug1420589_3.html
dom/events/test/pointerevents/test_remove_frame_when_got_pointer_capture.html
dom/events/test/test_bug336682.js
dom/events/test/test_bug415498.xul
dom/events/test/test_bug547996-2.xhtml
dom/events/test/test_bug586961.xul
dom/events/test/test_bug603008.html
dom/events/test/test_bug741666.html
dom/file/tests/test_blobconstructor.html
dom/html/test/bug1260704_iframe.html
dom/html/test/file_fullscreen-plugins.html
dom/html/test/test_bug1823.html
dom/html/test/test_bug590363.html
dom/html/test/test_document-element-inserted.html
dom/html/test/test_fullscreen-api.html
dom/imptests/testharness.js
dom/media/test/manifest.js
dom/media/test/reactivate_helper.html
dom/media/test/test_autoplay_contentEditable.html
dom/media/test/test_can_play_type_mpeg.html
dom/media/test/test_eme_request_notifications.html
dom/media/test/test_play_events.html
dom/media/test/test_play_events_2.html
dom/media/tests/mochitest/pc.js
dom/media/tests/mochitest/test_getUserMedia_basicScreenshare.html
dom/media/tests/mochitest/test_getUserMedia_basicTabshare.html
dom/media/tests/mochitest/test_getUserMedia_basicWindowshare.html
dom/media/tests/mochitest/test_getUserMedia_constraints.html
dom/media/tests/mochitest/test_getUserMedia_scarySources.html
dom/media/tests/mochitest/test_peerConnection_basicScreenshare.html
dom/media/tests/mochitest/test_peerConnection_basicWindowshare.html
dom/media/tests/mochitest/test_peerConnection_insertDTMF.html
dom/media/tests/mochitest/test_peerConnection_throwInCallbacks.html
dom/media/webaudio/test/test_mediaDecoding.html
dom/media/webspeech/recognition/test/head.js
dom/media/webvtt/vtt.jsm
dom/notification/test/mochitest/test_notification_tag.html
dom/performance/tests/test_performance_user_timing.js
dom/plugins/test/mochitest/hang_test.js
dom/plugins/test/mochitest/test_hang_submit.xul
dom/plugins/test/mochitest/test_wmode.xul
dom/presentation/tests/mochitest/PresentationDeviceInfoChromeScript.js
dom/presentation/tests/mochitest/test_presentation_1ua_connection_wentaway.js
dom/presentation/tests/mochitest/test_presentation_1ua_sender_and_receiver.js
dom/presentation/tests/mochitest/test_presentation_receiver_auxiliary_navigation.js
dom/presentation/tests/mochitest/test_presentation_tcp_receiver_establish_connection_unknown_content_type.js
dom/presentation/tests/mochitest/test_presentation_terminate.js
dom/presentation/tests/mochitest/test_presentation_terminate_establish_connection_error.js
dom/push/PushServiceWebSocket.jsm
dom/push/test/lifetime_worker.js
dom/push/test/test_has_permissions.html
dom/security/test/cors/file_cors_logging_test.html
dom/security/test/cors/test_CrossSiteXHR.html
dom/security/test/csp/test_iframe_sandbox.html
dom/security/test/general/test_block_toplevel_data_navigation.html
dom/security/test/mixedcontentblocker/file_frameNavigation_grandchild.html
dom/security/test/mixedcontentblocker/file_frameNavigation_secure_grandchild.html
dom/serviceworkers/test/download/worker.js
dom/serviceworkers/test/download_canceled/sw_download_canceled.js
dom/serviceworkers/test/fetch/context/context_test.js
dom/serviceworkers/test/fetch/cookie/cookie_test.js
dom/serviceworkers/test/fetch/hsts/hsts_test.js
dom/serviceworkers/test/fetch/https/clonedresponse/https_test.js
dom/serviceworkers/test/fetch/https/https_test.js
dom/serviceworkers/test/fetch/imagecache-maxage/maxage_test.js
dom/serviceworkers/test/fetch/imagecache/imagecache_test.js
dom/serviceworkers/test/fetch/importscript-mixedcontent/https_test.js
dom/serviceworkers/test/fetch/origin/https/origin_test.js
dom/serviceworkers/test/fetch/origin/origin_test.js
dom/serviceworkers/test/fetch/sandbox/sandbox_test.js
dom/serviceworkers/test/fetch/upgrade-insecure/upgrade-insecure_test.js
dom/serviceworkers/test/openWindow_worker.js
dom/serviceworkers/test/sanitize_worker.js
dom/tests/mochitest/bugs/test_bug691707.html
dom/tests/mochitest/bugs/test_resize_move_windows.html
dom/tests/mochitest/bugs/test_sizetocontent_clamp.html
dom/tests/mochitest/chrome/test_resize_move_windows.xul
dom/tests/mochitest/chrome/window_focus.xul
dom/tests/mochitest/fetch/reroute.js
dom/tests/mochitest/fetch/test_fetch_cors.js
dom/tests/mochitest/general/navigation_timing.html
dom/tests/mochitest/general/test_clipboard_events.html
dom/tests/mochitest/general/test_focusrings.xul
dom/tests/mochitest/general/test_interfaces.js
dom/tests/mochitest/general/test_offsets.xul
dom/tests/mochitest/general/test_paste_selection.html
dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
dom/workers/test/test_threadErrors.html
dom/worklet/tests/common.js
dom/xhr/tests/test_XHRSendData.html
dom/xml/test/file_bug392338.js
editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
editor/libeditor/tests/browserscope/lib/richtext/richtext/richtext.html
editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js
editor/libeditor/tests/test_bug1425997.html
editor/libeditor/tests/test_bug410986.html
editor/libeditor/tests/test_bug525389.html
editor/libeditor/tests/test_bug676401.html
extensions/cookie/test/file_testloadflags_chromescript.js
gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js
gfx/layers/layerviewer/layerTreeView.js
intl/locale/tests/unit/test_bug22310.js
js/examples/jorendb.js
js/xpconnect/tests/chrome/test_bug895340.xul
js/xpconnect/tests/chrome/test_cloneInto.xul
js/xpconnect/tests/chrome/test_nsScriptErrorWithStack.html
js/xpconnect/tests/chrome/test_wrappers.xul
js/xpconnect/tests/chrome/test_xrayToJS.xul
js/xpconnect/tests/mochitest/test_sameOriginPolicy.html
js/xpconnect/tests/unit/test_allowedDomains.js
js/xpconnect/tests/unit/test_bug853709.js
js/xpconnect/tests/unit/test_components.js
js/xpconnect/tests/unit/test_returncode.js
js/xpconnect/tests/unit/test_sandbox_name.js
layout/base/tests/bug970964_inner.html
layout/base/tests/bug970964_inner2.html
layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul
layout/base/tests/test_bug993936.html
layout/base/tests/test_reftests_with_caret.html
layout/base/tests/test_scroll_snapping_scrollbars.html
layout/forms/test/test_bug665540.html
layout/forms/test/test_bug672810.html
layout/forms/test/test_select_key_navigation_bug961363.html
layout/generic/test/plugin_focus_helper.html
layout/generic/test/test_bug392746.html
layout/generic/test/test_bug438840.html
layout/generic/test/test_bug632379.xul
layout/generic/test/test_movement_by_characters.html
layout/generic/test/test_movement_by_words.html
layout/generic/test/test_selection_expanding.html
layout/generic/test/test_selection_preventDefault.html
layout/inspector/tests/test_is_valid_css_color.html
layout/style/test/animation_utils.js
layout/style/test/chrome/bug418986-2.js
layout/style/test/chrome/test_bug1160724.xul
layout/style/test/test_computed_style_prefs.html
layout/style/test/test_pseudoelement_state.html
layout/style/test/test_value_computation.html
layout/style/test/test_value_storage.html
layout/tools/reftest/reftest-content.js
layout/xul/test/test_bug511075.html
layout/xul/test/window_resizer_element.xul
media/webrtc/trunk/build/android/pylib/device_stats_monitor.html
media/webrtc/trunk/webrtc/tools/loopback_test/loopback_test.js
mobile/android/chrome/content/CastingApps.js
mobile/android/chrome/content/ConsoleAPI.js
mobile/android/chrome/content/aboutLogins.js
mobile/android/chrome/content/browser.js
mobile/android/components/ContentPermissionPrompt.js
mobile/android/components/HelperAppDialog.js
mobile/android/components/Snippets.js
mobile/android/components/geckoview/GeckoViewPrompt.js
mobile/android/modules/Home.jsm
mobile/android/modules/SelectHelper.jsm
mobile/android/tests/browser/chrome/test_desktop_useragent.html
modules/libjar/test/mochitest/test_bug1034143_mapped.html
netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm
netwerk/protocol/http/WellKnownOpportunisticUtils.js
netwerk/test/mochitests/test_user_agent_overrides.html
netwerk/test/mochitests/test_user_agent_updates.html
netwerk/test/unit/test_authentication.js
netwerk/test/unit/test_bug248970_cookie.js
netwerk/test/unit/test_bug380994.js
netwerk/test/unit/test_cookiejars.js
netwerk/test/unit/test_dns_disable_ipv4.js
netwerk/test/unit/test_dns_disable_ipv6.js
netwerk/test/unit/test_mozTXTToHTMLConv.js
netwerk/test/unit/test_predictor.js
netwerk/test/unit/test_udp_multicast.js
security/manager/ssl/tests/unit/head_psm.js
security/manager/ssl/tests/unit/test_sss_savestate.js
security/manager/tools/genHPKPStaticPins.js
services/common/blocklist-clients.js
services/common/kinto-http-client.js
services/common/kinto-offline-client.js
services/common/tests/unit/test_restrequest.js
services/fxaccounts/tests/xpcshell/test_oauth_grant_client.js
services/fxaccounts/tests/xpcshell/test_profile_client.js
services/sync/modules/addonsreconciler.js
services/sync/modules/bookmark_repair.js
services/sync/modules/engines/addons.js
services/sync/modules/engines/bookmarks.js
services/sync/modules/policies.js
services/sync/modules/service.js
services/sync/tests/unit/head_http_server.js
services/sync/tests/unit/test_bookmark_engine.js
services/sync/tests/unit/test_bookmark_repair_responder.js
services/sync/tests/unit/test_bookmark_smart_bookmarks.js
services/sync/tests/unit/test_bookmark_validator.js
services/sync/tests/unit/test_resource.js
services/sync/tests/unit/test_tab_tracker.js
services/sync/tests/unit/test_utils_makeGUID.js
services/sync/tps/extensions/tps/resource/tps.jsm
storage/test/unit/test_like.js
storage/test/unit/test_vacuum.js
testing/marionette/cookie.js
testing/marionette/doc/api/scripts/prettify/prettify.js
testing/marionette/event.js
testing/marionette/harness/marionette_harness/www/testAction.html
testing/marionette/legacyaction.js
testing/mochitest/browser-test.js
testing/mochitest/server.js
testing/mochitest/tests/SimpleTest/EventUtils.js
testing/mochitest/tests/SimpleTest/SimpleTest.js
testing/specialpowers/content/MozillaLogger.js
testing/specialpowers/content/SpecialPowersObserver.jsm
testing/specialpowers/content/SpecialPowersObserverAPI.js
testing/specialpowers/content/specialpowers.js
testing/specialpowers/content/specialpowersAPI.js
testing/talos/talos/pageloader/chrome/MozillaFileLogger.js
testing/talos/talos/pageloader/chrome/pageloader.js
testing/talos/talos/scripts/MozillaFileLogger.js
testing/talos/talos/tests/devtools/addon/content/addon-test-frontend.js
testing/talos/talos/tests/tart/addon/content/tart.html
testing/talos/talos/tests/video/video_playback.html
testing/xpcshell/node-http2/lib/http.js
testing/xpcshell/node-http2/test/stream.js
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/aboutmemory/tests/test_memoryReporters.xul
toolkit/components/addoncompat/CompatWarning.jsm
toolkit/components/addoncompat/RemoteAddonsParent.jsm
toolkit/components/addoncompat/tests/addon/bootstrap.js
toolkit/components/contentprefs/ContentPrefService2.js
toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
toolkit/components/crashes/tests/xpcshell/test_crash_store.js
toolkit/components/extensions/test/xpcshell/test_ext_background_runtime_connect_params.js
toolkit/components/extensions/test/xpcshell/test_ext_runtime_getPlatformInfo.js
toolkit/components/feeds/FeedProcessor.js
toolkit/components/jsdownloads/src/DownloadCore.jsm
toolkit/components/microformats/microformat-shiv.js
toolkit/components/microformats/test/lib/html.js
toolkit/components/microformats/test/lib/isodate.js
toolkit/components/microformats/test/lib/parser-implied.js
toolkit/components/microformats/test/lib/parser-rels.js
toolkit/components/microformats/test/lib/parser.js
toolkit/components/microformats/test/lib/text.js
toolkit/components/microformats/test/lib/url.js
toolkit/components/osfile/modules/osfile_shared_allthreads.jsm
toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
toolkit/components/osfile/tests/mochi/test_osfile_back.xul
toolkit/components/osfile/tests/xpcshell/test_compression.js
toolkit/components/osfile/tests/xpcshell/test_logging.js
toolkit/components/osfile/tests/xpcshell/test_reset.js
toolkit/components/osfile/tests/xpcshell/test_shutdown.js
toolkit/components/passwordmgr/LoginHelper.jsm
toolkit/components/passwordmgr/LoginRecipes.jsm
toolkit/components/passwordmgr/content/passwordManager.js
toolkit/components/passwordmgr/test/browser/browser_insecurePasswordConsoleWarning.js
toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
toolkit/components/perfmonitoring/PerformanceStats-content.js
toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
toolkit/components/places/tests/queries/test_querySerialization.js
toolkit/components/places/tests/queries/test_tags.js
toolkit/components/privatebrowsing/PrivateBrowsingTrackingProtectionWhitelist.js
toolkit/components/processsingleton/MainProcessSingleton.js
toolkit/components/reader/test/head.js
toolkit/components/satchel/test/subtst_privbrowsing.html
toolkit/components/search/SearchStaticData.jsm
toolkit/components/search/nsSearchService.js
toolkit/components/search/tests/xpcshell/test_SearchStaticData.js
toolkit/components/thumbnails/test/browser_thumbnails_bg_queueing.js
toolkit/components/url-classifier/SafeBrowsing.jsm
toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
toolkit/components/url-classifier/tests/unit/test_dbservice.js
toolkit/components/url-classifier/tests/unit/test_hashcompleter.js
toolkit/components/workerloader/require.js
toolkit/content/aboutTelemetry.js
toolkit/content/browser-content.js
toolkit/content/contentAreaUtils.js
toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
toolkit/content/tests/browser/head.js
toolkit/content/tests/chrome/bug451540_window.xul
toolkit/content/tests/chrome/test_arrowpanel.xul
toolkit/content/tests/chrome/test_autocomplete3.xul
toolkit/content/tests/chrome/test_autocomplete4.xul
toolkit/content/tests/chrome/test_bug624329.xul
toolkit/content/tests/chrome/test_button.xul
toolkit/content/tests/chrome/test_dialogfocus.xul
toolkit/content/tests/chrome/test_focus_anons.xul
toolkit/content/tests/chrome/test_menuchecks.xul
toolkit/content/tests/chrome/test_menuitem_commands.xul
toolkit/content/tests/chrome/test_menulist_position.xul
toolkit/content/tests/chrome/test_radio.xul
toolkit/content/tests/chrome/test_scale.xul
toolkit/content/tests/chrome/test_scrollbar.xul
toolkit/content/tests/chrome/window_keys.xul
toolkit/content/tests/chrome/window_panel.xul
toolkit/content/tests/chrome/window_titlebar.xul
toolkit/content/tests/chrome/xul_selectcontrol.js
toolkit/content/tests/widgets/test_contextmenu_menugroup.xul
toolkit/content/tests/widgets/test_contextmenu_nested.xul
toolkit/content/tests/widgets/tree_shared.js
toolkit/content/tests/widgets/window_menubar.xul
toolkit/forgetaboutsite/ForgetAboutSite.jsm
toolkit/modules/BrowserUtils.jsm
toolkit/modules/Finder.jsm
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/Log.jsm
toolkit/modules/PageMetadata.jsm
toolkit/modules/PopupNotifications.jsm
toolkit/modules/Promise-backend.js
toolkit/modules/SelectContentHelper.jsm
toolkit/modules/Sqlite.jsm
toolkit/modules/Task.jsm
toolkit/modules/WindowDraggingUtils.jsm
toolkit/modules/addons/WebRequest.jsm
toolkit/modules/addons/WebRequestCommon.jsm
toolkit/modules/tests/browser/browser_Deprecated.js
toolkit/modules/tests/browser/browser_RemotePageManager.js
toolkit/modules/tests/browser/browser_WebRequest.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/modules/tests/xpcshell/test_sqlite.js
toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
toolkit/modules/tests/xpcshell/test_task.js
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xml
toolkit/mozapps/extensions/internal/AddonRepository.jsm
toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
toolkit/mozapps/extensions/internal/GMPProvider.jsm
toolkit/mozapps/extensions/internal/PluginProvider.jsm
toolkit/mozapps/extensions/internal/XPIInstall.jsm
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/nsBlocklistService.js
toolkit/mozapps/extensions/test/browser/browser_recentupdates.js
toolkit/mozapps/extensions/test/browser/head.js
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
toolkit/mozapps/extensions/test/xpcshell/test_gmpProvider.js
toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
tools/profiler/tests/test_asm.js
widget/tests/test_assign_event_data.html
widget/tests/test_bug517396.xul
widget/tests/test_bug538242.xul
widget/tests/test_bug596600.xul
widget/tests/test_platform_colors.xul
widget/tests/test_sizemode_events.xul
widget/tests/window_composition_text_querycontent.xul
xpcom/tests/unit/test_symlinks.js
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -260,17 +260,17 @@ this.AccessFu = { // jshint ignore:line
 
     if (this._notifyOutputPref.value) {
       Services.obs.notifyObservers(null, "accessibility-output",
                                    JSON.stringify(aPresentationData));
     }
   },
 
   _loadFrameScript: function _loadFrameScript(aMessageManager) {
-    if (this._processedMessageManagers.indexOf(aMessageManager) < 0) {
+    if (!this._processedMessageManagers.includes(aMessageManager)) {
       aMessageManager.loadFrameScript(
         "chrome://global/content/accessibility/content-script.js", true);
       this._processedMessageManagers.push(aMessageManager);
     } else if (this._enabled) {
       // If the content-script is already loaded and AccessFu is enabled,
       // send an AccessFu:Start message.
       aMessageManager.sendAsyncMessage("AccessFu:Start",
         {method: "start", buildApp: Utils.MozBuildApp});
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -266,19 +266,19 @@ this.EventManager.prototype = {
         }
         break;
       }
       case Events.FOCUS:
       {
         // Put vc where the focus is at
         let acc = aEvent.accessible;
         this._setEditingMode(aEvent);
-        if ([Roles.CHROME_WINDOW,
+        if (![Roles.CHROME_WINDOW,
              Roles.DOCUMENT,
-             Roles.APPLICATION].indexOf(acc.role) < 0) {
+             Roles.APPLICATION].includes(acc.role)) {
           this.contentControl.autoMove(acc);
        }
 
        if (this.inTest) {
         this.sendMsgFunc("AccessFu:Focused");
        }
        break;
       }
--- a/accessible/jsat/Traversal.jsm
+++ b/accessible/jsat/Traversal.jsm
@@ -23,20 +23,20 @@ ChromeUtils.defineModuleGetter(this, "Pr
   "resource://gre/modules/accessibility/Constants.jsm");
 
 var gSkipEmptyImages = new PrefCache("accessibility.accessfu.skip_empty_images");
 
 function BaseTraversalRule(aRoles, aMatchFunc, aPreFilter, aContainerRule) {
   this._explicitMatchRoles = new Set(aRoles);
   this._matchRoles = aRoles;
   if (aRoles.length) {
-    if (aRoles.indexOf(Roles.LABEL) < 0) {
+    if (!aRoles.includes(Roles.LABEL)) {
       this._matchRoles.push(Roles.LABEL);
     }
-    if (aRoles.indexOf(Roles.INTERNAL_FRAME) < 0) {
+    if (!aRoles.includes(Roles.INTERNAL_FRAME)) {
       // Used for traversing in to child OOP frames.
       this._matchRoles.push(Roles.INTERNAL_FRAME);
     }
   }
   this._matchFunc = aMatchFunc || function() { return Filters.MATCH; };
   this.preFilter = aPreFilter || gSimplePreFilter;
   this.containerRule = aContainerRule;
 }
@@ -117,17 +117,17 @@ var gSimpleMatchFunc = function gSimpleM
     }
     return true;
   }
 
   function isFlatSubtree(acc) {
     for (let child = acc.firstChild; child; child = child.nextSibling) {
       // text leafs inherit the actionCount of any ancestor that has a click
       // listener.
-      if ([Roles.TEXT_LEAF, Roles.STATICTEXT].indexOf(child.role) >= 0) {
+      if ([Roles.TEXT_LEAF, Roles.STATICTEXT].includes(child.role)) {
         continue;
       }
       if (Utils.visibleChildCount(child) > 0 || child.actionCount > 0) {
         return false;
       }
     }
     return true;
   }
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -914,22 +914,22 @@ PivotContext.prototype = {
       return this._cells.get(domNode);
     }
 
     let cellInfo = {};
     let getAccessibleCell = function getAccessibleCell(aAccessible) {
       if (!aAccessible) {
         return null;
       }
-      if ([
+      if (![
             Roles.CELL,
             Roles.COLUMNHEADER,
             Roles.ROWHEADER,
             Roles.MATHML_CELL
-          ].indexOf(aAccessible.role) < 0) {
+          ].includes(aAccessible.role)) {
           return null;
       }
       try {
         return aAccessible.QueryInterface(Ci.nsIAccessibleTableCell);
       } catch (x) {
         Logger.logException(x);
         return null;
       }
--- a/accessible/tests/mochitest/aom/test_general.html
+++ b/accessible/tests/mochitest/aom/test_general.html
@@ -92,16 +92,16 @@
         "margin-left", "text-align", "text-indent", "margin-right",
         "tag", "margin-top", "margin-bottom", "display",
         "explicit-name"
       ];
     }
 
     is(anode.attributes.length, attrs.length, "correct number of attributes");
     for (let i = 0; i < attrs.length; i++) {
-      ok(attrs.indexOf(anode.attributes[i]) >= 0,
+      ok(attrs.includes(anode.attributes[i]),
          `${anode.attributes[i]} attribute is expected and found`);
     }
 
     finish();
   }
   </script>
 </head>
--- a/accessible/tests/mochitest/autocomplete.js
+++ b/accessible/tests/mochitest/autocomplete.js
@@ -74,17 +74,17 @@ ResultsHeap.prototype =
   constructor: ResultsHeap,
 
   /**
    * Return AutoCompleteResult for the given search string.
    */
   getAutoCompleteResultFor(aSearchString) {
     var values = [], comments = [];
     for (var idx = 0; idx < this.values.length; idx++) {
-      if (this.values[idx].indexOf(aSearchString) != -1) {
+      if (this.values[idx].includes(aSearchString)) {
         values.push(this.values[idx]);
         comments.push(this.comments[idx]);
       }
     }
     return new AutoCompleteResult(values, comments);
   }
 };
 
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -50,20 +50,20 @@ const nsIDOMNode = Components.interfaces
 const nsIDOMWindow = Components.interfaces.nsIDOMWindow;
 const nsIDOMXULElement = Components.interfaces.nsIDOMXULElement;
 
 const nsIPropertyElement = Components.interfaces.nsIPropertyElement;
 
 // //////////////////////////////////////////////////////////////////////////////
 // OS detect
 
-const MAC = (navigator.platform.indexOf("Mac") != -1);
-const LINUX = (navigator.platform.indexOf("Linux") != -1);
-const SOLARIS = (navigator.platform.indexOf("SunOS") != -1);
-const WIN = (navigator.platform.indexOf("Win") != -1);
+const MAC = (navigator.platform.includes("Mac"));
+const LINUX = (navigator.platform.includes("Linux"));
+const SOLARIS = (navigator.platform.includes("SunOS"));
+const WIN = (navigator.platform.includes("Win"));
 
 // //////////////////////////////////////////////////////////////////////////////
 // Application detect
 // Firefox is assumed by default.
 
 const SEAMONKEY = navigator.userAgent.match(/ SeaMonkey\//);
 
 // //////////////////////////////////////////////////////////////////////////////
--- a/accessible/tests/mochitest/jsat/jsatcommon.js
+++ b/accessible/tests/mochitest/jsat/jsatcommon.js
@@ -29,17 +29,17 @@ var AccessFuTest = {
 
   _registerListener: function AccessFuTest__registerListener(aWaitForMessage, aListenerFunc) {
     var listener = {
       observe: function observe(aMessage) {
         // Ignore unexpected messages.
         if (!(aMessage instanceof Components.interfaces.nsIConsoleMessage)) {
           return;
         }
-        if (aMessage.message.indexOf(aWaitForMessage) < 0) {
+        if (!aMessage.message.includes(aWaitForMessage)) {
           return;
         }
         aListenerFunc.apply(listener);
       }
     };
     Services.console.registerListener(listener);
     return listener;
   },
--- a/accessible/tests/mochitest/states/test_tree.xul
+++ b/accessible/tests/mochitest/states/test_tree.xul
@@ -90,17 +90,17 @@
       gQueue = new eventQueue(EVENT_REORDER);
       gQueue.push(new statesChecker("tree", new nsTreeTreeView()));
       gQueue.push(new statesChecker("treesingle", new nsTreeTreeView()));
       gQueue.push(new statesChecker("tabletree", new nsTreeTreeView()));
 
       gQueue.invoke(); // Will call SimpleTest.finish();
     }
 
-    if (MAC && (navigator.userAgent.indexOf("Mac OS X 10.6") != -1)) {
+    if (MAC && (navigator.userAgent.includes("Mac OS X 10.6"))) {
       todo(false,
            "Re-enable on Mac OS 10.6 after fixing bug 845095 - intermittent orange");
     } else {
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
     }
   ]]>
   </script>
--- a/accessible/tests/mochitest/table/test_sels_listbox.xul
+++ b/accessible/tests/mochitest/table/test_sels_listbox.xul
@@ -51,17 +51,17 @@
     /**
      * Helper function to test isColumnSelected(), selectedColumnCount and
      * getSelectedColumn() methods.
      */
     function testColumnSelection(aId, aAcc, aCount, aSelCount, aSelIndexesArray)
     {
       // isColumnSelected
       for (var col = 0; col < aCount; col++) {
-        if (aSelIndexesArray && aSelIndexesArray.indexOf(col) != -1) {
+        if (aSelIndexesArray && aSelIndexesArray.includes(col)) {
           is(aAcc.isColumnSelected(col), true,
              aId + ": column " + col + " should be selected");
         } else {
           is(aAcc.isColumnSelected(col), false,
              aId + ": column " + col + " shouldn't be selected");
         }
       }
 
@@ -90,17 +90,17 @@
     /**
      * Helper function to test isRowSelected(), selectedRowCount() and
      * getSelectedRow() methods.
      */
     function testRowSelection(aId, aAcc, aCount, aSelCount, aSelIndexesArray)
     {
       // isRowSelected
       for (var row = 0; row < aCount; row++) {
-        if (aSelIndexesArray && aSelIndexesArray.indexOf(row) != -1) {
+        if (aSelIndexesArray && aSelIndexesArray.includes(row)) {
           is(aAcc.isRowSelected(row), true,
              aId + ": row " + row + " should be selected");
         } else {
           is(aAcc.isRowSelected(row), false,
              aId + ": row " + row + " shouldn't be selected");
         }
       }
 
@@ -132,17 +132,17 @@
      */
     function testCellSelection(aId, aAcc, aRowCount, aColCount,
                                aSelCount, aSelIndexesArray)
     {
       // isCellSelected
       for (var row = 0; row < aRowCount; row++) {
         for (var col = 0; col < aColCount; col++) {
           var index = aAcc.getIndexAt(row, col);
-          if (aSelIndexesArray && aSelIndexesArray.indexOf(index) != -1) {
+          if (aSelIndexesArray && aSelIndexesArray.includes(index)) {
             is(aAcc.isCellSelected(row, col), true,
                aId + ": cell (" + row + ", " + col + ") should be selected");
           } else {
             is(aAcc.isCellSelected(row, col), false,
                aId + ": cell (" + row + ", " + col + ") shouldn't be selected");
           }
         }
       }
--- a/accessible/tests/mochitest/text/test_atcaretoffset.html
+++ b/accessible/tests/mochitest/text/test_atcaretoffset.html
@@ -333,17 +333,17 @@
           var boundary = this.tests[i][1];
           var startOffset = this.tests[i][2];
           var endOffset = this.tests[i][3];
           var text = aWholeText.substring(startOffset, endOffset);
 
           var isOk1 = kOk, isOk2 = kOk, isOk3 = kOk;
           for (var fIdx = 0; fIdx < this.failures.length; fIdx++) {
             var failure = this.failures[fIdx];
-            if (func.name.indexOf(failure[0]) != -1 && boundary == failure[1]) {
+            if (func.name.includes(failure[0]) && boundary == failure[1]) {
               isOk1 = failure[2];
               isOk2 = failure[3];
               isOk3 = failure[4];
             }
           }
 
           func.call(null, kCaretOffset, boundary, text, startOffset, endOffset,
                     aID, isOk1, isOk2, isOk3);
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -67,17 +67,17 @@ var gXPInstallObserver = {
       } else {
         this.pendingInstalls.set(browser, [installInfo]);
       }
       return;
     }
 
     let showNextConfirmation = () => {
       // Make sure the browser is still alive.
-      if (gBrowser.browsers.indexOf(browser) == -1)
+      if (!gBrowser.browsers.includes(browser))
         return;
 
       let pending = this.pendingInstalls.get(browser);
       if (pending && pending.length)
         this.showInstallConfirmation(browser, pending.shift());
     };
 
     // If all installs have already been cancelled in some way then just show
@@ -218,17 +218,17 @@ var gXPInstallObserver = {
   },
 
   observe(aSubject, aTopic, aData) {
     var brandBundle = document.getElementById("bundle_brand");
     var installInfo = aSubject.wrappedJSObject;
     var browser = installInfo.browser;
 
     // Make sure the browser is still alive.
-    if (!browser || gBrowser.browsers.indexOf(browser) == -1)
+    if (!browser || !gBrowser.browsers.includes(browser))
       return;
 
     const anchorID = "addons-notification-icon";
     var messageString, action;
     var brandShortName = brandBundle.getString("brandShortName");
 
     var notificationID = aTopic;
     // Make notifications persistent
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.js
@@ -131,17 +131,17 @@ var gBrowserThumbnails = {
         aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK)
       this._delayedCapture(aBrowser);
   },
 
   async _capture(aBrowser) {
     // Only capture about:newtab top sites.
     const topSites = await this._topSiteURLs;
     if (!aBrowser.currentURI ||
-        topSites.indexOf(aBrowser.currentURI.spec) == -1)
+        !topSites.includes(aBrowser.currentURI.spec))
       return;
     this._shouldCapture(aBrowser, function(aResult) {
       if (aResult) {
         PageThumbs.captureAndStoreIfStale(aBrowser);
       }
     });
   },
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -8588,17 +8588,17 @@ var TabContextMenu = {
     switch (aEvent.type) {
       case "popuphiding":
         gBrowser.removeEventListener("TabAttrModified", this);
         aEvent.target.removeEventListener("popuphiding", this);
         break;
       case "TabAttrModified":
         let tab = aEvent.target;
         this._updateToggleMuteMenuItem(tab,
-          attr => aEvent.detail.changed.indexOf(attr) >= 0);
+          attr => aEvent.detail.changed.includes(attr));
         break;
     }
   }
 };
 
 // Prompt user to restart the browser in safe mode
 function safeModeRestart() {
   if (Services.appinfo.inSafeMode) {
--- a/browser/base/content/newtab/updater.js
+++ b/browser/base/content/newtab/updater.js
@@ -124,17 +124,17 @@ var gUpdater = {
    * @param aCallback The callback to call when finished.
    */
   _removeLegacySites: function Updater_removeLegacySites(aSites, aCallback) {
     let batch = [];
 
     // Delete sites that were removed from the grid.
     gGrid.sites.forEach(function (aSite) {
       // The site must be valid and not in the current grid.
-      if (!aSite || aSites.indexOf(aSite) != -1)
+      if (!aSite || aSites.includes(aSite))
         return;
 
       batch.push(new Promise(resolve => {
         // Fade out the to-be-removed site.
         gTransformation.hideSite(aSite, function () {
           let node = aSite.node;
 
           // Remove the site from the DOM.
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2867,17 +2867,17 @@
               }
             }
 
             // If we didn't swap docShells with a preloaded browser
             // then let's just continue loading the page normally.
             if (!usingPreloadedContent && (!uriIsAboutBlank || aDisallowInheritPrincipal)) {
               // pretend the user typed this so it'll be available till
               // the document successfully loads
-              if (aURI && gInitialPages.indexOf(aURI) == -1)
+              if (aURI && !gInitialPages.includes(aURI))
                 b.userTypedValue = aURI;
 
               let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
               if (aAllowThirdPartyFixup) {
                 flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
                 flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
               }
               if (aFromExternal)
@@ -3478,24 +3478,24 @@
                 return !tab.closing;
               }, this);
             }
 
             // Try to find a remaining tab that comes after the given tab
             let tab = aTab;
             do {
               tab = tab.nextSibling;
-            } while (tab && remainingTabs.indexOf(tab) == -1);
+            } while (tab && !remainingTabs.includes(tab));
 
             if (!tab) {
               tab = aTab;
 
               do {
                 tab = tab.previousSibling;
-              } while (tab && remainingTabs.indexOf(tab) == -1);
+              } while (tab && !remainingTabs.includes(tab));
             }
 
             return tab;
           ]]>
         </body>
       </method>
 
       <method name="_blurTab">
@@ -3860,17 +3860,17 @@
         </body>
       </method>
 
       <method name="showOnlyTheseTabs">
         <parameter name="aTabs"/>
         <body>
         <![CDATA[
           for (let tab of this.tabs) {
-            if (aTabs.indexOf(tab) == -1)
+            if (!aTabs.includes(tab))
               this.hideTab(tab);
             else
               this.showTab(tab);
           }
 
           this.tabContainer._handleTabSelect(true);
         ]]>
         </body>
--- a/browser/base/content/test/forms/browser_selectpopup.js
+++ b/browser/base/content/test/forms/browser_selectpopup.js
@@ -131,17 +131,17 @@ async function doSelectTests(contentType
   const pageUrl = "data:" + contentType + "," + encodeURIComponent(content);
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);
 
   let menulist = document.getElementById("ContentSelectDropdown");
   let selectPopup = menulist.menupopup;
 
   await openSelectPopup(selectPopup);
 
-  let isWindows = navigator.platform.indexOf("Win") >= 0;
+  let isWindows = navigator.platform.includes("Win");
 
   is(menulist.selectedIndex, 1, "Initial selection");
   is(selectPopup.firstChild.localName, "menucaption", "optgroup is caption");
   is(selectPopup.firstChild.getAttribute("label"), "First Group", "optgroup label");
   is(selectPopup.childNodes[1].localName, "menuitem", "option is menuitem");
   is(selectPopup.childNodes[1].getAttribute("label"), "One", "option label");
 
   EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
--- a/browser/base/content/test/general/browser_bug521216.js
+++ b/browser/base/content/test/general/browser_bug521216.js
@@ -8,17 +8,17 @@ function test() {
   tabIndex = gBrowser.tabs.length;
   gBrowser.addTabsProgressListener(progressListener);
   gBrowser.tabContainer.addEventListener("TabOpen", TabOpen);
   BrowserTestUtils.addTab(gBrowser, "data:text/html,<html><head><link href='about:logo' rel='shortcut icon'>");
 }
 
 function record(aName) {
   info("got " + aName);
-  if (actual.indexOf(aName) == -1)
+  if (!actual.includes(aName))
     actual.push(aName);
   if (actual.length == expected.length) {
     is(actual.toString(), expected.toString(),
        "got events and progress notifications in expected order");
 
     executeSoon(function(tab) {
       gBrowser.removeTab(tab);
       gBrowser.removeTabsProgressListener(progressListener);
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -104,17 +104,17 @@ async function waitForNotification(aId, 
       Services.obs.removeObserver(observer, topic);
       resolve();
     }, topic);
   });
 
   let panelEventPromise = new Promise(resolve => {
     PopupNotifications.panel.addEventListener("PanelUpdated", function eventListener(e) {
       // Skip notifications that are not the one that we are supposed to be looking for
-      if (e.detail.indexOf(aId) == -1) {
+      if (!e.detail.includes(aId)) {
         return;
       }
       PopupNotifications.panel.removeEventListener("PanelUpdated", eventListener);
       resolve();
     });
   });
 
   await observerPromise;
--- a/browser/base/content/test/general/browser_clipboard.js
+++ b/browser/base/content/test/general/browser_clipboard.js
@@ -10,32 +10,32 @@ add_task(async function() {
   let tab = BrowserTestUtils.addTab(gBrowser);
   let browser = gBrowser.getBrowserForTab(tab);
 
   gBrowser.selectedTab = tab;
 
   await promiseTabLoadEvent(tab, "data:text/html," + escape(testPage));
   await SimpleTest.promiseFocus(browser.contentWindowAsCPOW);
 
-  const modifier = (navigator.platform.indexOf("Mac") >= 0) ?
+  const modifier = (navigator.platform.includes("Mac")) ?
                    Components.interfaces.nsIDOMWindowUtils.MODIFIER_META :
                    Components.interfaces.nsIDOMWindowUtils.MODIFIER_CONTROL;
 
   function sendKey(message) {
     BrowserTestUtils.synthesizeKey(message.data.key,
                                    {code: message.data.code, accelKey: true},
                                    browser);
   }
 
   browser.messageManager.addMessageListener("Test:SendKey", sendKey);
 
   // On windows, HTML clipboard includes extra data.
   // The values are from widget/windows/nsDataObj.cpp.
-  const htmlPrefix = (navigator.platform.indexOf("Win") >= 0) ? "<html><body>\n<!--StartFragment-->" : "";
-  const htmlPostfix = (navigator.platform.indexOf("Win") >= 0) ? "<!--EndFragment-->\n</body>\n</html>" : "";
+  const htmlPrefix = (navigator.platform.includes("Win")) ? "<html><body>\n<!--StartFragment-->" : "";
+  const htmlPostfix = (navigator.platform.includes("Win")) ? "<!--EndFragment-->\n</body>\n</html>" : "";
 
   await ContentTask.spawn(browser, { modifier, htmlPrefix, htmlPostfix }, async function(arg) {
     var doc = content.document;
     var main = doc.getElementById("main");
     main.focus();
 
     // Select an area of the text.
     let selection = doc.getSelection();
--- a/browser/base/content/test/general/browser_tab_dragdrop2_frame1.xul
+++ b/browser/base/content/test/general/browser_tab_dragdrop2_frame1.xul
@@ -62,17 +62,17 @@ function nextTest()
   var panel = createPanel(currentTest.attrs);
   SimpleTest.waitForFocus(() => currentTest.test(panel));
   return i;
 }
 
 function popupShown(event)
 {
   var panel = event.target;
-  if (waitSteps > 0 && navigator.platform.indexOf("Linux") >= 0 &&
+  if (waitSteps > 0 && navigator.platform.includes("Linux") &&
       panel.boxObject.screenY == 210) {
     waitSteps--;
     setTimeout(popupShown, 10, event);
     return;
   }
   ++i;
 
   currentTest.result(currentTest.testname + " ", panel);
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -59,17 +59,17 @@ function getFocusedElementForBrowser(bro
   }
   var focusedWindow = {};
   var node = fm.getFocusedElementForWindow(browser.contentWindow, false, focusedWindow);
   return "Focus is " + (node ? node.id : "<none>");
 }
 
 function focusInChild() {
   function getWindowDocId(target) {
-    return (String(target.location).indexOf("1") >= 0) ? "window1" : "window2";
+    return (String(target.location).includes("1")) ? "window1" : "window2";
   }
 
   function eventListener(event) {
     // Stop the shim code from seeing this event process.
     event.stopImmediatePropagation();
 
     var id;
     if (event.target instanceof Components.interfaces.nsIDOMWindow)
@@ -113,17 +113,17 @@ function focusInChild() {
       }
     }
 
     sendSyncMessage("Browser:GetCurrentFocus", { details });
   });
 }
 
 function focusElementInChild(elementid, type) {
-  let browser = (elementid.indexOf("1") >= 0) ? browser1 : browser2;
+  let browser = (elementid.includes("1")) ? browser1 : browser2;
   if (gMultiProcessBrowser) {
     browser.messageManager.sendAsyncMessage("Browser:ChangeFocus",
                                             { id: elementid, type });
   } else {
     browser.contentDocument.getElementById(elementid)[type]();
   }
 }
 /* eslint-enable mozilla/no-cpows-in-tests */
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -463,17 +463,17 @@ function waitForNewTabEvent(aTabBrowser)
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/base/content/test/general/test_remoteTroubleshoot.html
+++ b/browser/base/content/test/general/test_remoteTroubleshoot.html
@@ -1,16 +1,16 @@
 <!DOCTYPE HTML>
 <html>
 <script>
 // This test is run multiple times, once with only strings allowed through the
 // WebChannel, and once with objects allowed. This function allows us to handle
 // both cases without too much pain.
 function makeDetails(object) {
-  if (window.location.search.indexOf("object") >= 0) {
+  if (window.location.search.includes("object")) {
     return object;
   }
   return JSON.stringify(object);
 }
 // Add a listener for responses to our remote requests.
 window.addEventListener("WebChannelMessageToContent", function(event) {
   if (event.detail.id == "remote-troubleshooting") {
     // Send what we got back to the test.
--- a/browser/base/content/test/permissions/browser_reservedkey.js
+++ b/browser/base/content/test/permissions/browser_reservedkey.js
@@ -39,17 +39,17 @@ add_task(async function test_reserved_sh
   is(document.getElementById("kt_reserveddefault").getAttribute("count"), "1", "default reserved with preference on");
 
   document.documentElement.removeChild(container);
 
   await BrowserTestUtils.removeTab(tab);
 });
 
 // This test checks that Alt+<key> and F10 cannot be blocked when the preference is set.
-if (navigator.platform.indexOf("Mac") == -1) {
+if (!navigator.platform.includes("Mac")) {
   add_task(async function test_accesskeys_menus() {
     await new Promise(resolve => {
       SpecialPowers.pushPrefEnv({"set": [["permissions.default.shortcuts", 2]]}, resolve);
     });
 
     const uri = "data:text/html,<body onkeydown='if (event.key == \"H\" || event.key == \"F10\") event.preventDefault();'>";
     let tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, uri);
 
@@ -71,17 +71,17 @@ if (navigator.platform.indexOf("Mac") ==
     // pressing Down will open the file menu.
     let menubar = document.getElementById("main-menubar");
     let menubarActive = BrowserTestUtils.waitForEvent(menubar, "DOMMenuBarActive");
     EventUtils.sendKey("F10");
     await menubarActive;
 
     let filePopup = document.getElementById("menu_FilePopup");
     popupShown = BrowserTestUtils.waitForEvent(filePopup, "popupshown");
-    if (navigator.platform.indexOf("Win") >= 0) {
+    if (navigator.platform.includes("Win")) {
       EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
     }
     await popupShown;
 
     ok(true, "File menu opened");
 
     popupHidden = BrowserTestUtils.waitForEvent(filePopup, "popuphidden");
     filePopup.hidePopup();
--- a/browser/base/content/test/permissions/head.js
+++ b/browser/base/content/test/permissions/head.js
@@ -2,17 +2,17 @@ ChromeUtils.import("resource:///modules/
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/base/content/test/siteIdentity/head.js
+++ b/browser/base/content/test/siteIdentity/head.js
@@ -3,17 +3,17 @@ ChromeUtils.import("resource://gre/modul
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
@@ -40,17 +40,17 @@ add_task(async function searchSuggestion
   // The first expected search is the search term itself since the heuristic
   // result will come before the search suggestions.
   let expectedSearches = [
     "foo",
     "foofoo",
     "foobar",
   ];
   for (let child of gURLBar.popup.richlistbox.children) {
-    if (child.getAttribute("type").split(/\s+/).indexOf("searchengine") >= 0) {
+    if (child.getAttribute("type").split(/\s+/).includes("searchengine")) {
       Assert.ok(expectedSearches.length > 0);
       let suggestion = expectedSearches.shift();
       Assert.equal(child.label, suggestion + " browser_searchSuggestionEngine searchSuggestionEngine.xml Search",
                    "Result label should be: <search term> <engine name> Search");
     }
   }
   Assert.ok(expectedSearches.length == 0);
   gURLBar.popup.hidePopup();
--- a/browser/base/content/test/urlbar/browser_urlbar_autoFill_backspaced.js
+++ b/browser/base/content/test/urlbar/browser_urlbar_autoFill_backspaced.js
@@ -16,17 +16,17 @@ async function test_autocomplete(data) {
   is(gURLBar.textValue, modified, "backspaced value is as expected");
 
   await promiseSearchComplete();
 
   ok(gURLBar.popup.richlistbox.children.length > 0, "Should get at least 1 result");
   let result = gURLBar.popup.richlistbox.children[0];
   let type = result.getAttribute("type");
   let types = type.split(/\s+/);
-  ok(types.indexOf(action) >= 0, `The type attribute "${type}" includes the expected action "${action}"`);
+  ok(types.includes(action), `The type attribute "${type}" includes the expected action "${action}"`);
 
   gURLBar.popup.hidePopup();
   await promisePopupHidden(gURLBar.popup);
   gURLBar.blur();
 }
 
 add_task(async function() {
   registerCleanupFunction(async function() {
--- a/browser/base/content/test/urlbar/head.js
+++ b/browser/base/content/test/urlbar/head.js
@@ -91,17 +91,17 @@ function waitForDocLoadAndStopIt(aExpect
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/base/content/test/webextensions/head.js
+++ b/browser/base/content/test/webextensions/head.js
@@ -134,17 +134,17 @@ function isDefaultIcon(icon) {
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/base/content/test/webrtc/get_user_media_content_script.js
+++ b/browser/base/content/test/webrtc/get_user_media_content_script.js
@@ -108,17 +108,17 @@ addMessageListener("Test:WaitForObserver
 
     if (ignoreEvent(aSubject, aTopic, aData)) {
       return;
     }
 
     sendAsyncMessage("Test:ObserverCalled", topic);
     Services.obs.removeObserver(obs, topic);
 
-    if (kObservedTopics.indexOf(topic) != -1) {
+    if (kObservedTopics.includes(topic)) {
       if (!(topic in gObservedTopics))
         gObservedTopics[topic] = -1;
       else
         --gObservedTopics[topic];
     }
   }, topic);
 });
 
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -427,17 +427,17 @@ file, You can obtain one at http://mozil
           try {
             uriInfo = Services.uriFixup.getFixupURIInfo(value, flags);
           } catch (ex) {}
           // Ignore if we couldn't make a URI out of this, the URI resulted in a search,
           // or the URI has a non-http(s)/ftp protocol.
           if (!uriInfo ||
               !uriInfo.fixedURI ||
               uriInfo.keywordProviderName ||
-              ["http", "https", "ftp"].indexOf(uriInfo.fixedURI.scheme) == -1) {
+              !["http", "https", "ftp"].includes(uriInfo.fixedURI.scheme)) {
             return;
           }
 
           // If we trimmed off the http scheme, ensure we stick it back on before
           // trying to figure out what domain we're accessing, so we don't get
           // confused by user:pass@host http URLs. We later use
           // trimmedLength to ensure we don't count the length of a trimmed protocol
           // when determining which parts of the URL to highlight as "preDomain".
--- a/browser/components/contextualidentity/test/browser/browser_aboutURLs.js
+++ b/browser/components/contextualidentity/test/browser/browser_aboutURLs.js
@@ -22,17 +22,17 @@ add_task(async function() {
 
     let aboutType = result[1];
     let contract = "@mozilla.org/network/protocol/about;1?what=" + aboutType;
     try {
       let am = Cc[contract].getService(Ci.nsIAboutModule);
       let uri = Services.io.newURI("about:" + aboutType);
       let flags = am.getURIFlags(uri);
       if (!(flags & Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) &&
-          networkURLs.indexOf(aboutType) == -1) {
+          !networkURLs.includes(aboutType)) {
         aboutURLs.push(aboutType);
       }
     } catch (e) {
       // getService might have thrown if the component doesn't actually
       // implement nsIAboutModule
     }
   }
 
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -513,17 +513,17 @@ var CustomizableUIInternal = {
       return;
     }
     let defaultWidgetIndex = -1;
 
     for (let widgetId of futurePlacedWidgets) {
       let widget = gPalette.get(widgetId);
       if (!widget || widget.source !== CustomizableUI.SOURCE_BUILTIN ||
           !widget.defaultArea || !widget._introducedInVersion ||
-          savedPlacements.indexOf(widget.id) !== -1) {
+          savedPlacements.includes(widget.id)) {
         continue;
       }
       defaultWidgetIndex = defaultPlacements.indexOf(widget.id);
       if (defaultWidgetIndex === -1) {
         continue;
       }
       // Now we know that this widget should be here by default, was newly introduced,
       // and we have a saved state to insert into, and a default state to work off of.
@@ -613,17 +613,17 @@ var CustomizableUIInternal = {
       if (!props.has("defaultCollapsed")) {
         props.set("defaultCollapsed", true);
       }
     } else if (props.has("defaultCollapsed")) {
       throw new Error("defaultCollapsed only applies for TYPE_TOOLBAR areas.");
     }
     // Sanity check type:
     let allTypes = [CustomizableUI.TYPE_TOOLBAR, CustomizableUI.TYPE_MENU_PANEL];
-    if (allTypes.indexOf(props.get("type")) == -1) {
+    if (!allTypes.includes(props.get("type"))) {
       throw new Error("Invalid area type " + props.get("type"));
     }
 
     // And to no placements:
     if (!props.has("defaultPlacements")) {
       props.set("defaultPlacements", []);
     }
     // Sanity check default placements array:
@@ -2852,17 +2852,17 @@ var CustomizableUIInternal = {
       // and is then uninstalled, the leftover placement doesn't cause us to
       // automatically assume that the buttons are not in the default state.
       let buildAreaNodes = gBuildAreas.get(areaId);
       if (buildAreaNodes && buildAreaNodes.size) {
         let container = [...buildAreaNodes][0];
         let removableOrDefault = (itemNodeOrItem) => {
           let item = (itemNodeOrItem && itemNodeOrItem.id) || itemNodeOrItem;
           let isRemovable = this.isWidgetRemovable(itemNodeOrItem);
-          let isInDefault = defaultPlacements.indexOf(item) != -1;
+          let isInDefault = defaultPlacements.includes(item);
           return isRemovable || isInDefault;
         };
         // Toolbars have a currentSet property which also deals correctly with overflown
         // widgets (if any) - use that instead:
         if (props.get("type") == CustomizableUI.TYPE_TOOLBAR) {
           let currentSet = container.currentSet;
           currentPlacements = currentSet ? currentSet.split(",") : [];
           currentPlacements = currentPlacements.filter(removableOrDefault);
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -526,17 +526,17 @@ CustomizeMode.prototype = {
       if (overflowTarget) {
         areas.push(overflowTarget);
       }
     }
     areas.push(kPaletteId);
 
     while (aNode && aNode.parentNode) {
       let parent = aNode.parentNode;
-      if (areas.indexOf(parent.id) != -1) {
+      if (areas.includes(parent.id)) {
         return aNode;
       }
       aNode = parent;
     }
     return null;
   },
 
   _promiseWidgetAnimationOut(aNode) {
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -158,17 +158,17 @@
           return orderedPlacements.filter(w => currentWidgets.has(w)).join(",");
         ]]></getter>
         <setter><![CDATA[
           // Get list of new and old ids:
           let newVal = (val || "").split(",").filter(x => x);
           let oldIds = CustomizableUI.getWidgetIdsInArea(this.id);
 
           // Get a list of items only in the new list
-          let newIds = newVal.filter(id => oldIds.indexOf(id) == -1);
+          let newIds = newVal.filter(id => !oldIds.includes(id));
           CustomizableUI.beginBatchUpdate();
           try {
             for (let newId of newIds) {
               oldIds = CustomizableUI.getWidgetIdsInArea(this.id);
               let nextId = newId;
               let pos;
               do {
                 // Get the next item
@@ -179,17 +179,17 @@
               } while (pos == -1 && nextId);
               if (pos == -1) {
                 pos = null; // We didn't find anything, insert at the end
               }
               CustomizableUI.addWidgetToArea(newId, this.id, pos);
             }
 
             let currentIds = this.currentSet.split(",");
-            let removedIds = currentIds.filter(id => newIds.indexOf(id) == -1 && newVal.indexOf(id) == -1);
+            let removedIds = currentIds.filter(id => !newIds.includes(id) && !newVal.includes(id));
             for (let removedId of removedIds) {
               CustomizableUI.removeWidgetFromArea(removedId);
             }
           } finally {
             CustomizableUI.endBatchUpdate();
           }
         ]]></setter>
       </property>
--- a/browser/components/customizableui/test/browser_940013_registerToolbarNode_calls_registerArea.js
+++ b/browser/components/customizableui/test/browser_940013_registerToolbarNode_calls_registerArea.js
@@ -12,17 +12,17 @@ registerCleanupFunction(cleanup);
 add_task(async function() {
   ok(CustomizableUI.inDefaultState, "Everything should be in its default state.");
   let btn = createDummyXULButton(kButtonId);
   let toolbar = document.createElement("toolbar");
   toolbar.id = kToolbarId;
   toolbar.setAttribute("customizable", true);
   toolbar.setAttribute("defaultset", kButtonId);
   gNavToolbox.appendChild(toolbar);
-  ok(CustomizableUI.areas.indexOf(kToolbarId) != -1,
+  ok(CustomizableUI.areas.includes(kToolbarId),
      "Toolbar should have been registered automatically.");
   is(CustomizableUI.getAreaType(kToolbarId), CustomizableUI.TYPE_TOOLBAR,
      "Area should be registered as toolbar");
   assertAreaPlacements(kToolbarId, [kButtonId]);
   ok(!CustomizableUI.inDefaultState, "No longer in default state after toolbar is registered and visible.");
   CustomizableUI.unregisterArea(kToolbarId, true);
   toolbar.remove();
   ok(CustomizableUI.inDefaultState, "Everything should be in its default state.");
@@ -33,20 +33,20 @@ add_task(async function() {
 // wait for the registerArea call
 add_task(async function() {
   ok(CustomizableUI.inDefaultState, "Everything should be in its default state.");
   let btn = createDummyXULButton(kButtonId);
   let toolbar = document.createElement("toolbar");
   toolbar.id = kToolbarId;
   toolbar.setAttribute("customizable", true);
   gNavToolbox.appendChild(toolbar);
-  ok(CustomizableUI.areas.indexOf(kToolbarId) == -1,
+  ok(!CustomizableUI.areas.includes(kToolbarId),
      "Toolbar should not yet have been registered automatically.");
   CustomizableUI.registerArea(kToolbarId, {defaultPlacements: [kButtonId]});
-  ok(CustomizableUI.areas.indexOf(kToolbarId) != -1,
+  ok(CustomizableUI.areas.includes(kToolbarId),
      "Toolbar should have been registered now.");
   is(CustomizableUI.getAreaType(kToolbarId), CustomizableUI.TYPE_TOOLBAR,
      "Area should be registered as toolbar");
   assertAreaPlacements(kToolbarId, [kButtonId]);
   ok(!CustomizableUI.inDefaultState, "No longer in default state after toolbar is registered and visible.");
   CustomizableUI.unregisterArea(kToolbarId, true);
   toolbar.remove();
   ok(CustomizableUI.inDefaultState, "Everything should be in its default state.");
--- a/browser/components/customizableui/test/browser_982656_restore_defaults_builtin_widgets.js
+++ b/browser/components/customizableui/test/browser_982656_restore_defaults_builtin_widgets.js
@@ -27,17 +27,17 @@ add_task(async function() {
 
 
 // resetCustomization shouldn't move 3rd party widgets out of custom toolbars
 add_task(async function() {
   const kToolbarId = "bug982656-toolbar-with-defaultset";
   const kWidgetId = "bug982656-add-on-widget-should-restore-to-default-area-when-area-is-not-builtin";
   ok(CustomizableUI.inDefaultState, "Everything should be in its default state.");
   let toolbar = createToolbarWithPlacements(kToolbarId);
-  ok(CustomizableUI.areas.indexOf(kToolbarId) != -1,
+  ok(CustomizableUI.areas.includes(kToolbarId),
      "Toolbar has been registered.");
   is(CustomizableUI.getAreaType(kToolbarId), CustomizableUI.TYPE_TOOLBAR,
      "Area should be registered as toolbar");
 
   let widgetSpec = {
     id: kWidgetId,
     defaultArea: kToolbarId
   };
--- a/browser/components/distribution.js
+++ b/browser/components/distribution.js
@@ -109,19 +109,19 @@ DistributionCustomizer.prototype = {
       let m = re.exec(key);
       if (m) {
         let [, itemIndex, iprop, ilocale] = m;
         itemIndex = parseInt(itemIndex);
 
         if (ilocale)
           continue;
 
-        if (keys.indexOf(key + "." + this._locale) >= 0) {
+        if (keys.includes(key + "." + this._locale)) {
           key += "." + this._locale;
-        } else if (keys.indexOf(key + "." + this._language) >= 0) {
+        } else if (keys.includes(key + "." + this._language)) {
           key += "." + this._language;
         }
 
         if (!items[itemIndex])
           items[itemIndex] = {};
         items[itemIndex][iprop] = this._ini.getString(section, key);
 
         if (iprop == "type" && items[itemIndex].type == "default")
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -1216,17 +1216,17 @@ var DownloadsViewController = {
     }
     // The currently supported commands depend on whether the blocked subview is
     // showing.  If it is, then take the following path.
     if (DownloadsBlockedSubview.view.showingSubView) {
       let blockedSubviewCmds = [
         "downloadsCmd_unblockAndOpen",
         "cmd_delete",
       ];
-      return blockedSubviewCmds.indexOf(aCommand) >= 0;
+      return blockedSubviewCmds.includes(aCommand);
     }
     // If the blocked subview is not showing, then determine if focus is on a
     // control in the downloads list.
     let element = document.commandDispatcher.focusedElement;
     while (element && element != DownloadsView.richListBox) {
       element = element.parentNode;
     }
     // We should handle the command only if the downloads list is among the
--- a/browser/components/extensions/test/browser/browser_ext_getViews.js
+++ b/browser/components/extensions/test/browser/browser_ext_getViews.js
@@ -1,18 +1,18 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 function genericChecker() {
   let kind = "background";
   let path = window.location.pathname;
-  if (path.indexOf("popup") != -1) {
+  if (path.includes("popup")) {
     kind = "popup";
-  } else if (path.indexOf("tab") != -1) {
+  } else if (path.includes("tab")) {
     kind = "tab";
   }
   window.kind = kind;
 
   browser.test.onMessage.addListener((msg, ...args) => {
     if (msg == kind + "-check-views") {
       let counts = {
         background: 0,
@@ -49,17 +49,17 @@ function genericChecker() {
       browser.test.sendMessage("getViews-count", count);
     } else if (msg == kind + "-open-tab") {
       browser.tabs.create({windowId: args[0], url: browser.runtime.getURL("tab.html")})
         .then((tab) => browser.test.sendMessage("opened-tab", tab.id));
     } else if (msg == kind + "-close-tab") {
       browser.tabs.query({
         windowId: args[0],
       }, tabs => {
-        let tab = tabs.find(tab => tab.url.indexOf("tab.html") != -1);
+        let tab = tabs.find(tab => tab.url.includes("tab.html"));
         browser.tabs.remove(tab.id, () => {
           browser.test.sendMessage("closed");
         });
       });
     }
   });
   browser.test.sendMessage(kind + "-ready");
 }
--- a/browser/components/feeds/WebContentConverter.js
+++ b/browser/components/feeds/WebContentConverter.js
@@ -159,17 +159,17 @@ const Utils = {
     if (!["http:", "https:"].includes(aContentWindow.location.protocol) ||
         aContentWindow.location.hostname != uri.host) {
       throw this.getSecurityError(
         "Permission denied to add " + uri.spec + " as a content or protocol handler",
         aContentWindow);
     }
 
     // If the uri doesn't contain '%s', it won't be a good handler
-    if (uri.spec.indexOf("%s") < 0)
+    if (!uri.spec.includes("%s"))
       throw NS_ERROR_DOM_SYNTAX_ERR;
 
     return uri;
   },
 
   // NB: Throws if aProtocol is not allowed.
   checkProtocolHandlerAllowed(aProtocol, aURIString, aWindowOrNull) {
     // First, check to make sure this isn't already handled internally (we don't
--- a/browser/components/migration/EdgeProfileMigrator.js
+++ b/browser/components/migration/EdgeProfileMigrator.js
@@ -111,17 +111,17 @@ EdgeTypedURLMigrator.prototype = {
 
   migrate(aCallback) {
     let typedURLs = this._typedURLs;
     let places = [];
     for (let [urlString, time] of typedURLs) {
       let uri;
       try {
         uri = Services.io.newURI(urlString);
-        if (["http", "https", "ftp"].indexOf(uri.scheme) == -1) {
+        if (!["http", "https", "ftp"].includes(uri.scheme)) {
           continue;
         }
       } catch (ex) {
         Cu.reportError(ex);
         continue;
       }
 
       // Note that the time will be in microseconds (PRTime),
--- a/browser/components/migration/FirefoxProfileMigrator.js
+++ b/browser/components/migration/FirefoxProfileMigrator.js
@@ -249,17 +249,17 @@ FirefoxProfileMigrator.prototype._getRes
       if (dataReportingDir && dataReportingDir.isDirectory()) {
         // Copy only specific files.
         let toCopy = ["state.json", "session-state.json"];
 
         let dest = createSubDir("datareporting");
         let enumerator = dataReportingDir.directoryEntries;
         while (enumerator.hasMoreElements()) {
           let file = enumerator.getNext().QueryInterface(Ci.nsIFile);
-          if (file.isDirectory() || toCopy.indexOf(file.leafName) == -1) {
+          if (file.isDirectory() || !toCopy.includes(file.leafName)) {
             continue;
           }
 
           if (file.leafName == "state.json") {
             haveStateFile = true;
           }
           file.copyTo(dest, "");
         }
--- a/browser/components/migration/IEProfileMigrator.js
+++ b/browser/components/migration/IEProfileMigrator.js
@@ -49,17 +49,17 @@ History.prototype = {
     let historyEnumerator = Cc["@mozilla.org/profile/migrator/iehistoryenumerator;1"].
                             createInstance(Ci.nsISimpleEnumerator);
     while (historyEnumerator.hasMoreElements()) {
       let entry = historyEnumerator.getNext().QueryInterface(Ci.nsIPropertyBag2);
       let uri = entry.get("uri").QueryInterface(Ci.nsIURI);
       // MSIE stores some types of URLs in its history that we don't handle,
       // like HTMLHelp and others.  Since we don't properly map handling for
       // all of them we just avoid importing them.
-      if (["http", "https", "ftp", "file"].indexOf(uri.scheme) == -1) {
+      if (!["http", "https", "ftp", "file"].includes(uri.scheme)) {
         continue;
       }
 
       let title = entry.get("title");
       // Embed visits have no title and don't need to be imported.
       if (title.length == 0) {
         continue;
       }
@@ -133,17 +133,17 @@ IE7FormPasswords.prototype = {
                             createInstance(Ci.nsISimpleEnumerator);
     let uris = []; // the uris of the websites that are going to be migrated
     while (historyEnumerator.hasMoreElements()) {
       let entry = historyEnumerator.getNext().QueryInterface(Ci.nsIPropertyBag2);
       let uri = entry.get("uri").QueryInterface(Ci.nsIURI);
       // MSIE stores some types of URLs in its history that we don't handle, like HTMLHelp
       // and others. Since we are not going to import the logins that are performed in these URLs
       // we can just skip them.
-      if (["http", "https", "ftp"].indexOf(uri.scheme) == -1) {
+      if (!["http", "https", "ftp"].includes(uri.scheme)) {
         continue;
       }
 
       uris.push(uri);
     }
     this._migrateURIs(uris);
     aCallback(true);
   },
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -793,17 +793,17 @@ WindowsVaultFormPasswords.prototype = {
           if (!_isIEOrEdgePassword(item.contents.schemaId.id)) {
             continue;
           }
           let url = item.contents.pResourceElement.contents.itemValue.readString();
           let realURL;
           try {
             realURL = Services.io.newURI(url);
           } catch (ex) { /* leave realURL as null */ }
-          if (!realURL || ["http", "https", "ftp"].indexOf(realURL.scheme) == -1) {
+          if (!realURL || !["http", "https", "ftp"].includes(realURL.scheme)) {
             // Ignore items for non-URLs or URLs that aren't HTTP(S)/FTP
             continue;
           }
 
           // if aOnlyCheckExists is set to true, the purpose of the call is to return true if there is at
           // least a password which is true in this case because a password was by now already found
           if (aOnlyCheckExists) {
             return true;
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -162,17 +162,17 @@ function getPostUpdateOverridePage(defau
   let actions = update.getProperty("actions");
   // When the update doesn't specify actions fallback to the original behavior
   // of displaying the default override page.
   if (!actions)
     return defaultOverridePage;
 
   // The existence of silent or the non-existence of showURL in the actions both
   // mean that an override page should not be displayed.
-  if (actions.indexOf("silent") != -1 || actions.indexOf("showURL") == -1)
+  if (actions.includes("silent") || !actions.includes("showURL"))
     return "";
 
   return update.getProperty("openURL") || defaultOverridePage;
 }
 
 // Flag used to indicate that the arguments to openWindow can be passed directly.
 const NO_EXTERNAL_URIS = 1;
 
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1386,17 +1386,17 @@ BrowserGlue.prototype = {
       var update = um.getUpdateAt(0).QueryInterface(Ci.nsIPropertyBag);
     } catch (e) {
       // This should never happen.
       Cu.reportError("Unable to find update: " + e);
       return;
     }
 
     var actions = update.getProperty("actions");
-    if (!actions || actions.indexOf("silent") != -1)
+    if (!actions || actions.includes("silent"))
       return;
 
     var appName = gBrandBundle.GetStringFromName("brandShortName");
 
     function getNotifyString(aPropData) {
       var propValue = update.getProperty(aPropData.propName);
       if (!propValue) {
         if (aPropData.prefName)
@@ -1406,17 +1406,17 @@ BrowserGlue.prototype = {
                                                           aPropData.stringParams,
                                                           aPropData.stringParams.length);
         else
           propValue = gBrowserBundle.GetStringFromName(aPropData.stringName);
       }
       return propValue;
     }
 
-    if (actions.indexOf("showNotification") != -1) {
+    if (actions.includes("showNotification")) {
       let text = getNotifyString({propName: "notificationText",
                                   stringName: "puNotifyText",
                                   stringParams: [appName]});
       let url = getNotifyString({propName: "notificationURL",
                                  prefName: "startup.homepage_override_url"});
       let label = getNotifyString({propName: "notificationButtonLabel",
                                    stringName: "pu.notifyButton.label"});
       let key = getNotifyString({propName: "notificationButtonAccessKey",
@@ -1436,17 +1436,17 @@ BrowserGlue.prototype = {
                       }
                     ];
 
       notifyBox.appendNotification(text, "post-update-notification",
                                    null, notifyBox.PRIORITY_INFO_LOW,
                                    buttons);
     }
 
-    if (actions.indexOf("showAlert") == -1)
+    if (!actions.includes("showAlert"))
       return;
 
     let title = getNotifyString({propName: "alertTitle",
                                  stringName: "puAlertTitle",
                                  stringParams: [appName]});
     let text = getNotifyString({propName: "alertText",
                                 stringName: "puAlertText",
                                 stringParams: [appName]});
@@ -2134,17 +2134,17 @@ BrowserGlue.prototype = {
     }
 
     // Update user customizations that will interfere with the Safe Browsing V2
     // to V4 migration (bug 1395419).
     if (currentUIVersion < 53) {
       const MALWARE_PREF = "urlclassifier.malwareTable";
       if (Services.prefs.prefHasUserValue(MALWARE_PREF)) {
         let malwareList = Services.prefs.getCharPref(MALWARE_PREF);
-        if (malwareList.indexOf("goog-malware-shavar") != -1) {
+        if (malwareList.includes("goog-malware-shavar")) {
           malwareList.replace("goog-malware-shavar", "goog-malware-proto");
           Services.prefs.setCharPref(MALWARE_PREF, malwareList);
         }
       }
     }
 
     if (currentUIVersion < 54) {
       // Migrate browser.onboarding.hidden to browser.onboarding.state.
--- a/browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
+++ b/browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
@@ -155,17 +155,17 @@ add_task(async function test_aboutURL() 
       let flags = am.getURIFlags(uri);
 
       // We load pages with URI_SAFE_FOR_UNTRUSTED_CONTENT set, this means they
       // are not loaded with System Principal but with codebase principal.
       // Also we skip pages with HIDE_FROM_ABOUTABOUT, some of them may have
       // errors while loading.
       if ((flags & Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT) &&
           !(flags & Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) &&
-          networkURLs.indexOf(aboutType) == -1 &&
+          !networkURLs.includes(aboutType) &&
           // handle about:newtab in browser_firstPartyIsolation_about_newtab.js
           aboutType !== "newtab") {
         aboutURLs.push(aboutType);
       }
     } catch (e) {
       // getService might have thrown if the component doesn't actually
       // implement nsIAboutModule
     }
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -229,17 +229,17 @@ var gEditItemOverlay = {
           isBookmark, bulkTagging, uris,
           visibleRows, focusedElement,
           onPanelReady } = this._setPaneInfo(aInfo);
 
     let showOrCollapse =
       (rowId, isAppropriateForInput, nameInHiddenRows = null) => {
         let visible = isAppropriateForInput;
         if (visible && "hiddenRows" in aInfo && nameInHiddenRows)
-          visible &= aInfo.hiddenRows.indexOf(nameInHiddenRows) == -1;
+          visible &= !aInfo.hiddenRows.includes(nameInHiddenRows);
         if (visible)
           visibleRows.add(rowId);
         return !(this._element(rowId).collapsed = !visible);
       };
 
     if (showOrCollapse("nameRow", !bulkTagging, "name")) {
       this._initNamePicker();
       this._namePicker.readOnly = this.readOnly;
--- a/browser/components/places/tests/browser/browser_bookmarks_sidebar_search.js
+++ b/browser/components/places/tests/browser/browser_bookmarks_sidebar_search.js
@@ -18,17 +18,17 @@ function assertBookmarks(searchValue) {
   searchBox.value = searchValue;
   searchBox.doCommand();
 
   let tree = sidebar.contentDocument.getElementById("bookmarks-view");
 
   for (let i = 0; i < tree.view.rowCount; i++) {
     let cellText = tree.view.getCellText(i, tree.columns.getColumnAt(0));
 
-    if (cellText.indexOf("example page") != -1) {
+    if (cellText.includes("example page")) {
       found++;
     }
   }
 
   info("Reset the search");
   searchBox.value = "";
   searchBox.doCommand();
 
--- a/browser/components/preferences/containers.js
+++ b/browser/components/preferences/containers.js
@@ -151,21 +151,21 @@ let gContainersManager = {
     return radiogroup;
   },
 
   onApplyChanges() {
     let icon = document.getElementById("icon").value;
     let color = document.getElementById("color").value;
     let name = document.getElementById("name").value;
 
-    if (this.icons.indexOf(icon) == -1) {
+    if (!this.icons.includes(icon)) {
       throw "Internal error. The icon value doesn't match.";
     }
 
-    if (this.colors.indexOf(color) == -1) {
+    if (!this.colors.includes(color)) {
       throw "Internal error. The color value doesn't match.";
     }
 
     if (this.userContextId) {
       ContextualIdentityService.update(this.userContextId,
         name,
         icon,
         color);
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -825,19 +825,19 @@ var gCookiesWindow = {
     }
     this._lastSelectedRanges = [];
 
     document.getElementById("cookiesIntro").value = this._bundle.getString("cookiesAll");
     this._updateRemoveAllButton();
   },
 
   _cookieMatchesFilter(aCookie) {
-    return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
-           aCookie.name.indexOf(this._view._filterValue) != -1 ||
-           aCookie.value.indexOf(this._view._filterValue) != -1;
+    return aCookie.rawHost.includes(this._view._filterValue) ||
+           aCookie.name.includes(this._view._filterValue) ||
+           aCookie.value.includes(this._view._filterValue);
   },
 
   _filterCookies(aFilterValue) {
     this._view._filterValue = aFilterValue;
     var cookies = [];
     for (let i = 0; i < gCookiesWindow._hostOrder.length; ++i) { // var host in gCookiesWindow._hosts) {
       let currHost = gCookiesWindow._hosts[gCookiesWindow._hostOrder[i]]; // gCookiesWindow._hosts[host];
       if (!currHost) continue;
--- a/browser/components/preferences/in-content/findInPage.js
+++ b/browser/components/preferences/in-content/findInPage.js
@@ -208,17 +208,17 @@ var gSearchResultsPane = {
    *    to search for filted query in
    */
   async searchFunction(event) {
     let query = event.target.value.trim().toLowerCase();
     if (this.query == query) {
       return;
     }
 
-    let subQuery = this.query && query.indexOf(this.query) !== -1;
+    let subQuery = this.query && query.includes(this.query);
     this.query = query;
 
     this.getFindSelection(window).removeAllRanges();
     this.removeAllSearchTooltips();
     this.removeAllSearchMenuitemIndicators();
 
     // Clear telemetry request if user types very frequently.
     if (this.telemetryTimer) {
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -1687,18 +1687,18 @@ var gMainPane = {
       this._list.appendChild(item);
     }
 
     this._selectLastSelectedType();
   },
 
   _matchesFilter(aType) {
     var filterValue = this._filter.value.toLowerCase();
-    return this._describeType(aType).toLowerCase().indexOf(filterValue) != -1 ||
-      this._describePreferredAction(aType).toLowerCase().indexOf(filterValue) != -1;
+    return this._describeType(aType).toLowerCase().includes(filterValue) ||
+      this._describePreferredAction(aType).toLowerCase().includes(filterValue);
   },
 
   /**
    * Describe, in a human-readable fashion, the type represented by the given
    * handler info object.  Normally this is just the description provided by
    * the info object, but if more than one object presents the same description,
    * then we annotate the duplicate descriptions with the type itself to help
    * users distinguish between those types.
@@ -3016,17 +3016,17 @@ HandlerInfoWrapper.prototype = {
   //
   // FIXME: once handler info records are broken up into OS-provided records
   // and user-configured records, stop using this boolean flag and simply
   // check for the presence of a user-configured record to determine whether
   // or not this type is only handled by a plugin.  Filed as bug 395142.
   handledOnlyByPlugin: undefined,
 
   get isDisabledPluginType() {
-    return this._getDisabledPluginTypes().indexOf(this.type) != -1;
+    return this._getDisabledPluginTypes().includes(this.type);
   },
 
   _getDisabledPluginTypes() {
     var types = "";
 
     if (Services.prefs.prefHasUserValue(PREF_DISABLED_PLUGIN_TYPES))
       types = Services.prefs.getCharPref(PREF_DISABLED_PLUGIN_TYPES);
 
@@ -3036,17 +3036,17 @@ HandlerInfoWrapper.prototype = {
       return types.split(",");
 
     return [];
   },
 
   disablePluginType() {
     var disabledPluginTypes = this._getDisabledPluginTypes();
 
-    if (disabledPluginTypes.indexOf(this.type) == -1)
+    if (!disabledPluginTypes.includes(this.type))
       disabledPluginTypes.push(this.type);
 
     Services.prefs.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
       disabledPluginTypes.join(","));
 
     // Update the category manager so existing browser windows update.
     this._categoryMgr.deleteCategoryEntry("Gecko-Content-Viewers",
       this.type,
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -1279,17 +1279,17 @@ var gPrivacyPane = {
 
       let malware = malwareTable.value
         .split(",")
         .filter(x => x !== "goog-unwanted-proto" &&
                      x !== "goog-unwanted-shavar" &&
                      x !== "test-unwanted-simple");
 
       if (blockUncommonUnwanted.checked) {
-        if (malware.indexOf("goog-malware-shavar") != -1) {
+        if (malware.includes("goog-malware-shavar")) {
           malware.push("goog-unwanted-shavar");
         } else {
           malware.push("goog-unwanted-proto");
         }
 
         malware.push("test-unwanted-simple");
       }
 
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -412,17 +412,17 @@ EngineStore.prototype = {
     return this._engines.find(engine => engine.name == aName);
   },
 
   _cloneEngine(aEngine) {
     var clonedObj = {};
     for (var i in aEngine)
       clonedObj[i] = aEngine[i];
     clonedObj.originalEngine = aEngine;
-    clonedObj.shown = this.hiddenList.indexOf(clonedObj.name) == -1;
+    clonedObj.shown = !this.hiddenList.includes(clonedObj.name);
     return clonedObj;
   },
 
   // Callback for Array's some(). A thisObj must be passed to some()
   _isSameEngine(aEngineClone) {
     return aEngineClone.originalEngine == this.originalEngine;
   },
 
--- a/browser/components/preferences/in-content/tests/browser_bug705422.js
+++ b/browser/components/preferences/in-content/tests/browser_bug705422.js
@@ -78,17 +78,17 @@ function runTest(win, searchTerm, cookie
     EventUtils.synthesizeMouseAtCenter(deleteButton, {}, win);
 
     // count cookies should be matches-1
     is(win.gCookiesWindow._view.rowCount, matches - 1, "Deleted selected cookie");
 
     // select two adjacent cells and delete
     EventUtils.synthesizeMouse(tree.body, rect.x + rect.width / 2, rect.y + rect.height / 2, {}, win);
     var eventObj = {};
-    if (navigator.platform.indexOf("Mac") >= 0)
+    if (navigator.platform.includes("Mac"))
         eventObj.metaKey = true;
     else
         eventObj.ctrlKey = true;
     rect = tree.treeBoxObject.getCoordsForCellItem(1, tree.columns[0], "cell");
     EventUtils.synthesizeMouse(tree.body, rect.x + rect.width / 2, rect.y + rect.height / 2, eventObj, win);
     EventUtils.synthesizeMouseAtCenter(deleteButton, {}, win);
 
     // count cookies should be matches-3
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -191,17 +191,17 @@ var gTranslationExceptions = {
 
   onLanguageDeleted() {
     let langs = Services.prefs.getCharPref(kLanguagesPref);
     if (!langs)
       return;
 
     let removed = this._langTree.getSelectedItems().map(l => l.langCode);
 
-    langs = langs.split(",").filter(l => removed.indexOf(l) == -1);
+    langs = langs.split(",").filter(l => !removed.includes(l));
     Services.prefs.setCharPref(kLanguagesPref, langs.join(","));
   },
 
   onAllLanguagesDeleted() {
     Services.prefs.setCharPref(kLanguagesPref, "");
   },
 
   onSiteDeleted() {
--- a/browser/components/search/test/browser_searchbar_openpopup.js
+++ b/browser/components/search/test/browser_searchbar_openpopup.js
@@ -534,17 +534,17 @@ add_task(async function dont_rollup_onca
   is(textbox.selectionEnd, 7, "Should have moved the caret (selectionEnd after left)");
   is(searchPopup.state, "open", "Popup should still be open");
 
   EventUtils.synthesizeKey("VK_RIGHT", {});
   is(textbox.selectionStart, 8, "Should have moved the caret (selectionStart after right)");
   is(textbox.selectionEnd, 8, "Should have moved the caret (selectionEnd after right)");
   is(searchPopup.state, "open", "Popup should still be open");
 
-  if (navigator.platform.indexOf("Mac") == -1) {
+  if (!navigator.platform.includes("Mac")) {
     EventUtils.synthesizeKey("VK_HOME", {});
     is(textbox.selectionStart, 0, "Should have moved the caret (selectionStart after home)");
     is(textbox.selectionEnd, 0, "Should have moved the caret (selectionEnd after home)");
     is(searchPopup.state, "open", "Popup should still be open");
   }
 
   // Close the popup again
   promise = promiseEvent(searchPopup, "popuphidden");
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3078,17 +3078,17 @@ var SessionStoreInternal = {
     let removableTabs = [];
     let tabbrowser = aWindow.gBrowser;
     let startupPref = this._prefBranch.getIntPref("startup.page");
     if (startupPref == 1)
       homePages = homePages.concat(aWindow.gHomeButton.getHomePage().split("|"));
 
     for (let i = tabbrowser._numPinnedTabs; i < tabbrowser.tabs.length; i++) {
       let tab = tabbrowser.tabs[i];
-      if (homePages.indexOf(tab.linkedBrowser.currentURI.spec) != -1) {
+      if (homePages.includes(tab.linkedBrowser.currentURI.spec)) {
         removableTabs.push(tab);
       }
     }
 
     if (tabbrowser.tabs.length == removableTabs.length) {
       canOverwriteTabs = true;
     } else {
       // If we're not overwriting all of the tabs, then close the home tabs.
@@ -4003,17 +4003,17 @@ var SessionStoreInternal = {
    * @param aWindow
    *        Window reference
    * @param aWinData
    *        Object containing session data for the window
    */
   restoreWindowFeatures: function ssi_restoreWindowFeatures(aWindow, aWinData) {
     var hidden = (aWinData.hidden) ? aWinData.hidden.split(",") : [];
     WINDOW_HIDEABLE_FEATURES.forEach(function(aItem) {
-      aWindow[aItem].visible = hidden.indexOf(aItem) == -1;
+      aWindow[aItem].visible = !hidden.includes(aItem);
     });
 
     if (aWinData.isPopup) {
       this._windows[aWindow.__SSi].isPopup = true;
       if (aWindow.gURLBar) {
         aWindow.gURLBar.readOnly = true;
       }
     } else {
--- a/browser/components/sessionstore/test/browser_backup_recovery.js
+++ b/browser/components/sessionstore/test/browser_backup_recovery.js
@@ -57,33 +57,33 @@ add_task(async function test_creation() 
 
   info("Testing situation after a single write");
   await promiseBrowserLoaded(tab.linkedBrowser);
   await TabStateFlusher.flush(tab.linkedBrowser);
   await SessionSaver.run();
 
   ok((await File.exists(Paths.recovery)), "After write, recovery sessionstore file exists again");
   ok(!(await File.exists(Paths.recoveryBackup)), "After write, recoveryBackup sessionstore doesn't exist");
-  ok((await promiseRead(Paths.recovery)).indexOf(URL) != -1, "Recovery sessionstore file contains the required tab");
+  ok((await promiseRead(Paths.recovery)).includes(URL), "Recovery sessionstore file contains the required tab");
   ok(!(await File.exists(Paths.clean)), "After first write, clean shutdown sessionstore doesn't exist, since we haven't shutdown yet");
 
   // Open a second tab, save session, ensure that the correct files exist.
   info("Testing situation after a second write");
   let URL2 = URL_BASE + "?second_write";
   tab.linkedBrowser.loadURI(URL2);
   await promiseBrowserLoaded(tab.linkedBrowser);
   await TabStateFlusher.flush(tab.linkedBrowser);
   await SessionSaver.run();
 
   ok((await File.exists(Paths.recovery)), "After second write, recovery sessionstore file still exists");
-  ok((await promiseRead(Paths.recovery)).indexOf(URL2) != -1, "Recovery sessionstore file contains the latest url");
+  ok((await promiseRead(Paths.recovery)).includes(URL2), "Recovery sessionstore file contains the latest url");
   ok((await File.exists(Paths.recoveryBackup)), "After write, recoveryBackup sessionstore now exists");
   let backup = await promiseRead(Paths.recoveryBackup);
-  ok(backup.indexOf(URL2) == -1, "Recovery backup doesn't contain the latest url");
-  ok(backup.indexOf(URL) != -1, "Recovery backup contains the original url");
+  ok(!backup.includes(URL2), "Recovery backup doesn't contain the latest url");
+  ok(backup.includes(URL), "Recovery backup contains the original url");
   ok(!(await File.exists(Paths.clean)), "After first write, clean shutdown sessinstore doesn't exist, since we haven't shutdown yet");
 
   info("Reinitialize, ensure that we haven't leaked sensitive files");
   await SessionFile.read(); // Reinitializes SessionFile
   await SessionSaver.run();
   ok(!(await File.exists(Paths.clean)), "After second write, clean shutdown sessonstore doesn't exist, since we haven't shutdown yet");
   ok(!(await File.exists(Paths.upgradeBackup)), "After second write, clean shutdwn sessionstore doesn't exist, since we haven't shutdown yet");
   ok(!(await File.exists(Paths.nextUpgradeBackup)), "After second write, clean sutdown sessionstore doesn't exist, since we haven't shutdown yet");
--- a/browser/components/sessionstore/test/browser_formdata_format.js
+++ b/browser/components/sessionstore/test/browser_formdata_format.js
@@ -81,17 +81,17 @@ async function testTabRestoreData(aFormD
     let input1 = doc.getElementById("input1");
     let input2 = doc.querySelector("input[name=input2]");
 
     // test format
     ok("id" in restoredFormData || "xpath" in restoredFormData,
        "FormData format is valid: " + restoredFormData);
     // validate that there are no old keys
     for (let key of Object.keys(restoredFormData)) {
-      if (["id", "xpath", "url"].indexOf(key) === -1) {
+      if (!["id", "xpath", "url"].includes(key)) {
         ok(false, "FormData format is invalid.");
       }
     }
     // test id
     is(input1.value, aExpectedValue[0],
        "FormData by 'id' has been restored correctly");
     // test xpath
     is(input2.value, aExpectedValue[1],
--- a/browser/components/sessionstore/test/browser_privatetabs.js
+++ b/browser/components/sessionstore/test/browser_privatetabs.js
@@ -29,18 +29,18 @@ add_task(async function() {
     await TabStateFlusher.flush(tab1.linkedBrowser);
     await TabStateFlusher.flush(tab2.linkedBrowser);
 
     info("Checking out state");
     let state = await promiseRecoveryFileContents();
 
     info("State: " + state);
     // Ensure that sessionstore.js only knows about the public tab
-    ok(state.indexOf(URL_PUBLIC) != -1, "State contains public tab");
-    ok(state.indexOf(URL_PRIVATE) == -1, "State does not contain private tab");
+    ok(state.includes(URL_PUBLIC), "State contains public tab");
+    ok(!state.includes(URL_PRIVATE), "State does not contain private tab");
 
     // Ensure that we can close and undo close the public tab but not the private tab
     gBrowser.removeTab(tab2);
     tab2 = null;
 
     gBrowser.removeTab(tab1);
     tab1 = null;
 
--- a/browser/components/sessionstore/test/browser_upgrade_backup.js
+++ b/browser/components/sessionstore/test/browser_upgrade_backup.js
@@ -113,17 +113,17 @@ add_task(async function test_upgrade_bac
 
   // get currently existing backups and check their count
   let newBackups = await getUpgradeBackups();
   is(newBackups.length, maxUpgradeBackups, "expected number of backups are present after removing old backups");
 
   // find all backups that were created during the last call to `SessionFile.write("");`
   // ie, filter out all the backups that have already been present before the call
   newBackups = newBackups.filter(function(backup) {
-    return backups.indexOf(backup) < 0;
+    return !backups.includes(backup);
   });
 
   // check that exactly one new backup was created
   is(newBackups.length, 1, "one new backup was created that was not removed");
 
   await SessionFile.write(""); // Second call to write() should not trigger anything
 
   backups = await getUpgradeBackups();
--- a/browser/components/sessionstore/test/content.js
+++ b/browser/components/sessionstore/test/content.js
@@ -79,17 +79,17 @@ addMessageListener("ss-test:getStyleShee
   let titles = Array.map(sheets, ss => [ss.title, ss.disabled]);
   sendSyncMessage("ss-test:getStyleSheets", titles);
 });
 
 addMessageListener("ss-test:enableStyleSheetsForSet", function(msg) {
   let sheets = content.document.styleSheets;
   let change = false;
   for (let i = 0; i < sheets.length; i++) {
-    if (sheets[i].disabled != (msg.data.indexOf(sheets[i].title) == -1)) {
+    if (sheets[i].disabled != (!msg.data.includes(sheets[i].title))) {
       change = true;
       break;
     }
   }
   function observer() {
     Services.obs.removeObserver(observer, "style-sheet-applicable-state-changed");
 
     // It's possible our observer will run before the one in
--- a/browser/components/syncedtabs/SyncedTabsDeckStore.js
+++ b/browser/components/syncedtabs/SyncedTabsDeckStore.js
@@ -34,17 +34,17 @@ Object.assign(SyncedTabsDeckStore.protot
     this.emit("change", {panels, isUpdatable});
   },
 
   /**
    * Sets the selected panelId and triggers a change event.
    * @param {String} panelId - ID of the panel to select.
    */
   selectPanel(panelId) {
-    if (this._panels.indexOf(panelId) === -1 || this._selectedPanel === panelId) {
+    if (!this._panels.includes(panelId) || this._selectedPanel === panelId) {
       return;
     }
     this._selectedPanel = panelId;
     this._change(true);
   },
 
   /**
    * Update the set of panels in the deck and trigger a change event.
--- a/browser/components/tests/browser/browser_bug538331.js
+++ b/browser/components/tests/browser/browser_bug538331.js
@@ -324,18 +324,18 @@ function testShowNotification() {
     }
 
     reloadUpdateManagerData();
     Services.prefs.setBoolPref(PREF_POSTUPDATE, true);
 
     gBG.observe(null, "browser-glue-test", "post-update-notification");
 
     let updateBox = notifyBox.getNotificationWithValue("post-update-notification");
-    if (testCase.actions && testCase.actions.indexOf("showNotification") != -1 &&
-        testCase.actions.indexOf("silent") == -1) {
+    if (testCase.actions && testCase.actions.includes("showNotification") &&
+        !testCase.actions.includes("silent")) {
       ok(updateBox, "Update notification box should have been displayed");
       if (updateBox) {
         if (testCase.notificationText) {
           is(updateBox.label, testCase.notificationText, "Update notification box " +
              "should have the label provided by the update");
         }
         if (testCase.notificationButtonLabel) {
           var button = updateBox.getElementsByTagName("button").item(0);
--- a/browser/components/translation/BingTranslator.jsm
+++ b/browser/components/translation/BingTranslator.jsm
@@ -127,17 +127,17 @@ this.BingTranslator.prototype = {
    * not in an active state) and calling the function to resolve the promise
    * returned by the public `translate()` method when there's no pending.
    * request left.
    *
    * @param   aError   [optional] The XHR object of the request that failed.
    */
   _chunkFailed(aError) {
     if (aError instanceof Ci.nsIXMLHttpRequest &&
-        [400, 401].indexOf(aError.status) != -1) {
+        [400, 401].includes(aError.status)) {
       let body = aError.responseText;
       if (body && body.includes("TranslateApiException") &&
           (body.includes("balance") || body.includes("active state")))
         this._serviceUnavailable = true;
     }
 
     this._checkIfFinished();
   },
--- a/browser/components/translation/Translation.jsm
+++ b/browser/components/translation/Translation.jsm
@@ -39,17 +39,17 @@ this.Translation = {
 
   documentStateReceived(aBrowser, aData) {
     if (aData.state == this.STATE_OFFER) {
       if (aData.detectedLanguage == this.defaultTargetLanguage) {
         // Detected language is the same as the user's locale.
         return;
       }
 
-      if (this.supportedSourceLanguages.indexOf(aData.detectedLanguage) == -1) {
+      if (!this.supportedSourceLanguages.includes(aData.detectedLanguage)) {
         // Detected language is not part of the supported languages.
         TranslationTelemetry.recordMissedTranslationOpportunity(aData.detectedLanguage);
         return;
       }
 
       TranslationTelemetry.recordTranslationOpportunity(aData.detectedLanguage);
     }
 
@@ -96,17 +96,17 @@ this.Translation = {
     return this.supportedEngines.keys[0];
   },
 
   /**
    * Returns the name of the preferred translation engine.
    */
   get translationEngine() {
     let engine = Services.prefs.getCharPref("browser.translation.engine");
-    return Object.keys(this.supportedEngines).indexOf(engine) == -1 ? this.defaultEngine : engine;
+    return !Object.keys(this.supportedEngines).includes(engine) ? this.defaultEngine : engine;
   },
 };
 
 /* TranslationUI objects keep the information related to translation for
  * a specific browser.  This object is passed to the translation
  * infobar so that it can initialize itself.  The properties exposed to
  * the infobar are:
  * - detectedLanguage, code of the language detected on the web page.
@@ -239,17 +239,17 @@ TranslationUI.prototype = {
     // Never show the infobar automatically while the translation
     // service is temporarily unavailable.
     if (Translation.serviceUnavailable)
       return false;
 
     // Check if we should never show the infobar for this language.
     let neverForLangs =
       Services.prefs.getCharPref("browser.translation.neverForLanguages");
-    if (neverForLangs.split(",").indexOf(this.detectedLanguage) != -1) {
+    if (neverForLangs.split(",").includes(this.detectedLanguage)) {
       TranslationTelemetry.recordAutoRejectedTranslationOffer();
       return false;
     }
 
     // or if we should never show the infobar for this domain.
     let perms = Services.perms;
     if (perms.testExactPermission(aURI, "translate") == perms.DENY_ACTION) {
       TranslationTelemetry.recordAutoRejectedTranslationOffer();
--- a/browser/components/translation/YandexTranslator.jsm
+++ b/browser/components/translation/YandexTranslator.jsm
@@ -142,17 +142,17 @@ this.YandexTranslator.prototype = {
   _chunkFailed(aError) {
     if (aError instanceof Ci.nsIXMLHttpRequest) {
       let body = aError.responseText;
       let json = { code: 0 };
       try {
         json = JSON.parse(body);
       } catch (e) {}
 
-      if (json.code && YANDEX_PERMANENT_ERRORS.indexOf(json.code) != -1)
+      if (json.code && YANDEX_PERMANENT_ERRORS.includes(json.code))
         this._serviceUnavailable = true;
     }
 
     this._checkIfFinished();
   },
 
   /**
    * Function called when a request sent to the server has completed.
--- a/browser/components/translation/translation-infobar.xml
+++ b/browser/components/translation/translation-infobar.xml
@@ -372,17 +372,17 @@
             item.setAttribute("accesskey",
                               bundle.GetStringFromName(kStrId + ".accesskey"));
             item.langCode = lang;
 
             // We may need to disable the menuitems if they have already been used.
             // Check if translation is already disabled for this language:
             let neverForLangs =
               Services.prefs.getCharPref("browser.translation.neverForLanguages");
-            item.disabled = neverForLangs.split(",").indexOf(lang) != -1;
+            item.disabled = neverForLangs.split(",").includes(lang);
 
             // Check if translation is disabled for the domain:
             let uri = this.translation.browser.currentURI;
             let perms = Services.perms;
             item = this._getAnonElt("neverForSite");
             item.disabled =
               perms.testExactPermission(uri, "translate") == perms.DENY_ACTION;
           ]]>
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -410,17 +410,17 @@ this.UITour = {
       case "showHighlight": {
         let targetPromise = this.getTarget(window, data.target);
         targetPromise.then(target => {
           if (!target.node) {
             log.error("UITour: Target could not be resolved: " + data.target);
             return;
           }
           let effect = undefined;
-          if (this.highlightEffects.indexOf(data.effect) !== -1) {
+          if (this.highlightEffects.includes(data.effect)) {
             effect = data.effect;
           }
           this.showHighlight(window, target, effect);
         }).catch(log.error);
         break;
       }
 
       case "hideHighlight": {
--- a/browser/components/uitour/test/browser_UITour.js
+++ b/browser/components/uitour/test/browser_UITour.js
@@ -331,27 +331,27 @@ var tests = [
       });
     });
   },
   function test_addToolbarButton(done) {
     let placement = CustomizableUI.getPlacementOfWidget("panic-button");
     is(placement, null, "default UI has panic button in the palette");
 
     gContentAPI.getConfiguration("availableTargets", (data) => {
-      let available = (data.targets.indexOf("forget") != -1);
+      let available = (data.targets.includes("forget"));
       ok(!available, "Forget button should not be available by default");
 
       gContentAPI.addNavBarWidget("forget", () => {
         info("addNavBarWidget callback successfully called");
 
         let updatedPlacement = CustomizableUI.getPlacementOfWidget("panic-button");
         is(updatedPlacement.area, CustomizableUI.AREA_NAVBAR);
 
         gContentAPI.getConfiguration("availableTargets", (data2) => {
-          let updatedAvailable = data2.targets.indexOf("forget") != -1;
+          let updatedAvailable = data2.targets.includes("forget");
           ok(updatedAvailable, "Forget button should now be available");
 
           // Cleanup
           CustomizableUI.removeWidgetFromArea("panic-button");
           done();
         });
       });
     });
--- a/browser/components/uitour/test/browser_trackingProtection_tour.js
+++ b/browser/components/uitour/test/browser_trackingProtection_tour.js
@@ -58,17 +58,17 @@ async function checkToggleTarget(targetI
     iframe.setAttribute("src", "https://tracking.example.com/");
     doc.body.insertBefore(iframe, doc.body.firstChild);
   });
 
   await trackerOpened;
 
   let testTargetAvailability = async function(expectedAvailable) {
     let data = await getConfigurationPromise("availableTargets");
-    let available = (data.targets.indexOf(targetID) != -1);
+    let available = (data.targets.includes(targetID));
     is(available, expectedAvailable, "Target has expected availability.");
   };
   await testTargetAvailability(false);
   await showMenuPromise("controlCenter");
   await testTargetAvailability(true);
 
   await showInfoPromise(targetID, "This is " + targetID,
                         "My arrow should be on the side");
--- a/browser/components/uitour/test/head.js
+++ b/browser/components/uitour/test/head.js
@@ -56,17 +56,17 @@ function taskify(fun) {
 
 function is_hidden(element) {
   var style = element.ownerGlobal.getComputedStyle(element);
   if (style.display == "none")
     return true;
   if (style.visibility != "visible")
     return true;
   if (style.display == "-moz-popup")
-    return ["hiding", "closed"].indexOf(element.state) != -1;
+    return ["hiding", "closed"].includes(element.state);
 
   // Hiding a parent element will hide all its children
   if (element.parentNode != element.ownerDocument)
     return is_hidden(element.parentNode);
 
   return false;
 }
 
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -1229,17 +1229,17 @@ Experiments.Experiments.prototype = {
     // abstracted away from us by design.
     if (activeExperiment) {
       let changes;
       let shouldStopResult = await activeExperiment.shouldStop();
       if (shouldStopResult.shouldStop) {
         let expireReasons = ["endTime", "maxActiveSeconds"];
         let kind, reason;
 
-        if (expireReasons.indexOf(shouldStopResult.reason[0]) != -1) {
+        if (expireReasons.includes(shouldStopResult.reason[0])) {
           kind = TELEMETRY_LOG.TERMINATION.EXPIRED;
           reason = null;
         } else {
           kind = TELEMETRY_LOG.TERMINATION.RECHECK;
           reason = shouldStopResult.reason;
         }
         changes = await activeExperiment.stop(kind, reason);
       } else if (this._terminateReason) {
@@ -1659,33 +1659,33 @@ Experiments.ExperimentEntry.prototype = 
         condition: () => now >= data.startTime },
       { name: "endTime",
         condition: () => now < data.endTime },
       { name: "maxStartTime",
         condition: () => this._startDate || !data.maxStartTime || now <= data.maxStartTime },
       { name: "maxActiveSeconds",
         condition: () => !this._startDate || now <= (startSec + maxActive) },
       { name: "appName",
-        condition: () => !data.appName || data.appName.indexOf(Services.appinfo.name) != -1 },
+        condition: () => !data.appName || data.appName.includes(Services.appinfo.name) },
       { name: "minBuildID",
         condition: () => !data.minBuildID || Services.appinfo.platformBuildID >= data.minBuildID },
       { name: "maxBuildID",
         condition: () => !data.maxBuildID || Services.appinfo.platformBuildID <= data.maxBuildID },
       { name: "buildIDs",
-        condition: () => !data.buildIDs || data.buildIDs.indexOf(Services.appinfo.platformBuildID) != -1 },
+        condition: () => !data.buildIDs || data.buildIDs.includes(Services.appinfo.platformBuildID) },
       { name: "os",
-        condition: () => !data.os || data.os.indexOf(Services.appinfo.OS) != -1 },
+        condition: () => !data.os || data.os.includes(Services.appinfo.OS) },
       { name: "channel",
-        condition: () => !data.channel || data.channel.indexOf(channel) != -1 },
+        condition: () => !data.channel || data.channel.includes(channel) },
       { name: "locale",
-        condition: () => !data.locale || data.locale.indexOf(locale) != -1 },
+        condition: () => !data.locale || data.locale.includes(locale) },
       { name: "sample",
         condition: () => data.sample === undefined || this._randomValue <= data.sample },
       { name: "version",
-        condition: () => !data.version || data.version.indexOf(Services.appinfo.version) != -1 },
+        condition: () => !data.version || data.version.includes(Services.appinfo.version) },
       { name: "minVersion",
         condition: () => !data.minVersion || Services.vc.compare(Services.appinfo.version, data.minVersion) >= 0 },
       { name: "maxVersion",
         condition: () => !data.maxVersion || Services.vc.compare(Services.appinfo.version, data.maxVersion) <= 0 },
     ];
 
     for (let check of simpleChecks) {
       let result = check.condition();
@@ -2171,17 +2171,17 @@ this.Experiments.PreviousExperimentProvi
         return;
       }
     }
 
     cb(null);
   },
 
   getAddonsByTypes(types, cb) {
-    if (types && types.length > 0 && types.indexOf("experiment") == -1) {
+    if (types && types.length > 0 && !types.includes("experiment")) {
       cb([]);
       return;
     }
 
     cb(this._experimentList.map(e => new PreviousExperimentAddon(e)));
   },
 
   _updateExperimentList() {
--- a/browser/extensions/asan-reporter/bootstrap.js
+++ b/browser/extensions/asan-reporter/bootstrap.js
@@ -82,17 +82,17 @@ function processDirectory(pathString) {
   let results = [];
 
   // Scan the directory for any ASan logs that we haven't
   // submitted yet. Store the filenames in an array so we
   // can close the iterator early.
   iterator.forEach(
     (entry) => {
       if (entry.name.indexOf("ff_asan_log.") == 0
-        && entry.name.indexOf("submitted") < 0) {
+        && !entry.name.includes("submitted")) {
         results.push(entry);
       }
     }
   ).then(
     () => {
       iterator.close();
       logger.info("Processing " + results.length + " reports...");
 
--- a/browser/extensions/aushelper/bootstrap.js
+++ b/browser/extensions/aushelper/bootstrap.js
@@ -70,17 +70,17 @@ function startup() {
     Cu.reportError("AUSHelper - error getting CPU vendor indentifier. Exception: " + e);
     cpuVendorIDMatch = null;
     cpuErrorCode |= CPU_VENDOR_ID_ERROR;
   }
 
   let cpuIDMatch = false;
   try {
     let cpuID = wrk.readStringValue("Identifier");
-    if (cpuID.toLowerCase().indexOf("family 6 model 61 stepping 4") != -1) {
+    if (cpuID.toLowerCase().includes("family 6 model 61 stepping 4")) {
       cpuIDMatch = true;
     }
   } catch (e) {
     Cu.reportError("AUSHelper - error getting CPU indentifier. Exception: " + e);
     cpuIDMatch = null;
     cpuErrorCode |= CPU_ID_ERROR;
   }
 
@@ -98,17 +98,17 @@ function startup() {
           for (let j = 4; j < 8; j++) {
             let c = regVal.charCodeAt(j).toString(16);
             if (c.length == 1) {
               c = "0" + c;
             }
             hexVal.unshift(c);
           }
           cpuRevMatch = false;
-          if (microCodeVersions.indexOf(parseInt(hexVal.join(""))) != -1) {
+          if (microCodeVersions.includes(parseInt(hexVal.join("")))) {
             cpuRevMatch = true;
           }
           break;
         }
       } catch (e) {
         if (i == keyNames.length - 1) {
           // The registry key name's value was not successfully queried.
           cpuRevMatch = null;
--- a/browser/extensions/formautofill/FormAutofillHandler.jsm
+++ b/browser/extensions/formautofill/FormAutofillHandler.jsm
@@ -946,17 +946,17 @@ class FormAutofillHandler {
     }
 
     if (currentForm.elements.length != this.form.elements.length) {
       log.debug("The count of form elements is changed.");
       this._updateForm(getFormLike());
       return true;
     }
 
-    if (this.form.elements.indexOf(element) === -1) {
+    if (!this.form.elements.includes(element)) {
       log.debug("The element can not be found in the current form.");
       this._updateForm(getFormLike());
       return true;
     }
 
     return false;
   }
 
--- a/browser/extensions/mortar/host/pdf/chrome/js/l20n.js
+++ b/browser/extensions/mortar/host/pdf/chrome/js/l20n.js
@@ -470,17 +470,17 @@
     'xog': 3,
     'yo': 0,
     'zh': 0,
     'zu': 3
   };
 
   // utility functions for plural rules methods
   function isIn(n, list) {
-    return list.indexOf(n) !== -1;
+    return list.includes(n);
   }
   function isBetween(n, start, end) {
     return typeof n === typeof start && start <= n && n <= end;
   }
 
   // list of all plural rules methods:
   // map an integer to the plural form name to use
   const pluralRules = {
@@ -1912,17 +1912,17 @@
     return err;
   }
 
   function prioritizeLocales(def, availableLangs, requested) {
     let supportedLocale;
     // Find the first locale in the requested list that is supported.
     for (let i = 0; i < requested.length; i++) {
       const locale = requested[i];
-      if (availableLangs.indexOf(locale) !== -1) {
+      if (availableLangs.includes(locale)) {
         supportedLocale = locale;
         break;
       }
     }
     if (!supportedLocale ||
         supportedLocale === def) {
       return [def];
     }
@@ -2198,33 +2198,33 @@
           sourceElement.setAttribute(attr.name, attr.value);
         }
       }
     }
   }
 
   // XXX the allowed list should be amendable; https://bugzil.la/922573
   function isElementAllowed(element) {
-    return allowed.elements.indexOf(element.tagName.toLowerCase()) !== -1;
+    return allowed.elements.includes(element.tagName.toLowerCase());
   }
 
   function isAttrAllowed(attr, element) {
     const attrName = attr.name.toLowerCase();
     const tagName = element.tagName.toLowerCase();
     // is it a globally safe attribute?
-    if (allowed.attributes.global.indexOf(attrName) !== -1) {
+    if (allowed.attributes.global.includes(attrName)) {
       return true;
     }
     // are there no allowed attributes for this element?
     if (!allowed.attributes[tagName]) {
       return false;
     }
     // is it allowed on this element?
     // XXX the allowed list should be amendable; https://bugzil.la/922573
-    if (allowed.attributes[tagName].indexOf(attrName) !== -1) {
+    if (allowed.attributes[tagName].includes(attrName)) {
       return true;
     }
     // special case for value on inputs with type button, reset, submit
     if (tagName === 'input' && attrName === 'value') {
       const type = element.type.toLowerCase();
       if (type === 'submit' || type === 'button' || type === 'reset') {
         return true;
       }
@@ -2385,17 +2385,17 @@
         resolve();
       }, {once: true});
     });
   }
 
   // Intl.Locale
   function getDirection(code) {
     const tag = code.split('-')[0];
-    return ['ar', 'he', 'fa', 'ps', 'ur'].indexOf(tag) >= 0 ?
+    return ['ar', 'he', 'fa', 'ps', 'ur'].includes(tag) ?
       'rtl' : 'ltr';
   }
 
   // Opera and Safari don't support it yet
   if (navigator.languages === undefined) {
     navigator.languages = [navigator.language];
   }
 
--- a/browser/extensions/pdfjs/content/PdfJs.jsm
+++ b/browser/extensions/pdfjs/content/PdfJs.jsm
@@ -257,17 +257,17 @@ var PdfJs = {
     var types = [];
     if (prefs.prefHasUserValue(PREF_DISABLED_PLUGIN_TYPES)) {
       stringTypes = prefs.getCharPref(PREF_DISABLED_PLUGIN_TYPES);
     }
     if (stringTypes !== "") {
       types = stringTypes.split(",");
     }
 
-    if (types.indexOf(PDF_CONTENT_TYPE) === -1) {
+    if (!types.includes(PDF_CONTENT_TYPE)) {
       types.push(PDF_CONTENT_TYPE);
     }
     prefs.setCharPref(PREF_DISABLED_PLUGIN_TYPES, types.join(","));
 
     // Update the category manager in case the plugins are already loaded.
     let categoryManager = Cc["@mozilla.org/categorymanager;1"];
     categoryManager.getService(Ci.nsICategoryManager).
                     deleteCategoryEntry("Gecko-Content-Viewers",
@@ -285,17 +285,17 @@ var PdfJs = {
     if (!isDefaultHandler()) {
       return false;
     }
 
     // Check if we have disabled plugin handling of 'application/pdf' in prefs
     if (Services.prefs.prefHasUserValue(PREF_DISABLED_PLUGIN_TYPES)) {
       let disabledPluginTypes =
         Services.prefs.getCharPref(PREF_DISABLED_PLUGIN_TYPES).split(",");
-      if (disabledPluginTypes.indexOf(PDF_CONTENT_TYPE) >= 0) {
+      if (disabledPluginTypes.includes(PDF_CONTENT_TYPE)) {
         return true;
       }
     }
 
     // Check if there is an enabled pdf plugin.
     // Note: this check is performed last because getPluginTags() triggers
     // costly plugin list initialization (bug 881575)
     let tags = Cc["@mozilla.org/plugin/host;1"].
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -915,22 +915,22 @@ PdfStreamConverter.prototype = {
 
       var hash = aRequest.URI.ref;
       var isPDFBugEnabled = getBoolPref(PREF_PREFIX + ".pdfBugEnabled", false);
       rangeRequest = contentEncoding === "identity" &&
                      acceptRanges === "bytes" &&
                      aRequest.contentLength >= 0 &&
                      !getBoolPref(PREF_PREFIX + ".disableRange", false) &&
                      (!isPDFBugEnabled ||
-                      hash.toLowerCase().indexOf("disablerange=true") < 0);
+                      !hash.toLowerCase().includes("disablerange=true"));
       streamRequest = contentEncoding === "identity" &&
                       aRequest.contentLength >= 0 &&
                       !getBoolPref(PREF_PREFIX + ".disableStream", false) &&
                       (!isPDFBugEnabled ||
-                       hash.toLowerCase().indexOf("disablestream=true") < 0);
+                       !hash.toLowerCase().includes("disablestream=true"));
     }
 
     aRequest.QueryInterface(Ci.nsIChannel);
 
     aRequest.QueryInterface(Ci.nsIWritablePropertyBag);
 
     var contentDispositionFilename;
     try {
--- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
+++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
@@ -260,17 +260,17 @@ var PdfjsChromeUtils = {
       this._findbarFromMessage(aMsg)
           .removeEventListener(type, this, true);
     }
   },
 
   _ensurePreferenceAllowed(aPrefName) {
     let unPrefixedName = aPrefName.split(PREF_PREFIX + ".");
     if (unPrefixedName[0] !== "" ||
-        this._allowedPrefNames.indexOf(unPrefixedName[1]) === -1) {
+        !this._allowedPrefNames.includes(unPrefixedName[1])) {
       let msg = "\"" + aPrefName + "\" " +
                 "can't be accessed from content. See PdfjsChromeUtils.";
       throw new Error(msg);
     }
   },
 
   _clearUserPref(aPrefName) {
     this._ensurePreferenceAllowed(aPrefName);
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -1572,17 +1572,17 @@ class SimpleXMLParser {
         node.childNodes = children;
         nodes.push(node);
         return length + ',';
       });
     } while (lastLength < nodes.length);
     return { documentElement: nodes.pop() };
   }
   _decodeXML(text) {
-    if (text.indexOf('&') < 0) {
+    if (!text.includes('&')) {
       return text;
     }
     return text.replace(/&(#(x[0-9a-f]+|\d+)|\w+);/gi, function (all, entityName, number) {
       if (number) {
         if (number[0] === 'x') {
           number = parseInt(number.substring(1), 16);
         } else {
           number = +number;
@@ -2360,17 +2360,17 @@ class LoopbackPort {
         return value;
       }
       if (cloned.has(value)) {
         return cloned.get(value);
       }
       var result;
       var buffer;
       if ((buffer = value.buffer) && (0, _util.isArrayBuffer)(buffer)) {
-        var transferable = transfers && transfers.indexOf(buffer) >= 0;
+        var transferable = transfers && transfers.includes(buffer);
         if (value === buffer) {
           result = value;
         } else if (transferable) {
           result = new value.constructor(buffer, value.byteOffset, value.byteLength);
         } else {
           result = new value.constructor(value);
         }
         cloned.set(value, result);
@@ -3675,34 +3675,34 @@ class ChoiceWidgetAnnotationElement exte
         selectElement.multiple = true;
       }
     }
     for (let i = 0, ii = this.data.options.length; i < ii; i++) {
       let option = this.data.options[i];
       let optionElement = document.createElement('option');
       optionElement.textContent = option.displayValue;
       optionElement.value = option.exportValue;
-      if (this.data.fieldValue.indexOf(option.displayValue) >= 0) {
+      if (this.data.fieldValue.includes(option.displayValue)) {
         optionElement.setAttribute('selected', true);
       }
       selectElement.appendChild(optionElement);
     }
     this.container.appendChild(selectElement);
     return this.container;
   }
 }
 class PopupAnnotationElement extends AnnotationElement {
   constructor(parameters) {
     let isRenderable = !!(parameters.data.title || parameters.data.contents);
     super(parameters, isRenderable);
   }
   render() {
     const IGNORE_TYPES = ['Line', 'Square', 'Circle', 'PolyLine', 'Polygon'];
     this.container.className = 'popupAnnotation';
-    if (IGNORE_TYPES.indexOf(this.data.parentType) >= 0) {
+    if (IGNORE_TYPES.includes(this.data.parentType)) {
       return this.container;
     }
     let selector = '[data-annotation-id="' + this.data.parentId + '"]';
     let parentElement = this.layer.querySelector(selector);
     if (!parentElement) {
       return this.container;
     }
     let popup = new PopupElement({
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -10056,17 +10056,17 @@ var ChunkedStreamManager = function Chun
     },
     requestRanges: function ChunkedStreamManager_requestRanges(ranges) {
       ranges = ranges || [];
       var chunksToRequest = [];
       for (var i = 0; i < ranges.length; i++) {
         var beginChunk = this.getBeginChunk(ranges[i].begin);
         var endChunk = this.getEndChunk(ranges[i].end);
         for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
-          if (chunksToRequest.indexOf(chunk) < 0) {
+          if (!chunksToRequest.includes(chunk)) {
             chunksToRequest.push(chunk);
           }
         }
       }
       chunksToRequest.sort(function (a, b) {
         return a - b;
       });
       return this._requestChunks(chunksToRequest);
@@ -32552,17 +32552,17 @@ var CMapFactory = function CMapFactoryCl
     });
   }
   function createBuiltInCMap(name, fetchBuiltInCMap) {
     if (name === 'Identity-H') {
       return Promise.resolve(new IdentityCMap(false, 2));
     } else if (name === 'Identity-V') {
       return Promise.resolve(new IdentityCMap(true, 2));
     }
-    if (BUILT_IN_CMAPS.indexOf(name) === -1) {
+    if (!BUILT_IN_CMAPS.includes(name)) {
       return Promise.reject(new Error('Unknown CMap name: ' + name));
     }
     if (!fetchBuiltInCMap) {
       return Promise.reject(new Error('Built-in CMap parameters are not provided.'));
     }
     return fetchBuiltInCMap(name).then(function (data) {
       var cMapData = data.cMapData,
           compressionType = data.compressionType;
@@ -33489,17 +33489,17 @@ var Font = function FontClosure() {
         tables['head'] = null;
         tables['hhea'] = null;
         tables['hmtx'] = null;
         tables['maxp'] = null;
         tables['name'] = null;
         tables['post'] = null;
         for (let i = 0; i < numTables; i++) {
           let table = readTableEntry(font);
-          if (VALID_TABLES.indexOf(table.tag) < 0) {
+          if (!VALID_TABLES.includes(table.tag)) {
             continue;
           }
           if (table.length === 0) {
             continue;
           }
           tables[table.tag] = table;
         }
         return tables;
@@ -34134,17 +34134,17 @@ var Font = function FontClosure() {
               }
             }
           } else if (op === 0x2B && !tooComplexToFollowFunctions) {
             if (!inFDEF && !inELSE) {
               funcId = stack[stack.length - 1];
               ttContext.functionsUsed[funcId] = true;
               if (funcId in ttContext.functionsStackDeltas) {
                 stack.length += ttContext.functionsStackDeltas[funcId];
-              } else if (funcId in ttContext.functionsDefined && functionsCalled.indexOf(funcId) < 0) {
+              } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) {
                 callstack.push({
                   data,
                   i,
                   stackTop: stack.length - 1
                 });
                 functionsCalled.push(funcId);
                 pc = ttContext.functionsDefined[funcId];
                 if (!pc) {
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -343,17 +343,17 @@ var PKT_SAVED_OVERLAY = function(options
         }
         var activetokenstext = "|";
         $(".token-input-token").each(function(index, element) {
             activetokenstext += $(element).find("p").text() + "|";
         });
 
         var inactivetags = $(".pkt_ext_suggestedtag_detail").find(".token_tag_inactive");
         inactivetags.each(function(index, element) {
-            if (activetokenstext.indexOf("|" + $(element).text() + "|") == -1) {
+            if (!activetokenstext.includes("|" + $(element).text() + "|")) {
                 $(element).removeClass("token_tag_inactive");
             }
         });
     };
     this.hideInactiveTags = function() {
         if (!$(".pkt_ext_suggestedtag_detail").length) {
             return;
         }
--- a/browser/extensions/screenshots/webextension/build/raven.js
+++ b/browser/extensions/screenshots/webextension/build/raven.js
@@ -1257,17 +1257,17 @@
                   fill(
                     xhrproto,
                     'open',
                     function(origOpen) {
                       return function(method, url) {
                         // preserve arity
 
                         // if Sentry key appears in URL, don't capture
-                        if (isString(url) && url.indexOf(self._globalKey) === -1) {
+                        if (isString(url) && !url.includes(self._globalKey)) {
                           this.__raven_xhr = {
                             method: method,
                             url: url,
                             status_code: null
                           };
                         }
 
                         return origOpen.apply(this, arguments);
--- a/browser/extensions/screenshots/webextension/build/shot.js
+++ b/browser/extensions/screenshots/webextension/build/shot.js
@@ -85,17 +85,17 @@ function checkObject(obj, required, opti
   required = required || [];
   for (let attr of required) {
     if (!(attr in obj)) {
       return false;
     }
   }
   optional = optional || [];
   for (let attr in obj) {
-    if (required.indexOf(attr) == -1 && optional.indexOf(attr) == -1) {
+    if (!required.includes(attr) && !optional.includes(attr)) {
       return false;
     }
   }
   return true;
 }
 
 /** Create a JSON object from a normal object, given the required and optional
     attributes (filtering out any other attributes).  Optional attributes are
@@ -243,17 +243,17 @@ class AbstractShot {
     if (attrs.clips) {
       for (let clipId in attrs.clips) {
         let clip = attrs.clips[clipId];
         this._clips[clipId] = new this.Clip(this, clipId, clip);
       }
     }
 
     for (let attr in attrs) {
-      if (attr !== "clips" && attr !== "id" && this.REGULAR_ATTRS.indexOf(attr) === -1 && this.DEPRECATED_ATTRS.indexOf(attr) === -1) {
+      if (attr !== "clips" && attr !== "id" && !this.REGULAR_ATTRS.includes(attr) && !this.DEPRECATED_ATTRS.includes(attr)) {
         throw new Error("Unexpected attribute: " + attr);
       } else if (attr === "id") {
         console.warn("passing id in attrs in AbstractShot constructor");
         console.trace();
         assert(attrs.id === this.id);
       }
     }
   }
--- a/browser/extensions/screenshots/webextension/selector/uicontrol.js
+++ b/browser/extensions/screenshots/webextension/selector/uicontrol.js
@@ -657,17 +657,17 @@ this.uicontrol = (function() {
         if (el.nodeType != document.ELEMENT_NODE) {
           return false;
         }
         if (el.tagName == "IMG") {
           let rect = el.getBoundingClientRect();
           return rect.width >= this.minAutoImageWidth && rect.height >= this.minAutoImageHeight;
         }
         let display = window.getComputedStyle(el).display;
-        if (['block', 'inline-block', 'table'].indexOf(display) != -1) {
+        if (['block', 'inline-block', 'table'].includes(display)) {
           return true;
           // FIXME: not sure if this is useful:
           // let rect = el.getBoundingClientRect();
           // return rect.width <= this.maxAutoElementWidth && rect.height <= this.maxAutoElementHeight;
         }
         return false;
       };
       while (el) {
--- a/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm
+++ b/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm
@@ -52,17 +52,17 @@ this.NormandyDriver = function(sandboxMa
     },
 
     get userId() {
       return ClientEnvironment.getEnvironment().userId;
     },
 
     log(message, level = "debug") {
       const levels = ["debug", "info", "warn", "error"];
-      if (levels.indexOf(level) === -1) {
+      if (!levels.includes(level)) {
         throw new Error(`Invalid log level "${level}"`);
       }
       actionLog[level](message);
     },
 
     showHeartbeat(options) {
       log.info(`Showing heartbeat prompt "${options.message}"`);
       const aWindow = Services.wm.getMostRecentWindow("navigator:browser");
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -507,57 +507,57 @@ this.BrowserUITelemetry = {
     let defaultKept = [];
     let defaultMoved = [];
     let nondefaultAdded = [];
 
     for (let areaID of CustomizableUI.areas) {
       let items = CustomizableUI.getWidgetIdsInArea(areaID);
       for (let item of items) {
         // Is this a default item?
-        if (DEFAULT_ITEMS.indexOf(item) != -1) {
+        if (DEFAULT_ITEMS.includes(item)) {
           // Ok, it's a default item - but is it in its default
           // toolbar? We use Array.isArray instead of checking for
           // toolbarID in DEFAULT_AREA_PLACEMENTS because an add-on might
           // be clever and give itself the id of "toString" or something.
           if (Array.isArray(DEFAULT_AREA_PLACEMENTS[areaID]) &&
-              DEFAULT_AREA_PLACEMENTS[areaID].indexOf(item) != -1) {
+              DEFAULT_AREA_PLACEMENTS[areaID].includes(item)) {
             // The item is in its default toolbar
             defaultKept.push(item);
           } else {
             defaultMoved.push(item);
           }
-        } else if (PALETTE_ITEMS.indexOf(item) != -1) {
+        } else if (PALETTE_ITEMS.includes(item)) {
           // It's a palette item that's been moved into a toolbar
           nondefaultAdded.push(item);
         }
         // else, it's provided by an add-on, and we won't record it.
       }
     }
 
     // Now go through the items in the palette to see what default
     // items are in there.
     let paletteItems =
       CustomizableUI.getUnusedWidgets(aWindow.gNavToolbox.palette);
     let defaultRemoved = [];
     for (let item of paletteItems) {
-      if (DEFAULT_ITEMS.indexOf(item.id) != -1) {
+      if (DEFAULT_ITEMS.includes(item.id)) {
         defaultRemoved.push(item.id);
       }
     }
 
     result.defaultKept = defaultKept;
     result.defaultMoved = defaultMoved;
     result.nondefaultAdded = nondefaultAdded;
     result.defaultRemoved = defaultRemoved;
 
     // Next, determine how many add-on provided toolbars exist.
     let addonToolbars = 0;
     let toolbars = document.querySelectorAll("toolbar[customizable=true]");
     for (let toolbar of toolbars) {
-      if (DEFAULT_AREAS.indexOf(toolbar.id) == -1) {
+      if (!DEFAULT_AREAS.includes(toolbar.id)) {
         addonToolbars++;
       }
     }
     result.addonToolbars = addonToolbars;
 
     // Find out how many open tabs we have in each window
     let winEnumerator = Services.wm.getEnumerator("navigator:browser");
     let visibleTabs = [];
--- a/browser/modules/CastingApps.jsm
+++ b/browser/modules/CastingApps.jsm
@@ -150,15 +150,15 @@ var CastingApps = {
 
   onRemoteMediaStop(remoteMedia) {
   },
 
   onRemoteMediaStatus(remoteMedia) {
   },
 
   allowableExtension(uri, extensions) {
-    return (uri instanceof Ci.nsIURL) && extensions.indexOf(uri.fileExtension) != -1;
+    return (uri instanceof Ci.nsIURL) && extensions.includes(uri.fileExtension);
   },
 
   allowableMimeType(type, types) {
-    return types.indexOf(type) != -1;
+    return types.includes(type);
   }
 };
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -299,17 +299,17 @@ this.TabCrashHandler = {
     // We will only show the tab crash page if:
     // 1) We are aware that this browser crashed
     // 2) We know we've never shown the tab crash page for the
     //    crash yet
     // 3) The user is not configured to automatically submit backlogged
     //    crash reports. If they are, we'll send the crash report
     //    immediately.
     if (childID &&
-        this.unseenCrashedChildIDs.indexOf(childID) != -1) {
+        this.unseenCrashedChildIDs.includes(childID)) {
       if (UnsubmittedCrashHandler.autoSubmit) {
         let dumpID = this.childMap.get(childID);
         if (dumpID) {
           UnsubmittedCrashHandler.submitReports([dumpID]);
         }
       } else {
         this.sendToTabCrashedPage(browser);
         return true;
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -333,17 +333,17 @@ this.ContentSearch = {
       let uri = engine.getIconURLBySize(16, 16);
       let iconBuffer = uri;
       if (!uriFlag) {
         iconBuffer = await this._arrayBufferFromDataURI(uri);
       }
       state.engines.push({
         name: engine.name,
         iconBuffer,
-        hidden: hiddenList.indexOf(engine.name) !== -1,
+        hidden: hiddenList.includes(engine.name),
       });
     }
     return state;
   },
 
   _processEventQueue() {
     if (this._currentEventPromise || !this._eventQueue.length) {
       return;
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -331,17 +331,17 @@ this.WinTaskbarJumpList =
         }
 
         if (count >= this._maxItemCount) {
           return;
         }
 
         // Do not add items to recent that have already been added to frequent.
         if (this._frequentHashList &&
-            this._frequentHashList.indexOf(aResult.uri) != -1) {
+            this._frequentHashList.includes(aResult.uri)) {
           return;
         }
 
         let title = aResult.title || aResult.uri;
         let faviconPageUri = Services.io.newURI(aResult.uri);
         let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1,
                                                faviconPageUri);
         items.appendElement(shortcut);
--- a/build/pgo/js-input/crypto-otp.html
+++ b/build/pgo/js-input/crypto-otp.html
@@ -587,17 +587,17 @@ function gen() {
         /* Obtain seed from user specification.  If the seed is a
            decimal number, use it as-is.  If it contains any
            non-numeric characters, construct a hash code and
            use that as the seed. */
 
         useed = document.getElementById('onetime').seeder.value;
         seedNum = true;
         for (i = 0; i < useed.length; i++) {
-            if ("0123456789".indexOf(useed.charAt(i)) == -1) {
+            if (!"0123456789".includes(useed.charAt(i))) {
                 seedNum = false;
                 break;
             }
         }
         if (seedNum) {
             seed = Math.round(Math.floor(document.getElementById('onetime').seeder.value) % Math.pow(2, 31));
             document.getElementById('onetime').seeder.value = seed;
         } else {
--- a/caps/tests/mochitest/test_bug995943.xul
+++ b/caps/tests/mochitest/test_bug995943.xul
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   const Cc = Components.classes;
   const Ci = Components.interfaces;
   ChromeUtils.import("resource://gre/modules/Services.jsm");
   function debug(msg) { info(msg); }
 
   /** Test for CAPS file:// URI prefs. **/
   SimpleTest.waitForExplicitFinish();
   SimpleTest.requestCompleteLog();
-  if (navigator.userAgent.indexOf("Mac OS X 10.10") != -1)
+  if (navigator.userAgent.includes("Mac OS X 10.10"))
     SimpleTest.expectAssertions(5, 11); // See bug 1067022, 1307988
   else if (Services.appinfo.OS == "WINNT")
     SimpleTest.expectAssertions(0, 1); // See bug 1067022
   else
     SimpleTest.expectAssertions(0, 2); // See bug 1305241
 
   var rootdir = Services.appinfo.OS == "WINNT" ? "file:///C:" : "file:///";
 
--- a/devtools/client/animationinspector/components/animation-timeline.js
+++ b/devtools/client/animationinspector/components/animation-timeline.js
@@ -507,17 +507,17 @@ AnimationsTimeline.prototype = {
     // To indicate the animation progress in AnimationDetails.
     this.on("timeline-data-changed", this.onTimelineDataChanged);
 
     if (this.animations.length === 1) {
       // Display animation's detail if there is only one animation,
       // even if the detail pane is closing.
       yield this.onAnimationSelected(this.animations[0]);
     } else if (this.animationRootEl.classList.contains("animation-detail-visible") &&
-               this.animations.indexOf(this.selectedAnimation) >= 0) {
+               this.animations.includes(this.selectedAnimation)) {
       // animation's detail displays in case of the previously displayed animation is
       // included in timeline list and the detail pane is not closing.
       yield this.onAnimationSelected(this.selectedAnimation);
     } else {
       // Otherwise, close detail pane.
       this.onDetailCloseButtonClick();
     }
     this.emit("animation-timeline-rendering-completed");
@@ -759,17 +759,17 @@ AnimationsTimeline.prototype = {
         // Expected if we've already been destroyed in the meantime.
         if (!this.isDestroyed) {
           throw e;
         }
       }
 
       for (let frame of frames) {
         for (let name in frame) {
-          if (this.NON_PROPERTIES.indexOf(name) != -1) {
+          if (this.NON_PROPERTIES.includes(name)) {
             continue;
           }
 
           // We have to change to CSS property name
           // since GetKeyframes returns JS property name.
           const propertyCSSName = getCssPropertyName(name);
           if (!tracks[propertyCSSName]) {
             tracks[propertyCSSName] = [];
--- a/devtools/client/animationinspector/test/browser_animation_participate_in_inspector_update.js
+++ b/devtools/client/animationinspector/test/browser_animation_participate_in_inspector_update.js
@@ -34,13 +34,13 @@ add_task(function* () {
   info("Check that all events were received");
   // Only assert that the inspector-updated event is last, the order of the
   // first 2 events is irrelevant.
 
   is(receivedEvents.length, 3, "3 events were received");
   is(receivedEvents[2], "inspector-updated",
      "The third event received was the inspector-updated event");
 
-  ok(receivedEvents.indexOf(controller.PLAYERS_UPDATED_EVENT) !== -1,
+  ok(receivedEvents.includes(controller.PLAYERS_UPDATED_EVENT),
      "The players-updated event was received");
-  ok(receivedEvents.indexOf(panel.UI_UPDATED_EVENT) !== -1,
+  ok(receivedEvents.includes(panel.UI_UPDATED_EVENT),
      "The ui-updated event was received");
 });
--- a/devtools/client/animationinspector/test/browser_animation_running_on_compositor.js
+++ b/devtools/client/animationinspector/test/browser_animation_running_on_compositor.js
@@ -48,10 +48,10 @@ add_task(function* () {
                 ANIMATION_L10N.getStr("player.somePropertiesOnCompositorTooltip")),
      "The animation element has the right tooltip content");
 });
 
 function hasTooltip(animationEl, expected) {
   let el = animationEl.querySelector(".name");
   let tooltip = el.getAttribute("title");
 
-  return tooltip.indexOf(expected) !== -1;
+  return tooltip.includes(expected);
 }
--- a/devtools/client/commandline/test/browser_cmd_inject.js
+++ b/devtools/client/commandline/test/browser_cmd_inject.js
@@ -51,17 +51,17 @@ function test() {
           markup: "VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",
           hints:                                                                                           "",
           status: "VALID",
           args: {
             library: {
               value: function (library) {
                 is(library.type, "url", "inject type name");
                 is(library.url.origin, "http://example.com", "inject url hostname");
-                ok(library.url.pathname.indexOf("_inject.js") != -1, "inject url path");
+                ok(library.url.pathname.includes("_inject.js"), "inject url path");
               },
               status: "VALID"
             }
           }
         },
         exec: {
           output: [ /http:\/\/example.com\/browser\/devtools\/client\/commandline\/test\/browser_cmd_inject.js loaded/ ]
         }
@@ -73,17 +73,17 @@ function test() {
           markup: "VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",
           hints:                                                                                            "",
           status: "VALID",
           args: {
             library: {
               value: function (library) {
                 is(library.type, "url", "inject type name");
                 is(library.url.origin, "https://example.com", "inject url hostname");
-                ok(library.url.pathname.indexOf("_inject.js") != -1, "inject url path");
+                ok(library.url.pathname.includes("_inject.js"), "inject url path");
               },
               status: "VALID"
             }
           }
         },
         exec: {
           output: [ /https:\/\/example.com\/browser\/devtools\/client\/commandline\/test\/browser_cmd_inject.js loaded/ ]
         }
--- a/devtools/client/commandline/test/helpers.js
+++ b/devtools/client/commandline/test/helpers.js
@@ -749,17 +749,17 @@ var { helpers, assert } = (function () {
     checkOptions(options);
     var inputPromise;
     var automator = options.automator;
   // We try to measure average keypress time, but setInput can simulate
   // several, so we try to keep track of how many
     var chunkLen = 1;
 
   // The easy case is a simple string without things like <TAB>
-    if (typed.indexOf("<") === -1) {
+    if (!typed.includes("<")) {
       inputPromise = automator.setInput(typed);
     }
     else {
     // Cut the input up into input strings separated by '<KEY>' tokens. The
     // CHUNKS RegExp leaves blanks so we filter them out.
       var chunks = typed.split(CHUNKER).filter(function (s) {
         return s !== "";
       });
@@ -1066,17 +1066,17 @@ var { helpers, assert } = (function () {
             expected.output.forEach(function (match) {
               doTest(match, textOutput);
             });
           } else {
             doTest(expected.output, textOutput);
           }
 
           if (typeof expected.notinoutput === "string") {
-            assert.ok(textOutput.indexOf(expected.notinoutput) === -1,
+            assert.ok(!textOutput.includes(expected.notinoutput),
               `html output for "${name}" doesn't contain "${expected.notinoutput}"`);
           } else if (Array.isArray(expected.notinoutput)) {
             expected.notinoutput.forEach(function (match) {
               doTestNot(match, textOutput);
             });
           } else if (typeof expected.notinoutput !== "undefined") {
             doTestNot(expected.notinoutput, textOutput);
           }
--- a/devtools/client/debugger/content/actions/sources.js
+++ b/devtools/client/debugger/content/actions/sources.js
@@ -19,17 +19,17 @@ function getSourceClient(source) {
 }
 
 /**
  * Handler for the debugger client's unsolicited newSource notification.
  */
 function newSource(source) {
   return dispatch => {
     // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
-    if (NEW_SOURCE_IGNORED_URLS.indexOf(source.url) != -1) {
+    if (NEW_SOURCE_IGNORED_URLS.includes(source.url)) {
       return;
     }
 
     // Signal that a new source has been added.
     window.emit(EVENTS.NEW_SOURCE);
 
     return dispatch({
       type: constants.ADD_SOURCE,
@@ -76,17 +76,17 @@ function loadSources() {
           "Error getting sources, probably because a top-level " +
           "breakpoint was hit while executing them"
         );
         return;
       }
 
       // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
       return response.sources.filter(source => {
-        return NEW_SOURCE_IGNORED_URLS.indexOf(source.url) === -1;
+        return !NEW_SOURCE_IGNORED_URLS.includes(source.url);
       });
     })
   };
 }
 
 /**
  * Set the black boxed status of the given source.
  *
--- a/devtools/client/debugger/content/views/event-listeners-view.js
+++ b/devtools/client/debugger/content/views/event-listeners-view.js
@@ -90,26 +90,26 @@ EventListenersView.prototype = extend(Wi
     // If an event item for this listener's url and type was already added,
     // avoid polluting the view and simply increase the "targets" count.
     let eventItem = this.getItemForPredicate(aItem =>
       aItem.attachment.url == url &&
       aItem.attachment.type == type);
 
     if (eventItem) {
       let { selectors, view: { targets } } = eventItem.attachment;
-      if (selectors.indexOf(selector) == -1) {
+      if (!selectors.includes(selector)) {
         selectors.push(selector);
         targets.setAttribute("value", L10N.getFormatStr("eventNodes", selectors.length));
       }
       return;
     }
 
     // There's no easy way of grouping event types into higher-level groups,
     // so we need to do this by hand.
-    let is = (...args) => args.indexOf(type) != -1;
+    let is = (...args) => args.includes(type);
     let has = str => type.includes(str);
     let starts = str => type.startsWith(str);
     let group;
 
     if (starts("animation")) {
       group = L10N.getStr("animationEvents");
     } else if (starts("audio")) {
       group = L10N.getStr("audioEvents");
@@ -163,17 +163,17 @@ EventListenersView.prototype = extend(Wi
     }
 
     // Create the element node for the event listener item.
     const itemView = this._createItemView(type, selector, url);
 
     // Event breakpoints survive target navigations. Make sure the newly
     // inserted event item is correctly checked.
     const activeEventNames = this.getState().activeEventNames;
-    const checkboxState = activeEventNames.indexOf(type) != -1;
+    const checkboxState = activeEventNames.includes(type);
 
     // Append an event listener item to this container.
     this.push([itemView.container], {
       staged: aOptions.staged, /* stage the item to be appended later? */
       attachment: {
         url: url,
         type: type,
         view: itemView,
--- a/devtools/client/debugger/debugger-controller.js
+++ b/devtools/client/debugger/debugger-controller.js
@@ -206,17 +206,17 @@ var DebuggerController = {
     // We only want to process async event that are appropriate for
     // this page. The devtools are open across page reloads, so async
     // requests from the last page might bleed through if reloading
     // fast enough. We check to make sure the async action is part of
     // a current request, and ignore it if not.
     let store = createStore((state, action) => {
       if (action.seqId &&
          (action.status === "done" || action.status === "error") &&
-         state && state.asyncRequests.indexOf(action.seqId) === -1) {
+         state && !state.asyncRequests.includes(action.seqId)) {
         return state;
       }
       return reducer(state, action);
     });
     store = enhanceStoreWithBroadcaster(store, broadcaster);
 
     // This controller right now acts as the store that's globally
     // available, so just copy the Redux API onto it.
--- a/devtools/client/debugger/new/parser-worker.js
+++ b/devtools/client/debugger/new/parser-worker.js
@@ -4709,17 +4709,17 @@ Object.defineProperty(exports, '__esModu
 // This function uses `eval` (non-lexical) to produce such a
 // predicate from a space-separated string of words.
 //
 // It starts by sorting the words by length.
 
 function makePredicate(words) {
   words = words.split(" ");
   return function (str) {
-    return words.indexOf(str) >= 0;
+    return words.includes(str);
   };
 }
 
 // Reserved word lists for various dialects of the language
 
 var reservedWords = {
   6: makePredicate("enum await"),
   strict: makePredicate("implements interface let package private protected public static yield"),
@@ -6310,33 +6310,33 @@ var Parser = function (_Tokenizer) {
     pluginNames.forEach(function (name) {
       var plugin = plugins[name];
       if (plugin) plugin(_this2);
     });
   };
 
   Parser.prototype.loadPlugins = function loadPlugins(pluginList) {
     // TODO: Deprecate "*" option in next major version of Babylon
-    if (pluginList.indexOf("*") >= 0) {
+    if (pluginList.includes("*")) {
       this.loadAllPlugins();
 
       return { "*": true };
     }
 
     var pluginMap = {};
 
-    if (pluginList.indexOf("flow") >= 0) {
+    if (pluginList.includes("flow")) {
       // ensure flow plugin loads last
       pluginList = pluginList.filter(function (plugin) {
         return plugin !== "flow";
       });
       pluginList.push("flow");
     }
 
-    if (pluginList.indexOf("estree") >= 0) {
+    if (pluginList.includes("estree")) {
       // ensure estree plugin loads first
       pluginList = pluginList.filter(function (plugin) {
         return plugin !== "estree";
       });
       pluginList.unshift("estree");
     }
 
     for (var _iterator = pluginList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
@@ -9094,17 +9094,17 @@ var Node = function () {
     this.loc = new SourceLocation(loc);
     if (filename) this.loc.filename = filename;
   }
 
   Node.prototype.__clone = function __clone() {
     var node2 = new Node();
     for (var key in this) {
       // Do not clone comments that are already attached to the node
-      if (commentKeys.indexOf(key) < 0) {
+      if (!commentKeys.includes(key)) {
         node2[key] = this[key];
       }
     }
 
     return node2;
   };
 
   return Node;
@@ -13312,17 +13312,17 @@ for (var _iterator = t.TYPES, _isArray =
 
   var _ret2 = _loop2();
 
   if (_ret2 === "break") break;
 }
 
 var _loop = function _loop(type) {
   if (type[0] === "_") return "continue";
-  if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
+  if (!t.TYPES.includes(type)) t.TYPES.push(type);
 
   var virtualType = virtualTypes[type];
 
   NodePath.prototype["is" + type] = function (opts) {
     return virtualType.checkPath(this, opts);
   };
 };
 
@@ -15097,17 +15097,17 @@ function _interopRequireDefault(obj) { r
 
 function isBinding(node, parent) {
   var keys = _retrievers.getBindingIdentifiers.keys[parent.type];
   if (keys) {
     for (var i = 0; i < keys.length; i++) {
       var key = keys[i];
       var val = parent[key];
       if (Array.isArray(val)) {
-        if (val.indexOf(node) >= 0) return true;
+        if (val.includes(node)) return true;
       } else {
         if (val === node) return true;
       }
     }
   }
 
   return false;
 }
@@ -15656,17 +15656,17 @@ module.exports = __webpack_require__(452
         0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
         0x202F, 0x205F,
         0x3000,
         0xFEFF
     ];
 
     function isWhiteSpace(ch) {
         return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
-            ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
+            ch >= 0x1680 && NON_ASCII_WHITESPACES.includes(ch);
     }
 
     // 7.3 Line Terminators
 
     function isLineTerminator(ch) {
         return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
     }
 
@@ -16370,31 +16370,31 @@ function removeTypeDuplicates(nodes) {
   var typeGroups = [];
 
   var types = [];
 
   for (var i = 0; i < nodes.length; i++) {
     var node = nodes[i];
     if (!node) continue;
 
-    if (types.indexOf(node) >= 0) {
+    if (types.includes(node)) {
       continue;
     }
 
     if (t.isAnyTypeAnnotation(node)) {
       return [node];
     }
 
     if (t.isFlowBaseAnnotation(node)) {
       bases[node.type] = node;
       continue;
     }
 
     if (t.isUnionTypeAnnotation(node)) {
-      if (typeGroups.indexOf(node.types) < 0) {
+      if (!typeGroups.includes(node.types)) {
         nodes = nodes.concat(node.types);
         typeGroups.push(node.types);
       }
       continue;
     }
 
     if (t.isGenericTypeAnnotation(node)) {
       var name = node.id.name;
@@ -17528,17 +17528,17 @@ function assertEach(callback) {
 }
 
 function assertOneOf() {
   for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
     vals[_key] = arguments[_key];
   }
 
   function validate(node, key, val) {
-    if (vals.indexOf(val) < 0) {
+    if (!vals.includes(val)) {
       throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val));
     }
   }
 
   validate.oneOf = vals;
 
   return validate;
 }
@@ -17689,17 +17689,17 @@ function defineType(type) {
     var _key5 = _ref4;
 
     opts.fields[_key5] = opts.fields[_key5] || {};
   }
 
   for (var key in opts.fields) {
     var field = opts.fields[key];
 
-    if (opts.builder.indexOf(key) === -1) {
+    if (!opts.builder.includes(key)) {
       field.optional = true;
     }
     if (field.default === undefined) {
       field.default = null;
     } else if (!field.validate) {
       field.validate = assertValueType(getType(field.default));
     }
   }
@@ -22082,24 +22082,24 @@ var Binding = function () {
   Binding.prototype.clearValue = function clearValue() {
     this.hasDeoptedValue = false;
     this.hasValue = false;
     this.value = null;
   };
 
   Binding.prototype.reassign = function reassign(path) {
     this.constant = false;
-    if (this.constantViolations.indexOf(path) !== -1) {
+    if (this.constantViolations.includes(path)) {
       return;
     }
     this.constantViolations.push(path);
   };
 
   Binding.prototype.reference = function reference(path) {
-    if (this.referencePaths.indexOf(path) !== -1) {
+    if (this.referencePaths.includes(path)) {
       return;
     }
     this.referenced = true;
     this.references++;
     this.referencePaths.push(path);
   };
 
   Binding.prototype.dereference = function dereference() {
@@ -22563,17 +22563,17 @@ function formatValue(ctx, value, recurse
 
   if (ctx.showHidden) {
     keys = Object.getOwnPropertyNames(value);
   }
 
   // IE doesn't make error fields non-enumerable
   // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
   if (isError(value)
-      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+      && (keys.includes('message') || keys.includes('description'))) {
     return formatError(value);
   }
 
   // Some type of object without properties can be shortcutted.
   if (keys.length === 0) {
     if (isFunction(value)) {
       var name = value.name ? ': ' + value.name : '';
       return ctx.stylize('[Function' + name + ']', 'special');
@@ -22704,17 +22704,17 @@ function formatProperty(ctx, value, recu
     if (desc.set) {
       str = ctx.stylize('[Setter]', 'special');
     }
   }
   if (!hasOwnProperty(visibleKeys, key)) {
     name = '[' + key + ']';
   }
   if (!str) {
-    if (ctx.seen.indexOf(desc.value) < 0) {
+    if (!ctx.seen.includes(desc.value)) {
       if (isNull(recurseTimes)) {
         str = formatValue(ctx, desc.value, null);
       } else {
         str = formatValue(ctx, desc.value, recurseTimes - 1);
       }
       if (str.indexOf('\n') > -1) {
         if (array) {
           str = str.split('\n').map(function(line) {
@@ -22749,17 +22749,17 @@ function formatProperty(ctx, value, recu
   return name + ': ' + str;
 }
 
 
 function reduceToSingleString(output, base, braces) {
   var numLinesEst = 0;
   var length = output.reduce(function(prev, cur) {
     numLinesEst++;
-    if (cur.indexOf('\n') >= 0) numLinesEst++;
+    if (cur.includes('\n')) numLinesEst++;
     return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
   }, 0);
 
   if (length > 60) {
     return braces[0] +
            (base === '' ? '' : base + '\n ') +
            ' ' +
            output.join(',\n  ') +
@@ -23674,31 +23674,31 @@ function TemplateLiteral() {
   return t.stringTypeAnnotation();
 }
 
 function UnaryExpression(node) {
   var operator = node.operator;
 
   if (operator === "void") {
     return t.voidTypeAnnotation();
-  } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
+  } else if (t.NUMBER_UNARY_OPERATORS.includes(operator)) {
     return t.numberTypeAnnotation();
-  } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
+  } else if (t.STRING_UNARY_OPERATORS.includes(operator)) {
     return t.stringTypeAnnotation();
-  } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
+  } else if (t.BOOLEAN_UNARY_OPERATORS.includes(operator)) {
     return t.booleanTypeAnnotation();
   }
 }
 
 function BinaryExpression(node) {
   var operator = node.operator;
 
-  if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+  if (t.NUMBER_BINARY_OPERATORS.includes(operator)) {
     return t.numberTypeAnnotation();
-  } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
+  } else if (t.BOOLEAN_BINARY_OPERATORS.includes(operator)) {
     return t.booleanTypeAnnotation();
   } else if (operator === "+") {
     var right = this.get("right");
     var left = this.get("left");
 
     if (left.isBaseType("number") && right.isBaseType("number")) {
       return t.numberTypeAnnotation();
     } else if (left.isBaseType("string") || right.isBaseType("string")) {
@@ -23850,17 +23850,17 @@ function getTypeAnnotationBindingConstan
   var functionConstantViolations = [];
   var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
 
   var testType = getConditionalAnnotation(path, name);
   if (testType) {
     var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
 
     constantViolations = constantViolations.filter(function (path) {
-      return testConstantViolations.indexOf(path) < 0;
+      return !testConstantViolations.includes(path);
     });
 
     types.push(testType.typeAnnotation);
   }
 
   if (constantViolations.length) {
     constantViolations = constantViolations.concat(functionConstantViolations);
 
@@ -23908,17 +23908,17 @@ function inferAnnotationFromBinaryExpres
   if (left.isIdentifier({ name: name })) {
     target = right;
   } else if (right.isIdentifier({ name: name })) {
     target = left;
   }
   if (target) {
     if (operator === "===") {
       return target.getTypeAnnotation();
-    } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+    } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.includes(operator)) {
       return t.numberTypeAnnotation();
     } else {
       return;
     }
   } else {
     if (operator !== "===") return;
   }
 
@@ -24863,25 +24863,25 @@ function evaluate() {
       }
     }
 
     if (path.isCallExpression()) {
       var callee = path.get("callee");
       var context = void 0;
       var func = void 0;
 
-      if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
+      if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.includes(callee.node.name)) {
         func = global[node.callee.name];
       }
 
       if (callee.isMemberExpression()) {
         var _object = callee.get("object");
         var _property = callee.get("property");
 
-        if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) {
+        if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.includes(_object.node.name) && !INVALID_METHODS.includes(_property.node.name)) {
           context = global[_object.node.name];
           func = context[_property.node.name];
         }
 
         if (_object.isLiteral() && _property.isIdentifier()) {
           var _type = (0, _typeof3.default)(_object.node.value);
           if (_type === "string" || _type === "number") {
             context = _object.node.value;
@@ -25172,17 +25172,17 @@ function _guessExecutionStatusRelativeTo
     if (status) {
       return status;
     } else {
       target = targetFuncParent.path;
     }
   }
 
   var targetPaths = target.getAncestry();
-  if (targetPaths.indexOf(this) >= 0) return "after";
+  if (targetPaths.includes(this)) return "after";
 
   var selfPaths = this.getAncestry();
 
   var commonPath = void 0;
   var targetIndex = void 0;
   var selfIndex = void 0;
   for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) {
     var selfPath = selfPaths[selfIndex];
@@ -25273,17 +25273,17 @@ function _guessExecutionStatusRelativeTo
   return allStatus;
 }
 
 function resolve(dangerous, resolved) {
   return this._resolve(dangerous, resolved) || this;
 }
 
 function _resolve(dangerous, resolved) {
-  if (resolved && resolved.indexOf(this) >= 0) return;
+  if (resolved && resolved.includes(this)) return;
 
   resolved = resolved || [];
   resolved.push(this);
 
   if (this.isVariableDeclarator()) {
     if (this.get("id").isIdentifier()) {
       return this.get("init").resolve(dangerous, resolved);
     } else {}
@@ -26101,17 +26101,17 @@ var PathHoister = function () {
     var scope = this.path.scope;
     do {
       if (this.isCompatibleScope(scope)) {
         this.scopes.push(scope);
       } else {
         break;
       }
 
-      if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
+      if (this.breakOnScopePaths.includes(scope.path)) {
         break;
       }
     } while (scope = scope.parent);
   };
 
   PathHoister.prototype.getAttachmentPath = function getAttachmentPath() {
     var path = this._getAttachmentPath();
     if (!path) return;
@@ -26735,17 +26735,17 @@ var TraversalContext = function () {
       }
 
       if (path.key === null) continue;
 
       if (testing && queue.length >= 10000) {
         this.trap = true;
       }
 
-      if (visited.indexOf(path.node) >= 0) continue;
+      if (visited.includes(path.node)) continue;
       visited.push(path.node);
 
       if (path.visit()) {
         stop = true;
         break;
       }
 
       if (this.priorityQueue.length) {
@@ -26989,17 +26989,17 @@ function verify(visitor) {
 
   for (var nodeType in visitor) {
     if (nodeType === "enter" || nodeType === "exit") {
       validateVisitorMethods(nodeType, visitor[nodeType]);
     }
 
     if (shouldIgnoreKey(nodeType)) continue;
 
-    if (t.TYPES.indexOf(nodeType) < 0) {
+    if (!t.TYPES.includes(nodeType)) {
       throw new Error(messages.get("traverseVerifyNodeType", nodeType));
     }
 
     var visitors = visitor[nodeType];
     if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") {
       for (var visitorKey in visitors) {
         if (visitorKey === "enter" || visitorKey === "exit") {
           validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
@@ -30028,17 +30028,17 @@ IndexedSourceMapConsumer.prototype.sourc
  */
 IndexedSourceMapConsumer.prototype.generatedPositionFor =
   function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
     for (var i = 0; i < this._sections.length; i++) {
       var section = this._sections[i];
 
       // Only consider this section if the requested source is in the list of
       // sources of the consumer.
-      if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+      if (!section.consumer.sources.includes(util.getArg(aArgs, 'source'))) {
         continue;
       }
       var generatedPosition = section.consumer.generatedPositionFor(aArgs);
       if (generatedPosition) {
         var ret = {
           line: generatedPosition.line +
             (section.generatedOffset.generatedLine - 1),
           column: generatedPosition.column +
@@ -35033,17 +35033,17 @@ function applyStyle() {
 
 	var nestedStyles = this._styles;
 	var i = nestedStyles.length;
 
 	// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
 	// see https://github.com/chalk/chalk/issues/58
 	// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
 	var originalDim = ansiStyles.dim.open;
-	if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
+	if (isSimpleWindowsTerm && (nestedStyles.includes('gray') || nestedStyles.includes('grey'))) {
 		ansiStyles.dim.open = '';
 	}
 
 	while (i--) {
 		var code = ansiStyles[nestedStyles[i]];
 
 		// Replace any instances already present with a re-opening code
 		// otherwise only the part of the string until said closing code
@@ -37831,17 +37831,17 @@ function normalizeOptions(code, opts, to
   if (format.minified) {
     format.compact = true;
 
     format.shouldPrintComment = format.shouldPrintComment || function () {
       return format.comments;
     };
   } else {
     format.shouldPrintComment = format.shouldPrintComment || function (value) {
-      return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
+      return format.comments || value.includes("@license") || value.includes("@preserve");
     };
   }
 
   if (format.compact === "auto") {
     format.compact = code.length > 500000;
 
     if (format.compact) {
       console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
--- a/devtools/client/debugger/new/pretty-print-worker.js
+++ b/devtools/client/debugger/new/pretty-print-worker.js
@@ -2891,17 +2891,17 @@ pp$3.checkUnreserved = function(ref) {
 
   if (this.inGenerator && name === "yield")
     { this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator"); }
   if (this.inAsync && name === "await")
     { this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function"); }
   if (this.isKeyword(name))
     { this.raise(start, ("Unexpected keyword '" + name + "'")); }
   if (this.options.ecmaVersion < 6 &&
-    this.input.slice(start, end).indexOf("\\") != -1) { return }
+    this.input.slice(start, end).includes("\\")) { return }
   var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
   if (re.test(name))
     { this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); }
 };
 
 // Parse the next token as an identifier. If `liberal` is true (used
 // when parsing properties), it will also convert keywords into
 // identifiers.
@@ -3656,17 +3656,17 @@ pp$8.readRegexp = function() {
   // Need to use `readWord1` because '\uXXXX' sequences are allowed
   // here (don't ask).
   var mods = this.readWord1();
   var tmp = content, tmpFlags = "";
   if (mods) {
     var validFlags = /^[gim]*$/;
     if (this.options.ecmaVersion >= 6) { validFlags = /^[gimuy]*$/; }
     if (!validFlags.test(mods)) { this.raise(start, "Invalid regular expression flag"); }
-    if (mods.indexOf("u") >= 0) {
+    if (mods.includes("u")) {
       if (regexpUnicodeSupport) {
         tmpFlags = "u";
       } else {
         // Replace each astral symbol and every Unicode escape sequence that
         // possibly represents an astral symbol or a paired surrogate with a
         // single ASCII symbol to avoid throwing on regular expressions that
         // are only valid in combination with the `/u` flag.
         // Note: replacing with the ASCII symbol `x` might cause false
@@ -7280,17 +7280,17 @@ IndexedSourceMapConsumer.prototype.sourc
  */
 IndexedSourceMapConsumer.prototype.generatedPositionFor =
   function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
     for (var i = 0; i < this._sections.length; i++) {
       var section = this._sections[i];
 
       // Only consider this section if the requested source is in the list of
       // sources of the consumer.
-      if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+      if (!section.consumer.sources.includes(util.getArg(aArgs, 'source'))) {
         continue;
       }
       var generatedPosition = section.consumer.generatedPositionFor(aArgs);
       if (generatedPosition) {
         var ret = {
           line: generatedPosition.line +
             (section.generatedOffset.generatedLine - 1),
           column: generatedPosition.column +
--- a/devtools/client/debugger/new/test/mochitest/examples/wasm-sourcemaps/average.js
+++ b/devtools/client/debugger/new/test/mochitest/examples/wasm-sourcemaps/average.js
@@ -1734,17 +1734,17 @@ function integrateWasmJS(Module) {
     asm2wasm: asm2wasmImports,
     parent: Module // Module inside wasm-js.cpp refers to wasm-js.cpp; this allows access to the outside program.
   };
 
   var exports = null;
 
   function lookupImport(mod, base) {
     var lookup = info;
-    if (mod.indexOf(".") < 0) {
+    if (!mod.includes(".")) {
       lookup = (lookup || {})[mod];
     } else {
       var parts = mod.split(".");
       lookup = (lookup || {})[parts[0]];
       lookup = (lookup || {})[parts[1]];
     }
     if (base) {
       lookup = (lookup || {})[base];
@@ -2093,18 +2093,18 @@ integrateWasmJS(Module);
 var ASM_CONSTS = [];
 
 STATIC_BASE = Runtime.GLOBAL_BASE;
 
 STATICTOP = STATIC_BASE + 3008;
 /* global initializers */ __ATINIT__.push();
 
 memoryInitializer =
-  Module["wasmJSMethod"].indexOf("asmjs") >= 0 ||
-  Module["wasmJSMethod"].indexOf("interpret-asm2wasm") >= 0
+  Module["wasmJSMethod"].includes("asmjs") ||
+  Module["wasmJSMethod"].includes("interpret-asm2wasm")
     ? "average.js.mem"
     : null;
 
 var STATIC_BUMP = 3008;
 Module["STATIC_BASE"] = STATIC_BASE;
 Module["STATIC_BUMP"] = STATIC_BUMP;
 
 /* no memory initializer */
--- a/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_event-listeners-01.js
@@ -124,19 +124,19 @@ function testEventListeners(aThreadClien
         } else {
           is(l.capturing, false,
             "Capturing property has the right value.");
           is(l.isEventHandler, true,
             "'isEventHandler' property has the right value.");
         }
       }
 
-      ok(types.indexOf("click") != -1, "Found the click handler.");
-      ok(types.indexOf("change") != -1, "Found the change handler.");
-      ok(types.indexOf("keyup") != -1, "Found the keyup handler.");
+      ok(types.includes("click"), "Found the click handler.");
+      ok(types.includes("change"), "Found the change handler.");
+      ok(types.includes("keyup"), "Found the keyup handler.");
 
       aThreadClient.resume(deferred.resolve);
     });
   });
 
   return deferred.promise;
 }
 
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-symbols.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_search-symbols.js
@@ -52,17 +52,17 @@ function htmlSearch() {
   once(gDebugger, "popupshown").then(() => {
     writeInfo();
 
     is(gFilteredFunctions.selectedIndex, 0,
       "An item should be selected in the filtered functions view (1).");
     ok(gFilteredFunctions.selectedItem,
       "An item should be selected in the filtered functions view (2).");
 
-    if (gSources.selectedItem.attachment.source.url.indexOf(".html") != -1) {
+    if (gSources.selectedItem.attachment.source.url.includes(".html")) {
       let expectedResults = [
         ["inline", ".html", "", 19, 16],
         ["arrow", ".html", "", 20, 11],
         ["foo", ".html", "", 22, 11],
         ["foo2", ".html", "", 23, 11],
         ["bar2", ".html", "", 23, 18]
       ];
 
@@ -117,17 +117,17 @@ function firstJsSearch() {
   once(gDebugger, "popupshown").then(() => {
     writeInfo();
 
     is(gFilteredFunctions.selectedIndex, 0,
       "An item should be selected in the filtered functions view (1).");
     ok(gFilteredFunctions.selectedItem,
       "An item should be selected in the filtered functions view (2).");
 
-    if (gSources.selectedItem.attachment.source.url.indexOf("-01.js") != -1) {
+    if (gSources.selectedItem.attachment.source.url.includes("-01.js")) {
       let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
       let expectedResults = [
         ["test", "-01.js", "", 4, 10],
         ["anonymousExpression", "-01.js", "test.prototype", 9, 3],
         ["namedExpression" + s + "NAME", "-01.js", "test.prototype", 11, 3],
         ["a_test", "-01.js", "foo", 22, 3],
         ["n_test" + s + "x", "-01.js", "foo", 24, 3],
         ["a_test", "-01.js", "foo.sub", 27, 5],
@@ -188,17 +188,17 @@ function secondJsSearch() {
   once(gDebugger, "popupshown").then(() => {
     writeInfo();
 
     is(gFilteredFunctions.selectedIndex, 0,
       "An item should be selected in the filtered functions view (1).");
     ok(gFilteredFunctions.selectedItem,
       "An item should be selected in the filtered functions view (2).");
 
-    if (gSources.selectedItem.attachment.source.url.indexOf("-02.js") != -1) {
+    if (gSources.selectedItem.attachment.source.url.includes("-02.js")) {
       let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
       let expectedResults = [
         ["test2", "-02.js", "", 4, 5],
         ["test3" + s + "test3_NAME", "-02.js", "", 8, 5],
         ["test4_SAME_NAME", "-02.js", "", 11, 5],
         ["x" + s + "X", "-02.js", "test.prototype", 14, 1],
         ["y" + s + "Y", "-02.js", "test.prototype.sub", 16, 1],
         ["z" + s + "Z", "-02.js", "test.prototype.sub.sub", 18, 1],
@@ -259,17 +259,17 @@ function thirdJsSearch() {
   once(gDebugger, "popupshown").then(() => {
     writeInfo();
 
     is(gFilteredFunctions.selectedIndex, 0,
       "An item should be selected in the filtered functions view (1).");
     ok(gFilteredFunctions.selectedItem,
       "An item should be selected in the filtered functions view (2).");
 
-    if (gSources.selectedItem.attachment.source.url.indexOf("-03.js") != -1) {
+    if (gSources.selectedItem.attachment.source.url.includes("-03.js")) {
       let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
       let expectedResults = [
         ["namedEventListener", "-03.js", "", 4, 43],
         ["a" + s + "A", "-03.js", "bar", 10, 5],
         ["b" + s + "B", "-03.js", "bar.alpha", 15, 5],
         ["c" + s + "C", "-03.js", "bar.alpha.beta", 20, 5],
         ["d" + s + "D", "-03.js", "this.theta", 25, 5],
         ["fun", "-03.js", "", 29, 7],
@@ -330,17 +330,17 @@ function filterSearch() {
   once(gDebugger, "popupshown").then(() => {
     writeInfo();
 
     is(gFilteredFunctions.selectedIndex, 0,
       "An item should be selected in the filtered functions view (1).");
     ok(gFilteredFunctions.selectedItem,
       "An item should be selected in the filtered functions view (2).");
 
-    if (gSources.selectedItem.attachment.source.url.indexOf("-03.js") != -1) {
+    if (gSources.selectedItem.attachment.source.url.includes("-03.js")) {
       let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
       let expectedResults = [
         ["namedEventListener", "-03.js", "", 4, 43],
         ["bar", "-03.js", "", 29, 19],
         ["w_bar" + s + "baz", "-03.js", "window", 29, 38],
         ["anonymousExpression", "-01.js", "test.prototype", 9, 3],
         ["namedExpression" + s + "NAME", "-01.js", "test.prototype", 11, 3],
         ["arrow", ".html", "", 20, 11],
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-01.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-01.js
@@ -28,17 +28,17 @@ function test() {
       is(gSources.values.length, 1, "Should have 1 source");
 
       let newSource = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.NEW_SOURCE);
       callInTab(gTab, "evalSource");
       yield newSource;
 
       is(gSources.values.length, 2, "Should have 2 sources");
 
-      let item = gSources.getItemForAttachment(e => e.label.indexOf("> eval") !== -1);
+      let item = gSources.getItemForAttachment(e => e.label.includes("> eval"));
       ok(item, "Source label is incorrect.");
       is(item.attachment.group, gDebugger.L10N.getStr("evalGroupLabel"),
          "Source group is incorrect");
 
       yield closeDebuggerAndFinish(gPanel);
     });
   });
 }
--- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js
@@ -22,17 +22,17 @@ var test = Task.async(function* () {
 
   const variables = panel.panelWin.DebuggerView.Variables;
   ok(variables, "Should get the variables view.");
 
   const scope = [...variables][0];
   ok(scope, "Should get the current function's scope.");
 
   const promiseVariables = [...scope].filter(([name]) =>
-    ["p", "f", "r"].indexOf(name) !== -1);
+    ["p", "f", "r"].includes(name));
 
   is(promiseVariables.length, 3,
      "Should have our 3 promise variables: p, f, r");
 
   for (let [name, item] of promiseVariables) {
     info("Expanding variable '" + name + "'");
     let expanded = once(variables, "fetched");
     item.expand();
--- a/devtools/client/debugger/views/filter-view.js
+++ b/devtools/client/debugger/views/filter-view.js
@@ -442,17 +442,17 @@ FilterView.prototype = {
     }
     if (this.DebuggerView.editor.somethingSelected()) {
       this._searchbox.value = aOperator + this.DebuggerView.editor.getSelection();
       return;
     }
 
     let content = this.DebuggerView.editor.getText();
     if (content.length < this.DebuggerView.LARGE_FILE_SIZE &&
-        SEARCH_AUTOFILL.indexOf(aOperator) != -1) {
+        SEARCH_AUTOFILL.includes(aOperator)) {
       let cursor = this.DebuggerView.editor.getCursor();
       let location = this.DebuggerView.Sources.selectedItem.attachment.source.url;
       let source = this.Parser.get(content, location);
       let identifier = source.getIdentifierAt({ line: cursor.line + 1, column: cursor.ch });
 
       if (identifier && identifier.name) {
         this._searchbox.value = aOperator + identifier.name;
         this._searchbox.select();
--- a/devtools/client/debugger/views/watch-expressions-view.js
+++ b/devtools/client/debugger/views/watch-expressions-view.js
@@ -113,17 +113,17 @@ WatchExpressionsView.prototype = extend(
    * @param string aExpression
    *        The new watch expression text.
    */
   switchExpression: function (aVar, aExpression) {
     let expressionItem =
       [...this].filter(i => i.attachment.currentExpression == aVar.name)[0];
 
     // Remove the watch expression if it's going to be empty or a duplicate.
-    if (!aExpression || this.getAllStrings().indexOf(aExpression) != -1) {
+    if (!aExpression || this.getAllStrings().includes(aExpression)) {
       this.deleteExpression(aVar);
       return;
     }
 
     // Save the watch expression code string.
     expressionItem.attachment.currentExpression = aExpression;
     expressionItem.attachment.view.inputNode.value = aExpression;
 
@@ -210,17 +210,17 @@ WatchExpressionsView.prototype = extend(
     };
   },
 
   /**
    * Called when the add watch expression key sequence was pressed.
    */
   _onCmdAddExpression: function (aText) {
     // Only add a new expression if there's no pending input.
-    if (this.getAllStrings().indexOf("") == -1) {
+    if (!this.getAllStrings().includes("")) {
       this.addExpression(aText || this.DebuggerView.editor.getSelection());
     }
   },
 
   /**
    * Called when the remove all watch expressions key sequence was pressed.
    */
   _onCmdRemoveAllExpressions: function () {
@@ -269,17 +269,17 @@ WatchExpressionsView.prototype = extend(
     let oldExpression = expressionItem.attachment.currentExpression;
     let newExpression = textbox.value.trim();
 
     // Remove the watch expression if it's empty.
     if (!newExpression) {
       this.remove(expressionItem);
     }
     // Remove the watch expression if it's a duplicate.
-    else if (!oldExpression && this.getAllStrings().indexOf(newExpression) != -1) {
+    else if (!oldExpression && this.getAllStrings().includes(newExpression)) {
       this.remove(expressionItem);
     }
     // Expression is eligible.
     else {
       expressionItem.attachment.currentExpression = newExpression;
     }
 
     // Synchronize with the controller's watch expressions store.
--- a/devtools/client/dom/content/grip-provider.js
+++ b/devtools/client/dom/content/grip-provider.js
@@ -55,17 +55,17 @@ GripProvider.prototype = {
       if (value.preview) {
         hasChildren = hasChildren || value.preview.ownPropertiesLength > 0;
       }
 
       if (value.preview) {
         let preview = value.preview;
         let k = preview.kind;
         let objectsWithProps = ["DOMNode", "ObjectWithURL"];
-        hasChildren = hasChildren || (objectsWithProps.indexOf(k) != -1);
+        hasChildren = hasChildren || (objectsWithProps.includes(k));
         hasChildren = hasChildren || (k == "ArrayLike" && preview.length > 0);
       }
 
       return (value.type == "object" && hasChildren);
     }
 
     return null;
   },
--- a/devtools/client/framework/devtools.js
+++ b/devtools/client/framework/devtools.js
@@ -112,17 +112,17 @@ DevTools.prototype = {
 
     if (!toolId || FORBIDDEN_IDS.has(toolId)) {
       throw new Error("Invalid definition.id");
     }
 
     // Make sure that additional tools will always be able to be hidden.
     // When being called from main.js, defaultTools has not yet been exported.
     // But, we can assume that in this case, it is a default tool.
-    if (DefaultTools.indexOf(toolDefinition) == -1) {
+    if (!DefaultTools.includes(toolDefinition)) {
       toolDefinition.visibilityswitch = "devtools." + toolId + ".enabled";
     }
 
     this._tools.set(toolId, toolDefinition);
 
     this.emit("tool-registered", toolId);
   },
 
@@ -167,17 +167,17 @@ DevTools.prototype = {
 
   getDefaultTools() {
     return DefaultTools.sort(this.ordinalSort);
   },
 
   getAdditionalTools() {
     let tools = [];
     for (let [, value] of this._tools) {
-      if (DefaultTools.indexOf(value) == -1) {
+      if (!DefaultTools.includes(value)) {
         tools.push(value);
       }
     }
     return tools.sort(this.ordinalSort);
   },
 
   getDefaultThemes() {
     return DefaultThemes.sort(this.ordinalSort);
--- a/devtools/client/framework/sidebar.js
+++ b/devtools/client/framework/sidebar.js
@@ -304,17 +304,17 @@ ToolSidebar.prototype = {
 
   /**
    * Search for existing tabs in the markup that aren't know yet and add them.
    */
   addExistingTabs: function () {
     let knownTabs = [...this._tabs.values()];
 
     for (let tab of this._tabbox.tabs.querySelectorAll("tab")) {
-      if (knownTabs.indexOf(tab) !== -1) {
+      if (knownTabs.includes(tab)) {
         continue;
       }
 
       // Find an ID for this unknown tab
       let id = tab.getAttribute("id") || "untitled-tab-" + (this.untitledTabsIndex++);
 
       // If the existing tab contains the tab ID prefix, extract the ID of the
       // tab
--- a/devtools/client/inspector/computed/computed.js
+++ b/devtools/client/inspector/computed/computed.js
@@ -913,18 +913,18 @@ PropertyView.prototype = {
 
     if (!this.tree.includeBrowserStyles && !this.hasMatchedSelectors) {
       return false;
     }
 
     let searchTerm = this.tree.searchField.value.toLowerCase();
     let isValidSearchTerm = searchTerm.trim().length > 0;
     if (isValidSearchTerm &&
-        this.name.toLowerCase().indexOf(searchTerm) === -1 &&
-        this.value.toLowerCase().indexOf(searchTerm) === -1) {
+        !this.name.toLowerCase().includes(searchTerm) &&
+        !this.value.toLowerCase().includes(searchTerm)) {
       return false;
     }
 
     return true;
   },
 
   /**
    * Returns the className that should be assigned to the propertyView.
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -1134,18 +1134,18 @@ Inspector.prototype = {
     // Don't allow to insert an element into these elements. This should only
     // contain elements where walker.insertAdjacentHTML has no effect.
     let invalidTagNames = ["html", "iframe"];
 
     return selection.isHTMLNode() &&
            selection.isElementNode() &&
            !selection.isPseudoElementNode() &&
            !selection.isAnonymousNode() &&
-           invalidTagNames.indexOf(
-            selection.nodeFront.nodeName.toLowerCase()) === -1;
+           !invalidTagNames.includes(
+            selection.nodeFront.nodeName.toLowerCase());
   },
 
   /**
    * When a new node is selected.
    */
   onNewSelection: function (event, value, reason) {
     if (reason === "selection-destroy") {
       return;
--- a/devtools/client/inspector/local-toolbox.js
+++ b/devtools/client/inspector/local-toolbox.js
@@ -97,17 +97,17 @@ window.addEventListener("DOMContentLoade
   fixStylesheets(document);
 
   // Add a mutation observer to check if new iframes have been loaded and need to have
   //  their stylesheet links updated.
   new window.MutationObserver(mutations => {
     fixStylesheetsOnMutation();
   }).observe(document.body, { childList: true, subtree: true });
 
-  const hasFirefoxTabParam = window.location.href.indexOf("firefox-tab") != -1;
+  const hasFirefoxTabParam = window.location.href.includes("firefox-tab");
   if (!hasFirefoxTabParam) {
     const inspectorRoot = document.querySelector(".inspector");
     // Remove the inspector specific markup and add the landing page root element.
     inspectorRoot.remove();
     let mount = document.createElement("div");
     mount.setAttribute("id", "mount");
     document.body.appendChild(mount);
   }
--- a/devtools/client/inspector/markup/markup.js
+++ b/devtools/client/inspector/markup/markup.js
@@ -555,17 +555,17 @@ MarkupView.prototype = {
     let reason = this.inspector.selection.reason;
     let unwantedReasons = [
       "inspector-open",
       "navigateaway",
       "nodeselected",
       "test"
     ];
     let isHighlight = this._hoveredNode === this.inspector.selection.nodeFront;
-    return !isHighlight && reason && unwantedReasons.indexOf(reason) === -1;
+    return !isHighlight && reason && !unwantedReasons.includes(reason);
   },
 
   /**
    * React to new-node-front selection events.
    * Highlights the node if needed, and make sure it is shown and selected in
    * the view.
    */
   _onNewSelection: function () {
--- a/devtools/client/inspector/rules/test/browser_rules_cubicbezier-commit-on-ENTER.js
+++ b/devtools/client/inspector/rules/test/browser_rules_cubicbezier-commit-on-ENTER.js
@@ -41,26 +41,26 @@ function* testPressingEnterCommitsChange
 
   yield waitForSuccess(function* () {
     let func = yield getComputedStyleProperty("body", null,
                                               "transition-timing-function");
     return func === expected;
   }, "Waiting for the change to be previewed on the element");
 
   ok(getRuleViewProperty(ruleView, "body", "transition").valueSpan.textContent
-    .indexOf("cubic-bezier(") !== -1,
+    .includes("cubic-bezier("),
     "The text of the timing-function was updated");
 
   info("Sending RETURN key within the tooltip document");
   // Pressing RETURN ends up doing 2 rule-view updates, one for the preview and
   // one for the commit when the tooltip closes.
   let onRuleViewChanged = waitForNEvents(ruleView, "ruleview-changed", 2);
   focusAndSendKey(widget.parent.ownerDocument.defaultView, "RETURN");
   yield onRuleViewChanged;
 
   let style = yield getComputedStyleProperty("body", null,
                                              "transition-timing-function");
   is(style, expected, "The element's timing-function was kept after RETURN");
 
   let ruleViewStyle = getRuleViewProperty(ruleView, "body", "transition")
-                      .valueSpan.textContent.indexOf("cubic-bezier(") !== -1;
+                      .valueSpan.textContent.includes("cubic-bezier(");
   ok(ruleViewStyle, "The text of the timing-function was kept after RETURN");
 }
--- a/devtools/client/inspector/rules/test/browser_rules_user-agent-styles.js
+++ b/devtools/client/inspector/rules/test/browser_rules_user-agent-styles.js
@@ -116,20 +116,20 @@ function* userAgentStylesVisible(inspect
   }
 
   ok(userRules.some(rule => rule.matchedSelectors.length === 1),
     "There is an inline style for element in user styles");
 
   // These tests rely on the "a" selector being the last test in
   // TEST_DATA.
   ok(uaRules.some(rule => {
-    return rule.matchedSelectors.indexOf(":any-link") !== -1;
+    return rule.matchedSelectors.includes(":any-link");
   }), "There is a rule for :any-link");
   ok(uaRules.some(rule => {
-    return rule.matchedSelectors.indexOf("*|*:link") !== -1;
+    return rule.matchedSelectors.includes("*|*:link");
   }), "There is a rule for *|*:link");
   ok(uaRules.some(rule => {
     return rule.matchedSelectors.length === 1;
   }), "Inline styles for ua styles");
 }
 
 function* userAgentStylesNotVisible(inspector, view) {
   info("Making sure that user agent styles are not currently visible");
--- a/devtools/client/inspector/shared/test/browser_styleinspector_tooltip-background-image.js
+++ b/devtools/client/inspector/shared/test/browser_styleinspector_tooltip-background-image.js
@@ -57,17 +57,17 @@ function* testBodyRuleView(view) {
   let {valueSpan} = getRuleViewProperty(view, "body", "background-image");
   let uriSpan = valueSpan.querySelector(".theme-link");
 
   let previewTooltip = yield assertShowPreviewTooltip(view, uriSpan);
 
   let images = previewTooltip.panel.getElementsByTagName("img");
   is(images.length, 1, "Tooltip contains an image");
   ok(images[0].getAttribute("src")
-    .indexOf("iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHe") !== -1,
+    .includes("iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHe"),
     "The image URL seems fine");
 
   yield assertTooltipHiddenOnMouseOut(previewTooltip, uriSpan);
 }
 
 function* testDivRuleView(view) {
   // Get the background property inside the rule view
   let {valueSpan} = getRuleViewProperty(view, ".test-element", "background");
--- a/devtools/client/inspector/test/browser_inspector_highlighter-geometry_03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-geometry_03.js
@@ -42,17 +42,17 @@ function* checkArrowsLabelsAndHandlers(s
     let hidden = (yield isElementHidden("arrow-" + name)) &&
                  (yield isElementHidden("handler-" + name));
     ok(!hidden,
       "The " + name + " label/arrow & handler is visible for node " + selector);
   }
 
   // Testing that the other arrows are hidden
   for (let name of PROPS) {
-    if (expectedProperties.indexOf(name) !== -1) {
+    if (expectedProperties.includes(name)) {
       continue;
     }
     let hidden = (yield isElementHidden("arrow-" + name)) &&
                  (yield isElementHidden("handler-" + name));
     ok(hidden,
       "The " + name + " arrow & handler is hidden for node " + selector);
   }
 
--- a/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
+++ b/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
@@ -37,17 +37,17 @@ const ALL_MENU_ITEMS = [
   "node-menu-screenshotnode",
   "node-menu-add-attribute",
   "node-menu-copy-attribute",
   "node-menu-edit-attribute",
   "node-menu-remove-attribute"
 ].concat(PASTE_MENU_ITEMS, ACTIVE_ON_DOCTYPE_ITEMS);
 
 const INACTIVE_ON_DOCTYPE_ITEMS =
-  ALL_MENU_ITEMS.filter(item => ACTIVE_ON_DOCTYPE_ITEMS.indexOf(item) === -1);
+  ALL_MENU_ITEMS.filter(item => !ACTIVE_ON_DOCTYPE_ITEMS.includes(item));
 
 /**
  * Test cases, each item of this array may define the following properties:
  *   desc: string that will be logged
  *   selector: selector of the node to be selected
  *   disabled: items that should have disabled state
  *   clipboardData: clipboard content
  *   clipboardDataType: clipboard content type
@@ -253,17 +253,17 @@ add_task(function* () {
       : nodeFrontContainer.tagLine;
 
     let allMenuItems = openContextMenuAndGetAllItems(inspector, {
       target: contextMenuTrigger,
     });
 
     for (let id of ALL_MENU_ITEMS) {
       let menuItem = allMenuItems.find(item => item.id === id);
-      let shouldBeDisabled = disabled.indexOf(id) !== -1;
+      let shouldBeDisabled = disabled.includes(id);
       let shouldBeDisabledText = shouldBeDisabled ? "disabled" : "enabled";
       is(menuItem.disabled, shouldBeDisabled,
         `#${id} should be ${shouldBeDisabledText} for test case ${desc}`);
     }
   }
 });
 
 /**
--- a/devtools/client/jsonview/components/JsonPanel.js
+++ b/devtools/client/jsonview/components/JsonPanel.js
@@ -68,17 +68,17 @@ define(function (require, exports, modul
     }
 
     onFilter(object) {
       if (!this.props.searchFilter) {
         return true;
       }
 
       let json = object.name + JSON.stringify(object.value);
-      return json.toLowerCase().indexOf(this.props.searchFilter.toLowerCase()) >= 0;
+      return json.toLowerCase().includes(this.props.searchFilter.toLowerCase());
     }
 
     renderValue(props) {
       let member = props.member;
 
       // Hide object summary when non-empty object is expanded (bug 1244912).
       if (isObject(member.value) && member.hasChildren && member.open) {
         return null;
--- a/devtools/client/memory/reducers/snapshots.js
+++ b/devtools/client/memory/reducers/snapshots.js
@@ -198,17 +198,17 @@ handlers[actions.FOCUS_CENSUS_NODE] = fu
   });
 };
 
 handlers[actions.SELECT_SNAPSHOT] = function (snapshots, { id }) {
   return snapshots.map(s => immutableUpdate(s, { selected: s.id === id }));
 };
 
 handlers[actions.DELETE_SNAPSHOTS_START] = function (snapshots, { ids }) {
-  return snapshots.filter(s => ids.indexOf(s.id) === -1);
+  return snapshots.filter(s => !ids.includes(s.id));
 };
 
 handlers[actions.DELETE_SNAPSHOTS_END] = function (snapshots) {
   return snapshots;
 };
 
 handlers[actions.CHANGE_VIEW] = function (snapshots, { newViewState }) {
   return newViewState === viewState.DIFFING
--- a/devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
+++ b/devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
@@ -24,19 +24,19 @@ Test that we don't display `JS::ubi::Roo
                item: makeTestDominatorTreeNode({ label: ["other", "JS::ubi::RootList"] }),
                depth: 0,
                arrow: dom.div(),
                focused: true,
                getPercentSize: _ => 50,
                onViewSourceInDebugger: _ => { },
              }), container);
 
-             ok(container.textContent.indexOf("JS::ubi::RootList") == -1,
+             ok(!container.textContent.includes("JS::ubi::RootList"),
                 "Should not display `JS::ubi::RootList`");
-             ok(container.textContent.indexOf("GC Roots") >= 0,
+             ok(container.textContent.includes("GC Roots"),
                 "Should display `GC Roots` instead");
            } catch(e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          })