Name Description Size
data 43
head_e10s.js globals ExtensionTestUtils 215
head_legacy_ep.js 318
head_native_messaging.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4410
head_remote.js globals testEnv 232
head_schemas.js exported Schemas, LocalAPIImplementation, SchemaAPIInterface, getContextWrapper 2989
head_storage.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 36012
head_sync.js exported withSyncContext 1786
head_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2876
head.js exported createHttpServer, cleanupDir, clearCache, optionalPermissionsPromptHandler, promiseConsoleOutput, promiseQuotaManagerServiceReset, promiseQuotaManagerServiceClear, runWithPrefs, testEnv, withHandlingUserInput, resetHandlingUserInput 8526
native_messaging.ini 470
test_change_remote_mode.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 608
test_csp_custom_policies.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 6962
test_csp_validator.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 9023
test_ext_activityLog.js 494
test_ext_adoption_with_private_field_xrays.js / 4283
test_ext_adoption_with_xrays.js / 3495
test_ext_alarms_does_not_fire.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1040
test_ext_alarms_periodic.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1398
test_ext_alarms_replaces.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1728
test_ext_alarms.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 6527
test_ext_api_permissions.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1645
test_ext_background_api_injection.js 952
test_ext_background_early_shutdown.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 6642
test_ext_background_generated_load_events.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 751
test_ext_background_generated_reload.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 700
test_ext_background_global_history.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 685
test_ext_background_private_browsing.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1241
test_ext_background_runtime_connect_params.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2420
test_ext_background_service_worker.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 13795
test_ext_background_sub_windows.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1268
test_ext_background_teardown.js 2536
test_ext_background_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2659
test_ext_background_window_properties.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1096
test_ext_brokenlinks.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1590
test_ext_browserSettings_homepage.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 935
test_ext_browserSettings.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 14976
test_ext_browsingData_cookies_cache.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 12396
test_ext_browsingData_cookies_cookieStoreId.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5647
test_ext_browsingData.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1530
test_ext_cache_api.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 8381
test_ext_captivePortal_url.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1370
test_ext_captivePortal.js This duplicates the test from netwerk/test/unit/test_captive_portal_service.js however using an extension to gather the captive portal information. 3922
test_ext_content_security_policy.js ", "moz-extension:", "'self'", ], }; baseCSP[3] = { "object-src": ["'self'"], "script-src": ["http://localhost:*", "http://127.0.0.1:*", "'self'"], "worker-src": ["http://localhost:*", "http://127.0.0.1:*", "'self'"], }; /** Tests that content security policies for an add-on are actually applied to * documents that belong to it. This tests both the base policies and add-on specific policies, and ensures that the parsed policies applied to the document's principal match what was specified in the policy string. @param {number} [manifest_version] @param {object} [customCSP] 7122
test_ext_contentscript_about_blank_start.js 2166
test_ext_contentscript_api_injection.js 1824
test_ext_contentscript_async_loading.js 2268
test_ext_contentscript_canvas_tainting.js 3498
test_ext_contentscript_context_isolation.js globals exportFunction 4818
test_ext_contentscript_context.js eslint-disable mozilla/balanced-listeners 10515
test_ext_contentscript_create_iframe.js 4787
test_ext_contentscript_csp.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 13683
test_ext_contentscript_css.js 1230
test_ext_contentscript_exporthelpers.js globals exportFunction, precisePi, reportPi 2585
test_ext_contentscript_in_background.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1981
test_ext_contentscript_module_import.js eslint-disable no-unsanitized/method, no-eval, no-implied-eval 8032
test_ext_contentscript_perf_observers.js 2208
test_ext_contentscript_restrictSchemes.js 1800
test_ext_contentscript_scriptCreated.js / 1585
test_ext_contentscript_teardown.js 2841
test_ext_contentscript_triggeringPrincipal.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 42617
test_ext_contentscript_unregister_during_loadContentScript.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 2931
test_ext_contentscript_xml_prettyprint.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 2315
test_ext_contentscript_xorigin_frame.js 2297
test_ext_contentscript_xrays.js / 1474
test_ext_contentscript.js / 7474
test_ext_contentScripts_register.js /file_sample_registered_styles.html"]; browser.test.assertThrows( () => { browser.contentScripts.register({ matches, unknownParam: "unexpected property", }); }, /Unexpected property "unknownParam"/, "contentScripts.register throws on unexpected properties" ); let fileScript = await browser.contentScripts.register({ css: [{ file: "registered_ext_style.css" }], matches, runAt: "document_start", }); let textScript = await browser.contentScripts.register({ css: [{ code: cssCode }], matches, runAt: "document_start", }); browser.test.onMessage.addListener(async msg => { switch (msg) { case "unregister-text": await textScript.unregister().catch(err => { browser.test.fail( `Unexpected exception while unregistering text style: ${err}` ); }); await browser.test.assertRejects( textScript.unregister(), /Content script already unregistered/, "Got the expected rejection on calling script.unregister() multiple times" ); browser.test.sendMessage("unregister-text:done"); break; case "unregister-file": await fileScript.unregister().catch(err => { browser.test.fail( `Unexpected exception while unregistering url style: ${err}` ); }); await browser.test.assertRejects( fileScript.unregister(), /Content script already unregistered/, "Got the expected rejection on calling script.unregister() multiple times" ); browser.test.sendMessage("unregister-file:done"); break; default: browser.test.fail(`Unexpected test message received: ${msg}`); } }); browser.test.sendMessage("background_ready"); } let extension = ExtensionTestUtils.loadExtension({ manifest: { permissions: [ "http://localhost/ 17286
test_ext_contexts_gc.js / 8898
test_ext_contexts.js 5528
test_ext_contextual_identities.js 17127
test_ext_cookieBehaviors.js 19941
test_ext_cookies_firstParty.js 10630
test_ext_cookies_samesite.js 3239
test_ext_cors_mozextension.js 7940
test_ext_debugging_utils.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 8011
test_ext_dns.js PROXYCONFIG_MANUAL 4476
test_ext_downloads_cookies.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 7910
test_ext_downloads_cookieStoreId.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 14663
test_ext_downloads_download.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 18498
test_ext_downloads_misc.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 31893
test_ext_downloads_partitionKey.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5966
test_ext_downloads_private.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 10660
test_ext_downloads_search.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 19785
test_ext_downloads_urlencoded.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 7173
test_ext_downloads.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1181
test_ext_error_location.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1341
test_ext_eventpage_warning.js 2380
test_ext_experiments.js globals browser 7731
test_ext_extension_content_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4176
test_ext_extension_startup_failure.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1248
test_ext_extension_startup_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2400
test_ext_extension.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2131
test_ext_extensionPreferencesManager.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 24842
test_ext_extensionSettingsStore.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 29890
test_ext_file_access.js "], js: ["content_script.js"], }, ], }, files: { "content_script.js": async () => { let response = await fetch(document.URL); browser.test.assertEq(200, response.status, "expected load"); let responseText = await response.text(); browser.test.assertTrue( responseText.includes("<p>Page</p>"), `expected file content in response of ${response.url}` ); // Now with content.fetch: response = await content.fetch(document.URL); browser.test.assertEq(200, response.status, "expected load (content)"); browser.test.sendMessage("done"); }, }, }); await extension.startup(); let contentPage = await ExtensionTestUtils.loadContentPage(FILE_DUMMY_URL); await extension.awaitMessage("done"); await contentPage.close(); await extension.unload(); }); // XHR/fetch for other file is not allowed, even with file://-permissions. add_task(async function content_script_xhr_to_other_file_not_allowed() { let extension = ExtensionTestUtils.loadExtension({ manifest: { permissions: ["file:///*"], content_scripts: [ { matches: ["file:///*"], js: ["content_script.js"], }, ], }, files: { "content_script.js": async () => { let otherFileUrl = document.URL.replace( "dummy_page.html", "file_sample.html" ); let x = new XMLHttpRequest(); x.open("GET", otherFileUrl); await new Promise(resolve => { x.onloadend = resolve; x.send(); }); browser.test.assertEq(0, x.status, "expected error"); browser.test.assertEq("", x.responseText, "request should fail"); // Now with content.XMLHttpRequest. x = new content.XMLHttpRequest(); x.open("GET", otherFileUrl); x.onloadend = () => { browser.test.assertEq(0, x.status, "expected error (content)"); browser.test.sendMessage("done"); }; x.send(); }, }, }); await extension.startup(); let contentPage = await ExtensionTestUtils.loadContentPage(FILE_DUMMY_URL); await extension.awaitMessage("done"); await contentPage.close(); await extension.unload(); }); // "file://" permission does not grant access to files in the extension page. add_task(async function file_access_from_extension_page_not_allowed() { let extension = ExtensionTestUtils.loadExtension({ manifest: { permissions: ["file:///*"], description: FILE_DUMMY_URL, }, async background() { const FILE_DUMMY_URL = browser.runtime.getManifest().description; await browser.test.assertRejects( fetch(FILE_DUMMY_URL), /NetworkError when attempting to fetch resource/, "block request to file from background page despite file permission" ); // Regression test for bug 1420296 . await browser.test.assertRejects( fetch(FILE_DUMMY_URL, { mode: "same-origin" }), /NetworkError when attempting to fetch resource/, "block request to file from background page despite 'same-origin' mode" ); browser.test.sendMessage("done"); }, }); await extension.startup(); await extension.awaitMessage("done"); await extension.unload(); }); // webRequest listeners should see subresource requests from file:-principals. add_task(async function webRequest_script_request_from_file_principals() { // Extension without file:-permission should not see the request. let extensionWithoutFilePermission = ExtensionTestUtils.loadExtension({ manifest: { permissions: ["http://example.net/", "webRequest"], }, background() { browser.webRequest.onBeforeRequest.addListener( details => { browser.test.fail(`Unexpected request from ${details.originUrl}`); }, { urls: ["http://example.net/intercept_by_webRequest.js"] } ); }, }); // Extension with <all_urls> (which matches the resource URL at example.net // and the origin at file:// 6111
test_ext_geckoProfiler_control.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 7500
test_ext_geckoProfiler_schema.js 1721
test_ext_geturl.js 1869
test_ext_i18n_css.js / 5077
test_ext_i18n.js / 15704
test_ext_idle.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 7186
test_ext_incognito.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 8088
test_ext_indexedDB_principal.js 3451
test_ext_ipcBlob.js / 4236
test_ext_json_parser.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2185
test_ext_l10n.js 4386
test_ext_localStorage.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1398
test_ext_management_uninstall_self.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4062
test_ext_management.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5535
test_ext_manifest_content_security_policy.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3550
test_ext_manifest_incognito.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1250
test_ext_manifest_minimum_chrome_version.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 419
test_ext_manifest_minimum_opera_version.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 417
test_ext_manifest_themes.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1058
test_ext_manifest.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2123
test_ext_MessageManagerProxy.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2942
test_ext_messaging_startup.js 7108
test_ext_native_messaging_perf.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3330
test_ext_native_messaging_unresponsive.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2094
test_ext_native_messaging.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 19609
test_ext_networkStatus.js 5310
test_ext_notifications_incognito.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3196
test_ext_notifications_unsupported.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 1405
test_ext_onmessage_removelistener.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 903
test_ext_performance_counters.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2374
test_ext_permission_warnings.js ", "about:ugh", "about:*", "about:// 20546
test_ext_permission_xhr.js eslint-disable mozilla/balanced-listeners 6791
test_ext_permissions_api.js 11879
test_ext_permissions_migrate.js 8023
test_ext_permissions_uninstall.js 4661
test_ext_permissions.js 24462
test_ext_persistent_events.js global EventManager 17020
test_ext_privacy_disable.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5302
test_ext_privacy_update.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4333
test_ext_privacy.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 28634
test_ext_proxy_authorization_via_proxyinfo.js 3291
test_ext_proxy_config.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 17342
test_ext_proxy_containerIsolation.js 1633
test_ext_proxy_onauthrequired.js 8621
test_ext_proxy_settings.js 2891
test_ext_proxy_socks.js globals TCPServerSocket 16398
test_ext_proxy_speculative.js 1305
test_ext_proxy_startup.js 4408
test_ext_redirects.js 20662
test_ext_runtime_connect_no_receiver.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 747
test_ext_runtime_getBrowserInfo.js 963
test_ext_runtime_getPlatformInfo.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 914
test_ext_runtime_id.js 1160
test_ext_runtime_messaging_self.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2847
test_ext_runtime_onInstalled_and_onStartup.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 9529
test_ext_runtime_ports_gc.js globals ExtensionAPI 4933
test_ext_runtime_ports.js 2113
test_ext_runtime_sendMessage_args.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4161
test_ext_runtime_sendMessage_errors.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2095
test_ext_runtime_sendMessage_multiple.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2418
test_ext_runtime_sendMessage_no_receiver.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2839
test_ext_runtime_sendMessage.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 14097
test_ext_same_site_cookies.js Description of the test: (1) We load an image from mochi.test which sets a same site cookie (2) We have the web extension perform an XHR request to mochi.test (3) We verify the web-extension can access the same-site cookie 3988
test_ext_same_site_redirects.js This test tests various redirection scenarios, and checks whether sameSite cookies are sent. The file has the following tests: - verify_firstparty_web_behavior - base case, confirms normal web behavior. - samesite_is_foreign_without_host_permissions - wildcard_host_permissions_enable_samesite_cookies - explicit_host_permissions_enable_samesite_cookies - some_host_permissions_enable_some_samesite_cookies 7893
test_ext_sandbox_var.js 949
test_ext_sandboxed_resource.js eslint-disable-next-line mozilla/balanced-listeners 1629
test_ext_schema.js 2185
test_ext_schemas_allowed_contexts.js 4945
test_ext_schemas_async.js 9107
test_ext_schemas_interactive.js globals ExtensionAPI 4324
test_ext_schemas_manifest_permissions.js 4709
test_ext_schemas_privileged.js 2185
test_ext_schemas_revoke.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 12203
test_ext_schemas_roots.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5220
test_ext_schemas_versioned.js 15390
test_ext_schemas.js 48468
test_ext_script_filenames.js 9875
test_ext_secfetch.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2316
test_ext_shadowdom.js / 1623
test_ext_shared_array_buffer.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 3606
test_ext_shared_workers.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 1244
test_ext_shutdown_cleanup.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 932
test_ext_simple.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3812
test_ext_startup_cache.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4737
test_ext_startup_perf.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2135
test_ext_startup_request_handler.js 1417
test_ext_startupData.js 1314
test_ext_storage_content_local.js 1190
test_ext_storage_content_sync_kinto.js 887
test_ext_storage_content_sync.js 881
test_ext_storage_idb_data_migration.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 22697
test_ext_storage_local.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2063
test_ext_storage_managed_policy.js 1520
test_ext_storage_managed.js 4476
test_ext_storage_quota_exceeded_errors.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2590
test_ext_storage_sanitizer.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3606
test_ext_storage_sync_kinto_crypto.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 3221
test_ext_storage_sync_kinto.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 72253
test_ext_storage_sync.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 751
test_ext_storage_tab.js 6985
test_ext_storage_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 10739
test_ext_tab_teardown.js 3001
test_ext_telemetry.js 27844
test_ext_test_mock.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 2166
test_ext_test_wrapper.js 2035
test_ext_trustworthy_origin.js This test is asserting that moz-extension: URLs are recognized as trustworthy local origins 508
test_ext_unknown_permissions.js 1571
test_ext_unlimitedStorage.js 5564
test_ext_unload_frame.js 7114
test_ext_userScripts_exports.js /file_sample.html"], scriptMetadata, }); if (messageListener) { browser.runtime.onMessage.addListener(messageListener); } browser.test.sendMessage("background-ready"); } function notifyFinish(failureReason) { browser.test.assertEq( undefined, failureReason, "should be completed without errors" ); browser.test.sendMessage("test_userScript_APIMethod:done"); } function assertTrue(val, message) { browser.test.assertTrue(val, message); if (!val) { browser.test.sendMessage("test_userScript_APIMethod:done"); throw message; } } let extension = ExtensionTestUtils.loadExtension({ manifest: { permissions: ["http://localhost/ 31588
test_ext_userScripts_telemetry.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5020
test_ext_userScripts.js / 19935
test_ext_web_accessible_resources_matches.js 3364
test_ext_web_accessible_resources.js 4502
test_ext_webRequest_auth.js 12582
test_ext_webRequest_cached.js /file_sample.html?r=*"], }, ["blocking", "responseHeaders"] ); browser.webRequest.onResponseStarted.addListener( details => { let needle = details.fromCache ? testHeaders[1] : testHeaders[0]; let header = details.responseHeaders.filter(header => { browser.test.log(`header ${header.name} = ${header.value}`); return header.name == needle.name && header.value == needle.value; }); browser.test.assertEq( header.length, 1, "header exists with correct value" ); if (details.fromCache) { browser.test.sendMessage("from-cache"); } }, { urls: ["http://example.com/ 10047
test_ext_webRequest_cancelWithReason.js 1873
test_ext_webRequest_containerIsolation.js 1654
test_ext_webRequest_download.js 1195
test_ext_webRequest_filter_urls.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 862
test_ext_webRequest_filterResponseData.js 15755
test_ext_webRequest_filterTypes.js 2725
test_ext_webRequest_from_extension_page.js 1742
test_ext_webRequest_host.js 2525
test_ext_webRequest_incognito.js 2636
test_ext_webRequest_mergecsp.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 6868
test_ext_webRequest_permission.js globals content 4229
test_ext_webRequest_redirect_mozextension.js ", ], web_accessible_resources: ["test.html"], }, files: { "test.html": '<!DOCTYPE html><script src="test.js"></script>', "test.js": () => { browser.test.assertTrue( browser.webRequest, "webRequest API should be available" ); browser.test.sendMessage("test_done"); }, }, background: () => { browser.webRequest.onBeforeRequest.addListener( () => { return { redirectUrl: browser.runtime.getURL("test.html"), }; }, { urls: ["*:// 1199
test_ext_webRequest_redirect_StreamFilter.js /*"], }, background() { const closeCounts = {}; browser.webRequest.onBeforeRequest.addListener( details => { let expectedError = "Channel redirected"; if (details.type === "main_frame" || details.type === "sub_frame") { // Message differs for the reason stated at the top of this file. // TODO bug 1683862: Make error message more accurate. expectedError = "Invalid request ID"; } closeCounts[details.requestId] = 0; let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstart = () => { filter.disconnect(); browser.test.fail("Unexpected filter.onstart"); }; filter.onerror = function() { closeCounts[details.requestId]++; browser.test.assertEq(expectedError, filter.error, "filter.error"); }; }, { urls: ["*:// 4601
test_ext_webRequest_redirectProperty.js 1884
test_ext_webRequest_requestSize.js /*"] } ); browser.webRequest.onCompleted.addListener( async details => { browser.test.assertTrue(details.requestSize > 100, "have requestSize"); browser.test.assertTrue( details.responseSize > 100, "have responseSize" ); browser.test.log(`details.requestSize: ${details.requestSize}`); browser.test.log(`details.responseSize: ${details.responseSize}`); browser.test.sendMessage("done"); }, { urls: ["*:// 1729
test_ext_webRequest_responseBody.js eslint-disable mozilla/no-arbitrary-setTimeout 19112
test_ext_webRequest_set_cookie.js Check that all the cookies described by `prefixes` are in the cookie jar. @param {Array.string} prefixes Zero or more prefixes, describing cookies that are expected to be set in the current cookie jar. Each prefix describes both a cookie name and corresponding value. For example, if the string "ext" is passed as an argument, then this function expects to see a cookie called "extcookie" and corresponding value of "extvalue". 10249
test_ext_webRequest_startup_StreamFilter.js 2035
test_ext_webRequest_startup.js 17608
test_ext_webRequest_style_cache.js 1348
test_ext_webRequest_suspend.js 8045
test_ext_webRequest_urlclassification.js If this test fails, likely nsIClassifiedChannel has added or changed a CLASSIFIED_* flag. Those changes must be in sync with ChannelWrapper.webidl/cpp and the web_request.json schema file. 1128
test_ext_webRequest_userContextId.js 1164
test_ext_webRequest_viewsource_StreamFilter.js /dummy"] }, ["blocking"] ); browser.webRequest.onBeforeRequest.addListener( details => { browser.test.assertEq(`${BASE_URL}/redir`, details.url, "Got redirect"); let filter = browser.webRequest.filterResponseData(details.requestId); filter.onstop = () => { filter.disconnect(); browser.test.fail("Unexpected onstop for redirect"); browser.test.sendMessage("redirect_done"); }; filter.onerror = () => { browser.test.assertEq( // TODO bug 1683862: must be "Channel redirected", but it is not // because document requests are handled differently compared to // other requests, see the comment at the top of // test_ext_webRequest_redirect_StreamFilter.js. "Invalid request ID", filter.error, "Expected error in filter.onerror" ); browser.test.sendMessage("redirect_done"); }; }, { urls: ["*:// 5140
test_ext_webRequest_viewsource.js 2719
test_ext_webRequest_webSocket.js 1481
test_ext_webSocket.js 2341
test_ext_xhr_capabilities.js 1983
test_extension_permissions_migration.js fileDeleted 2472
test_ExtensionShortcutKeyMap.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 4767
test_ExtensionStorageSync_migration_kinto.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 3372
test_load_all_api_modules.js 4847
test_locale_converter.js 4085
test_locale_data.js 5447
test_MatchPattern.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 18104
test_native_manifests.js 12252
test_proxy_failover.js 7472
test_proxy_incognito.js eslint no-unused-vars: ["error", {"args": "none", "varsIgnorePattern": "^(FindProxyForURL)$"}] 2916
test_proxy_info_results.js 10973
test_proxy_listener.js 8244
test_proxy_userContextId.js 1263
test_StorageSyncService.js Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ 8082
test_WebExtensionContentScript.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 5494
test_WebExtensionPolicy.js -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 9283
test_webRequest_ancestors.js 2312
test_webRequest_cookies.js 2822
test_webRequest_filtering.js /*_style_*"]) }; WebRequest.onBeforeRequest.addListener(onBeforeRequest, filter, ["blocking"]); WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, filter, [ "blocking", ]); WebRequest.onResponseStarted.addListener(onResponseStarted, filter); await openAndCloseContentPage(URL); compareLists(requested, expected_urls, "requested"); compareLists(sendHeaders, expected_urls, "sendHeaders"); compareLists(completed, expected_urls, "completed"); WebRequest.onBeforeRequest.removeListener(onBeforeRequest); WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders); WebRequest.onResponseStarted.removeListener(onResponseStarted); }); add_task(async function filter_types() { resetExpectations(); let filter = { types: ["stylesheet"] }; WebRequest.onBeforeRequest.addListener(onBeforeRequest, filter, ["blocking"]); WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, filter, [ "blocking", ]); WebRequest.onResponseStarted.addListener(onResponseStarted, filter); await openAndCloseContentPage(URL); compareLists(requested, expected_urls, "requested"); compareLists(sendHeaders, expected_urls, "sendHeaders"); compareLists(completed, expected_urls, "completed"); WebRequest.onBeforeRequest.removeListener(onBeforeRequest); WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders); WebRequest.onResponseStarted.removeListener(onResponseStarted); }); add_task(async function filter_windowId() { resetExpectations(); // Check that adding windowId will exclude non-matching requests. // test_ext_webrequest_filter.html provides coverage for matching requests. let filter = { urls: new MatchPatternSet(["*:// 5810
webidl-api 6
xpcshell-common-e10s.ini 792
xpcshell-common.ini 12123
xpcshell-content.ini 957
xpcshell-e10s.ini 1063
xpcshell-legacy-ep.ini 884
xpcshell-remote.ini 1221
xpcshell.ini 3218
.eslintrc.js 207