diff --git a/DEPS b/DEPS index eb10a209ca5f..db8ae433db54 100644 --- a/DEPS +++ b/DEPS @@ -3,7 +3,7 @@ use_relative_paths = True deps = { "vendor/ad-block": "https://github.com/brave/ad-block.git@11ab48c4b2bd5355e789d4c87005ab2c14eecc09", "vendor/autoplay-whitelist": "https://github.com/brave/autoplay-whitelist.git@a85d71af4e416cf8188dc297320b0d777aafa315", - "vendor/extension-whitelist": "https://github.com/brave/extension-whitelist.git@463e5e4e06e0ca84927176e8c72f6076ae9b6829", + "vendor/extension-whitelist": "https://github.com/brave/extension-whitelist.git@a3a9a768900909739db99d79541fc56c2984407d", "vendor/tracking-protection": "https://github.com/brave/tracking-protection.git@29b1f86b11a8c7438fd7d57b446a77a84946712a", "vendor/hashset-cpp": "https://github.com/brave/hashset-cpp.git@4b55fe39bb25bb0d8b11a43d547d75f00c6c46fb", "vendor/bloom-filter-cpp": "https://github.com/brave/bloom-filter-cpp.git@9be5c63b14e094156e00c8b28f205e7794f0b92c", diff --git a/browser/extensions/brave_component_loader.cc b/browser/extensions/brave_component_loader.cc index 27ce4c616f51..a742a3b6fb5a 100644 --- a/browser/extensions/brave_component_loader.cc +++ b/browser/extensions/brave_component_loader.cc @@ -25,17 +25,6 @@ namespace extensions { -// static -bool BraveComponentLoader::IsPdfjsDisabled() { -#if defined(OS_ANDROID) - return true; -#else - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - return command_line.HasSwitch(switches::kDisablePDFJSExtension); -#endif -} - BraveComponentLoader::BraveComponentLoader( ExtensionServiceInterface* extension_service, PrefService* profile_prefs, @@ -43,12 +32,7 @@ BraveComponentLoader::BraveComponentLoader( Profile* profile) : ComponentLoader(extension_service, profile_prefs, local_state, profile), profile_(profile), - profile_prefs_(profile_prefs), - testing_callbacks_(nullptr) { -// TODO(bridiver) - this doesn't belong here -#if !defined(OS_ANDROID) - ObserveOpenPdfExternallySetting(); -#endif + profile_prefs_(profile_prefs) { } BraveComponentLoader::~BraveComponentLoader() { @@ -105,12 +89,6 @@ void BraveComponentLoader::AddDefaultComponentExtensions( Add(IDR_BRAVE_EXTENSION, brave_extension_path); } - if (!profile_prefs_->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally) && - !command_line.HasSwitch(switches::kDisablePDFJSExtension)) { - AddExtension(pdfjs_extension_id, pdfjs_extension_name, - pdfjs_extension_public_key); - } - #if BUILDFLAG(BRAVE_REWARDS_ENABLED) if (!command_line.HasSwitch(switches::kDisableBraveRewardsExtension)) { base::FilePath brave_rewards_path(FILE_PATH_LITERAL("")); @@ -130,39 +108,4 @@ void BraveComponentLoader::AddDefaultComponentExtensions( } } -#if !defined(OS_ANDROID) -void BraveComponentLoader::ObserveOpenPdfExternallySetting() { - // Observe the setting change only in regular profiles since the PDF settings - // page is not available in Guest/Tor profiles. - DCHECK(profile_ && profile_prefs_); - if (!profile_->IsGuestSession()) { - registrar_.Init(profile_prefs_); - registrar_.Add(prefs::kPluginsAlwaysOpenPdfExternally, - base::Bind(&BraveComponentLoader::UpdatePdfExtension, - base::Unretained(this))); - } -} -#endif - -void BraveComponentLoader::UpdatePdfExtension(const std::string& pref_name) { - DCHECK(pref_name == prefs::kPluginsAlwaysOpenPdfExternally); - DCHECK(profile_prefs_); - if (profile_prefs_->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally) || - IsPdfjsDisabled()) { - if (testing_callbacks_) - testing_callbacks_->OnPdfExtensionAction(TestingCallbacks::WILL_REMOVE); - Remove(pdfjs_extension_id); - } else if (!Exists(pdfjs_extension_id)) { - if (testing_callbacks_) - testing_callbacks_->OnPdfExtensionAction(TestingCallbacks::WILL_ADD); - AddExtension(pdfjs_extension_id, pdfjs_extension_name, - pdfjs_extension_public_key); - } -} - -void BraveComponentLoader::set_testing_callbacks( - TestingCallbacks* testing_callbacks) { - testing_callbacks_ = testing_callbacks; -} - } // namespace extensions diff --git a/browser/extensions/brave_component_loader.h b/browser/extensions/brave_component_loader.h index 8bd95731a4f4..414f5bc6c9cc 100644 --- a/browser/extensions/brave_component_loader.h +++ b/browser/extensions/brave_component_loader.h @@ -12,8 +12,6 @@ #include "chrome/browser/extensions/component_loader.h" #include "components/prefs/pref_change_registrar.h" -class BraveComponentLoaderTest; - namespace extensions { // For registering, loading, and unloading component extensions. @@ -41,34 +39,15 @@ class BraveComponentLoader : public ComponentLoader { // hangouts is set. If the buildflag is not set, it won't add though. void ForceAddHangoutServicesExtension(); - static bool IsPdfjsDisabled(); - private: #if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) void AddHangoutServicesExtension() override; #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) - friend class ::BraveComponentLoaderTest; -#if !defined(OS_ANDROID) - void ObserveOpenPdfExternallySetting(); -#endif - // Callback for changes to the AlwaysOpenPdfExternally setting. - void UpdatePdfExtension(const std::string& pref_name); - - struct TestingCallbacks { - enum PdfExtensionAction { - NONE, - WILL_ADD, - WILL_REMOVE, - }; - virtual void OnPdfExtensionAction(PdfExtensionAction action) = 0; - }; - - void set_testing_callbacks(TestingCallbacks* testing_callbacks); Profile* profile_; PrefService* profile_prefs_; PrefChangeRegistrar registrar_; - TestingCallbacks* testing_callbacks_; + DISALLOW_COPY_AND_ASSIGN(BraveComponentLoader); }; diff --git a/browser/extensions/brave_component_loader_browsertest.cc b/browser/extensions/brave_component_loader_browsertest.cc deleted file mode 100644 index b7c327d3fd69..000000000000 --- a/browser/extensions/brave_component_loader_browsertest.cc +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "brave/browser/extensions/brave_component_loader.h" -#include "brave/browser/extensions/brave_extension_functional_test.h" -#include "brave/common/brave_switches.h" -#include "brave/common/pref_names.h" -#include "brave/common/extensions/extension_constants.h" -#include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/common/pref_names.h" -#include "components/prefs/pref_service.h" -#include "content/public/test/browser_test_utils.h" -#include "testing/gtest/include/gtest/gtest.h" - -using extensions::BraveComponentLoader; - -class BraveComponentLoaderTest : public extensions::ExtensionFunctionalTest, - public BraveComponentLoader::TestingCallbacks { - public: - BraveComponentLoaderTest() : pdf_extension_action_(TestingCallbacks::NONE) {} - ~BraveComponentLoaderTest() override = default; - - protected: - void SetUpOnMainThread() override { - extensions::ExtensionService* service = - extensions::ExtensionSystem::Get(profile())->extension_service(); - DCHECK(service); - BraveComponentLoader* loader = - static_cast(service->component_loader()); - loader->set_testing_callbacks(this); - } - - // BraveComponentLoader::TestingCallbacks - void OnPdfExtensionAction( - TestingCallbacks::PdfExtensionAction action) override { - pdf_extension_action_ = action; - } - - TestingCallbacks::PdfExtensionAction pdf_extension_action() { - return pdf_extension_action_; - } - - private: - TestingCallbacks::PdfExtensionAction pdf_extension_action_; -}; - -class BravePDFExtensionTest : public BraveComponentLoaderTest { - public: - BravePDFExtensionTest() {} - ~BravePDFExtensionTest() override = default; - - void SetDownloadPDFs(bool value) { - DCHECK(browser()); - profile()->GetPrefs()->SetBoolean(prefs::kPluginsAlwaysOpenPdfExternally, - value); - } -}; - -IN_PROC_BROWSER_TEST_F(BravePDFExtensionTest, ToggleDownloadPDFs) { - // Set preference to always download PDFs. - SetDownloadPDFs(true); - EXPECT_EQ(TestingCallbacks::WILL_REMOVE, pdf_extension_action()); - - // Toggle the preference to view PDFs in the browser. - SetDownloadPDFs(false); - EXPECT_EQ(TestingCallbacks::WILL_ADD, pdf_extension_action()); -} - -class BravePDFExtensionDisabledTest : public BravePDFExtensionTest { - public: - BravePDFExtensionDisabledTest() = default; - ~BravePDFExtensionDisabledTest() override = default; - - protected: - void SetUpCommandLine(base::CommandLine* command_line) override { - ExtensionFunctionalTest::SetUpCommandLine(command_line); - // Disable loading of our PDF extension. - command_line->AppendSwitch(switches::kDisablePDFJSExtension); - } -}; - -IN_PROC_BROWSER_TEST_F(BravePDFExtensionDisabledTest, ToggleDownloadPDFs) { - // Set preference to always download PDFs. - SetDownloadPDFs(true); - EXPECT_EQ(TestingCallbacks::WILL_REMOVE, pdf_extension_action()); - - // Toggle the preference to view PDFs in the browser. - SetDownloadPDFs(false); - EXPECT_EQ(TestingCallbacks::WILL_REMOVE, pdf_extension_action()); -} diff --git a/browser/extensions/brave_extension_provider.cc b/browser/extensions/brave_extension_provider.cc index 2db1f5ca1031..d72e8aefd772 100644 --- a/browser/extensions/brave_extension_provider.cc +++ b/browser/extensions/brave_extension_provider.cc @@ -27,8 +27,7 @@ bool IsBlacklisted(const extensions::Extension* extension) { {// Used for tests, corresponds to // brave/test/data/should-be-blocked-extension. "mlklomjnahgiddgfdgjhibinlfibfffc", - // Chromium PDF Viewer. - "mhjfbmdgcfjbbpaeojofohoefgiehjai"}); + }); if (std::find(blacklisted_extensions.begin(), blacklisted_extensions.end(), extension->id()) != blacklisted_extensions.end()) @@ -58,7 +57,6 @@ bool BraveExtensionProvider::IsVetted(const std::string id) { brave_sync_extension_id, brave_webtorrent_extension_id, crl_set_extension_id, - pdfjs_extension_id, hangouts_extension_id, widevine_extension_id, brave_component_updater::kLocalDataFilesComponentId, @@ -79,6 +77,8 @@ bool BraveExtensionProvider::IsVetted(const std::string id) { "bhlmpjhncoojbkemjkeppfahkglffilp", // Test ID: Brave Tor Client Updater "ngicbhhaldfdgmjhilmnleppfpmkgbbk", + // Chromium PDF Viewer. + "mhjfbmdgcfjbbpaeojofohoefgiehjai", }); if (std::find(vetted_extensions.begin(), vetted_extensions.end(), id) != vetted_extensions.end()) diff --git a/browser/extensions/brave_extension_provider_browsertest.cc b/browser/extensions/brave_extension_provider_browsertest.cc index 9dc1fc3fddcc..41f3996932f6 100644 --- a/browser/extensions/brave_extension_provider_browsertest.cc +++ b/browser/extensions/brave_extension_provider_browsertest.cc @@ -44,34 +44,6 @@ IN_PROC_BROWSER_TEST_F(BraveExtensionProviderTest, WhitelistedExtension) { ASSERT_TRUE(extension); } -IN_PROC_BROWSER_TEST_F(BraveExtensionProviderTest, PDFJSInstalls) { - base::FilePath test_data_dir; - GetTestDataDir(&test_data_dir); - InstallExtensionSilently(extension_service(), - test_data_dir.AppendASCII("pdfjs.crx")); - - content::WebContents* contents = - browser()->tab_strip_model()->GetActiveWebContents(); - GURL url = embedded_test_server()->GetURL("/test.pdf"); - ui_test_utils::NavigateToURL(browser(), url); - ASSERT_TRUE(WaitForLoadStop(contents)); - - // Test.pdf is just a PDF file for an icon with title test.ico - base::string16 expected_title(base::ASCIIToUTF16("test.ico - test.pdf")); - content::TitleWatcher title_watcher( - browser()->tab_strip_model()->GetActiveWebContents(), expected_title); - ui_test_utils::NavigateToURL(browser(), url); - EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); - - // Make sure pdfjs embed exists - bool pdfjs_exists; - ASSERT_TRUE(content::ExecuteScriptAndExtractBool( - browser()->tab_strip_model()->GetWebContentsAt(0), - "window.domAutomationController.send(" - "!!document.body.querySelector(\"#chrome-pdfjs-logo-bg\"))", &pdfjs_exists)); - ASSERT_TRUE(pdfjs_exists); -} - // Load an extension page with an ad image, and make sure it is NOT blocked. // It would otherwise be blocked though if it wasn't an extension. IN_PROC_BROWSER_TEST_F(BraveExtensionProviderTest, AdsNotBlockedByDefaultBlockerInExtension) { diff --git a/browser/ui/webui/brave_settings_ui.cc b/browser/ui/webui/brave_settings_ui.cc index 7e82004b3a3b..47e5c3d9e5dc 100644 --- a/browser/ui/webui/brave_settings_ui.cc +++ b/browser/ui/webui/brave_settings_ui.cc @@ -49,8 +49,6 @@ void BraveSettingsUI::AddResources(content::WebUIDataSource* html_source, kBraveSettingsResources[i].value); } - html_source->AddBoolean("isPdfjsDisabled", - extensions::BraveComponentLoader::IsPdfjsDisabled()); const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); html_source->AddBoolean("isSyncDisabled", diff --git a/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc b/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc index 730c27ef15b3..ed04427ead05 100644 --- a/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc +++ b/chromium_src/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc @@ -20,7 +20,6 @@ namespace extensions { bool IsComponentExtensionWhitelisted(const std::string& extension_id) { const char* const kAllowed[] = { brave_extension_id, - pdfjs_extension_id, brave_rewards_extension_id, brave_sync_extension_id, brave_webtorrent_extension_id diff --git a/chromium_src/chrome/common/extensions/chrome_manifest_handlers.cc b/chromium_src/chrome/common/extensions/chrome_manifest_handlers.cc deleted file mode 100644 index 5a6fa9843c6c..000000000000 --- a/chromium_src/chrome/common/extensions/chrome_manifest_handlers.cc +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "brave/common/extensions/manifest_handlers/pdfjs_manifest_override.h" - -#define ExtensionActionHandler PDFJSOverridesHandler -#include "../../../../../chrome/common/extensions/chrome_manifest_handlers.cc" // NOLINT -#undef ExtensionActionHandler - diff --git a/chromium_src/content/browser/renderer_host/render_process_host_impl.cc b/chromium_src/content/browser/renderer_host/render_process_host_impl.cc deleted file mode 100644 index ccc572863192..000000000000 --- a/chromium_src/content/browser/renderer_host/render_process_host_impl.cc +++ /dev/null @@ -1,10 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "brave/content/browser/renderer_host/brave_plugin_registry_impl.h" -#include "content/browser/renderer_host/plugin_registry_impl.h" - -#define PluginRegistryImpl BravePluginRegistryImpl -#include "../../../../../content/browser/renderer_host/render_process_host_impl.cc" -#undef PluginRegistryImpl diff --git a/chromium_src/extensions/common/manifest_handlers/mime_types_handler.cc b/chromium_src/extensions/common/manifest_handlers/mime_types_handler.cc deleted file mode 100644 index 921b5373aa23..000000000000 --- a/chromium_src/extensions/common/manifest_handlers/mime_types_handler.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public -* License, v. 2.0. If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "../../../../extensions/common/manifest_handlers/mime_types_handler.cc" - -// static -std::vector MimeTypesHandler::BraveGetMIMETypeWhitelist() { - std::vector whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); - auto pos = std::find(whitelist.begin(), whitelist.end(), - extension_misc::kPdfExtensionId); - if (pos != whitelist.end()) - whitelist.erase(pos); - return whitelist; -} - diff --git a/chromium_src/third_party/blink/renderer/modules/plugins/navigator_pluginstest.cc b/chromium_src/third_party/blink/renderer/modules/plugins/navigator_pluginstest.cc deleted file mode 100644 index d4c66083384d..000000000000 --- a/chromium_src/third_party/blink/renderer/modules/plugins/navigator_pluginstest.cc +++ /dev/null @@ -1,125 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/path_service.h" -#include "brave/browser/brave_content_browser_client.h" -#include "brave/common/brave_paths.h" -#include "chrome/browser/content_settings/host_content_settings_map_factory.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/common/chrome_content_client.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "chrome/test/base/ui_test_utils.h" -#include "components/content_settings/core/browser/host_content_settings_map.h" -#include "components/content_settings/core/common/content_settings.h" -#include "components/content_settings/core/common/content_settings_types.h" -#include "content/public/test/browser_test_utils.h" - -const char kNavigatorPluginsTest[] = "/navigatorplugins.html"; -const char kNavigatorMimeTypesTest[] = "/navigatormimetypes.html"; -const char kNavigatorMimeTypesTestWithFlash[] = "/navigatormimetypeswithflash.html"; - -const char kFlashPluginExists[] = - "domAutomationController.send(Array.from(navigator.plugins).filter(" - " x => Array.from(x).some(" - " y => y.type === 'application/x-shockwave-flash')).length)"; - -class NavigatorPluginsTest : public InProcessBrowserTest { - public: - void SetUpOnMainThread() override { - InProcessBrowserTest::SetUpOnMainThread(); - - content_client_.reset(new ChromeContentClient); - content::SetContentClient(content_client_.get()); - browser_content_client_.reset(new BraveContentBrowserClient()); - content::SetBrowserClientForTesting(browser_content_client_.get()); - content::SetupCrossSiteRedirector(embedded_test_server()); - - brave::RegisterPathProvider(); - base::FilePath test_data_dir; - base::PathService::Get(brave::DIR_TEST_DATA, &test_data_dir); - embedded_test_server()->ServeFilesFromDirectory(test_data_dir); - - ASSERT_TRUE(embedded_test_server()->Start()); - } - - HostContentSettingsMap * content_settings() { - return HostContentSettingsMapFactory::GetForProfile(browser()->profile()); - } - - void AllowFlash(GURL url) { - content_settings()->SetContentSettingCustomScope( - ContentSettingsPattern::FromString(url.spec()), - ContentSettingsPattern::Wildcard(), - CONTENT_SETTINGS_TYPE_PLUGINS, - std::string(), - CONTENT_SETTING_ALLOW); - } - - void TearDown() override { - browser_content_client_.reset(); - content_client_.reset(); - } - - private: - std::unique_ptr content_client_; - std::unique_ptr browser_content_client_; - base::ScopedTempDir temp_user_data_dir_; -}; - -IN_PROC_BROWSER_TEST_F(NavigatorPluginsTest, ConstPluginsWithoutFlash) { - GURL url = embedded_test_server()->GetURL(kNavigatorPluginsTest); - ui_test_utils::NavigateToURL(browser(), url); - content::WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); - ASSERT_TRUE(content::WaitForLoadStop(contents)); - EXPECT_EQ(url, contents->GetURL()); - - bool constantPlugins; - ASSERT_TRUE(ExecuteScriptAndExtractBool( - contents, - "window.domAutomationController.send(constantPlugins())", - &constantPlugins)); - EXPECT_TRUE(constantPlugins); -} - -IN_PROC_BROWSER_TEST_F(NavigatorPluginsTest, ConstMimeTypesWithoutFlash) { - GURL url = embedded_test_server()->GetURL(kNavigatorMimeTypesTest); - ui_test_utils::NavigateToURL(browser(), url); - content::WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); - ASSERT_TRUE(content::WaitForLoadStop(contents)); - EXPECT_EQ(url, contents->GetURL()); - - bool constantMimeTypes; - ASSERT_TRUE(ExecuteScriptAndExtractBool( - contents, - "window.domAutomationController.send(constantMimeTypes())", - &constantMimeTypes)); - EXPECT_TRUE(constantMimeTypes); -} - - -IN_PROC_BROWSER_TEST_F(NavigatorPluginsTest, ConstPluginsAndMimeTypesWithFlash) { - int len; - GURL url = embedded_test_server()->GetURL(kNavigatorMimeTypesTestWithFlash); - AllowFlash(url); - ui_test_utils::NavigateToURL(browser(), url); - content::WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); - ASSERT_TRUE(content::WaitForLoadStop(contents)); - EXPECT_EQ(url, contents->GetURL()); - - ASSERT_TRUE(ExecuteScriptAndExtractInt(contents, - kFlashPluginExists, &len)); - ASSERT_LE(len, 1); - - // If len == 0, flash is not installed. Skip this test - if (len == 0) { - return; - } - - bool constantMimeTypes; - ASSERT_TRUE(ExecuteScriptAndExtractBool( - contents, - "window.domAutomationController.send(constantMimeTypes())", - &constantMimeTypes)); - EXPECT_TRUE(constantMimeTypes); -} \ No newline at end of file diff --git a/common/BUILD.gn b/common/BUILD.gn index 5f9874d4173b..8f2c287b1d73 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -65,8 +65,6 @@ source_set("common") { "extensions/brave_extensions_api_provider.h", "extensions/extension_constants.cc", "extensions/extension_constants.h", - "extensions/manifest_handlers/pdfjs_manifest_override.cc", - "extensions/manifest_handlers/pdfjs_manifest_override.h", ] public_deps = [ diff --git a/common/brave_switches.cc b/common/brave_switches.cc index 00c86abab79b..f518e2b54ed5 100644 --- a/common/brave_switches.cc +++ b/common/brave_switches.cc @@ -22,9 +22,6 @@ const char kDisableBraveUpdate[] = "disable-brave-update"; const char kDisableChromeGoogleURLTrackingClient[] = "disable-chrome-google-url-tracking-client"; -// Allows disabling the PDFJS extension. -const char kDisablePDFJSExtension[] = "disable-pdfjs-extension"; - // Allows disabling the Tor client updater extension. const char kDisableTorClientUpdaterExtension[] = "disable-tor-client-updater-extension"; diff --git a/common/brave_switches.h b/common/brave_switches.h index 61404a837d18..82350f918351 100644 --- a/common/brave_switches.h +++ b/common/brave_switches.h @@ -18,8 +18,6 @@ extern const char kDisableBraveUpdate[]; extern const char kDisableChromeGoogleURLTrackingClient[]; -extern const char kDisablePDFJSExtension[]; - extern const char kDisableTorClientUpdaterExtension[]; extern const char kDisableWebTorrentExtension[]; diff --git a/common/extensions/brave_pdf_download_browsertest.cc b/common/extensions/brave_pdf_download_browsertest.cc deleted file mode 100644 index 2e2fe5f7e429..000000000000 --- a/common/extensions/brave_pdf_download_browsertest.cc +++ /dev/null @@ -1,211 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public -* License, v. 2.0. If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/run_loop.h" -#include "base/task/post_task.h" -#include "brave/browser/brave_browser_process_impl.h" -#include "brave/browser/extensions/brave_extension_functional_test.h" -#include "brave/common/extensions/extension_constants.h" -#include "chrome/browser/plugins/plugin_utils.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/common/pdf_util.h" -#include "chrome/common/pref_names.h" -#include "chrome/test/base/ui_test_utils.h" -#include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_task_traits.h" -#include "content/public/browser/download_manager.h" -#include "content/public/browser/resource_context.h" -#include "content/public/test/browser_test_utils.h" -#include "content/public/test/test_utils.h" -#include "extensions/browser/extension_registry.h" -#include "extensions/common/constants.h" -#include "extensions/common/manifest_handlers/mime_types_handler.h" -#include "net/url_request/url_request_context.h" -#include "testing/gtest/include/gtest/gtest.h" - -using content::BrowserThread; -using extensions::ExtensionRegistry; - -namespace { - -class DownloadManagerObserverHelper - : public content::DownloadManager::Observer { - public: - DownloadManagerObserverHelper(Browser* browser) - : browser_(browser), download_manager_(nullptr) { - // Set preference to not ask where to save downloads. - browser_->profile()->GetPrefs()->SetBoolean(prefs::kPromptForDownload, - false); - } - - ~DownloadManagerObserverHelper() override { - if (download_manager_) - download_manager_->RemoveObserver(this); - } - - void Observe() { - // Register a download observer. - content::WebContents* contents = - browser_->tab_strip_model()->GetActiveWebContents(); - content::BrowserContext* browser_context = contents->GetBrowserContext(); - download_manager_ = - content::BrowserContext::GetDownloadManager(browser_context); - download_manager_->AddObserver(this); - } - - void CheckForDownload(const GURL& url) { - // Wait for the url to load and check that it loaded. - ASSERT_EQ(url, GetLastUrl()); - // Check that one download has been initiated. - DCHECK(download_manager_); - std::vector downloads; - download_manager_->GetAllDownloads(&downloads); - ASSERT_EQ(1u, downloads.size()); - // Cancel download to shut down cleanly. - downloads[0]->Cancel(false); - } - - const GURL& GetLastUrl() { - // Wait until the download has been created. - download_run_loop_.Run(); - return last_url_; - } - - // content::DownloadManager::Observer implementation. - void OnDownloadCreated(content::DownloadManager* manager, - download::DownloadItem* item) override { - last_url_ = item->GetURL(); - download_run_loop_.Quit(); - } - - private: - Browser* browser_; - content::DownloadManager* download_manager_; - content::NotificationRegistrar registrar_; - base::RunLoop download_run_loop_; - GURL last_url_; -}; - -class IOHelper { -public: - IOHelper(Browser* browser) - : finished_(false), - id_("junk"), - resource_context_(browser->profile()->GetResourceContext()) {} - ~IOHelper() = default; - - void GetExtensionIdForPdf() { - base::PostTaskWithTraitsAndReply( - FROM_HERE, {BrowserThread::IO}, - base::Bind(&IOHelper::GetExtensionIdForPdfOnIOThread, - base::Unretained(this)), - base::Bind(&IOHelper::OnFinished, base::Unretained(this))); - - if (!finished_) - run_loop_.Run(); - } - - void GetExtensionIdForPdfOnIOThread() { - id_ = - PluginUtils::GetExtensionIdForMimeType(resource_context_, kPDFMimeType); - } - - void OnFinished() { - finished_ = true; - run_loop_.Quit(); - } - - std::string& id() { return id_; } - -private: - std::atomic_bool finished_; - std::string id_; - content::ResourceContext* resource_context_; - base::RunLoop run_loop_; -}; - -} //namespace - -class BravePDFDownloadTest : public extensions::ExtensionFunctionalTest { -public: - BravePDFDownloadTest() = default; - ~BravePDFDownloadTest() override = default; - -protected: - bool ShouldEnableInstallVerification() override { - // Simulates behavior in chrome/browser/extensions/install_verifier.cc's - // GetExperimentStatus. -#if (defined(OS_WIN) || defined(OS_MACOSX)) - return true; -#else - return false; -#endif - } - - void SetDownloadPDFs() { - DCHECK(browser()); - browser()->profile()->GetPrefs()->SetBoolean( - prefs::kPluginsAlwaysOpenPdfExternally, true); - } - - void CheckPDFJSExtensionNotLoaded( - ExtensionRegistry* registry) const { - // Verify that the PDFJS extension is not loaded. - EXPECT_FALSE( - registry->enabled_extensions().Contains(pdfjs_extension_id)); - } - - void CheckCantHandlePDFs(const ExtensionRegistry* registry) const { - // Verify that there are no extensions that can handle PDFs, except for the - // Chromium PDF extension which won't be considered due to what is verified - // in the VerifyChromiumPDFExntension test below. - const extensions::ExtensionSet& enabled_extensions = - registry->enabled_extensions(); - for (const auto& extension : enabled_extensions) { - MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension.get()); - if (handler && handler->CanHandleMIMEType(kPDFMimeType)) - ASSERT_STREQ(handler->extension_id().c_str(), - extension_misc::kPdfExtensionId); - } - } -}; - -IN_PROC_BROWSER_TEST_F(BravePDFDownloadTest, VerifyChromiumPDFExntension) { - // On Win and Mac extension install verification puts blacklisted - // Chromium PDF extension into disabled extensions. -#if (defined(OS_WIN) || defined(OS_MACOSX)) - ExtensionRegistry* registry = - ExtensionRegistry::Get(browser()->profile()); - EXPECT_TRUE( - registry->disabled_extensions().Contains(extension_misc::kPdfExtensionId)); -#endif - // On all platforms we modified whitelist to make sure Chromium PDF - // extension is not considered for PDF handling. - IOHelper helper(browser()); - helper.GetExtensionIdForPdf(); - EXPECT_EQ(helper.id(), std::string()); -} - -IN_PROC_BROWSER_TEST_F(BravePDFDownloadTest, DownloadPDF) { - ExtensionRegistry* registry = - ExtensionRegistry::Get(browser()->profile()); - CheckPDFJSExtensionNotLoaded(registry); - - // Set preference to always download PDFs and check that we can't handle PDFs. - SetDownloadPDFs(); - // Since in browser tests the extension is not actually loaded we don't have - // to wait here to ensure the extension has been unloaded. - CheckCantHandlePDFs(registry); - - // Register a download observer. - DownloadManagerObserverHelper helper(browser()); - helper.Observe(); - // Navigate to a pdf. - GURL url(embedded_test_server()->GetURL("/test.pdf")); - ui_test_utils::NavigateToURL(browser(), url); - // Check that one download has been initiated. - helper.CheckForDownload(url); -} - diff --git a/common/extensions/extension_constants.cc b/common/extensions/extension_constants.cc index c129c9c63523..d83b0433a8fc 100644 --- a/common/extensions/extension_constants.cc +++ b/common/extensions/extension_constants.cc @@ -13,16 +13,6 @@ const char widevine_extension_id[] = "oimompecagnajdejgnnjijobebaeigek"; const char brave_sync_extension_id[] = "nomlkjnggnifocmealianaaiobmebgil"; const char crl_set_extension_id[] = "hfnkpimlhhgieaddgfemjhofmfblmnib"; -const char pdfjs_extension_id[] = "oemmndcbldboiebfnladdacbdfmadadm"; -const char pdfjs_extension_name[] = "PDF Viewer (PDF.js)"; -const char pdfjs_extension_public_key[] = - "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDb5PIb8ayK6vHvEIY1nJKRSCDE8iJ1T43qFN" - "+5dvCVQrmyEkgqB9ZuZNT24Lwot96HV51VoITHKRNIVKI2Nrbfn0M49t7qtaP34g/" - "GXJ7mAIbSzsY4+i+" - "Wsz8EL2SNEIw6uH8RmXG7nZ29NJ7sk7jn17QmMsO2UJ01UT8hfOOOEQIDAQAB"; -const char pdfjs_extension_origin[] = - "chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/"; - const char ipfs_companion_extension_id[] = "nibjojkomfdiaoajekhjakgkdhaomnch"; const char ipfs_companion_extension_name[] = "IPFS Companion"; const char ipfs_companion_extension_public_key[] = diff --git a/common/extensions/extension_constants.h b/common/extensions/extension_constants.h index a5a8af8a23f9..5953c2c0660e 100644 --- a/common/extensions/extension_constants.h +++ b/common/extensions/extension_constants.h @@ -14,11 +14,6 @@ extern const char widevine_extension_id[]; extern const char brave_sync_extension_id[]; extern const char crl_set_extension_id[]; -extern const char pdfjs_extension_id[]; -extern const char pdfjs_extension_name[]; -extern const char pdfjs_extension_public_key[]; -extern const char pdfjs_extension_origin[]; - extern const char ipfs_companion_extension_id[]; extern const char ipfs_companion_extension_name[]; extern const char ipfs_companion_extension_public_key[]; diff --git a/common/extensions/manifest_handlers/pdfjs_manifest_override.cc b/common/extensions/manifest_handlers/pdfjs_manifest_override.cc deleted file mode 100644 index b582c2fe1435..000000000000 --- a/common/extensions/manifest_handlers/pdfjs_manifest_override.cc +++ /dev/null @@ -1,26 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "brave/common/extensions/extension_constants.h" -#include "brave/common/extensions/manifest_handlers/pdfjs_manifest_override.h" -#include "chrome/common/extensions/api/extension_action/action_info.h" -#include "extensions/common/extension.h" - -namespace extensions { - -PDFJSOverridesHandler::PDFJSOverridesHandler() { -} - -PDFJSOverridesHandler::~PDFJSOverridesHandler() { -} - -bool PDFJSOverridesHandler::Parse(Extension* extension, base::string16* error) { - bool result = ExtensionActionHandler::Parse(extension, error); - if (extension && extension->id() == pdfjs_extension_id) { - ActionInfo::SetPageActionInfo(extension, nullptr); - } - return result; -} - -} // namespace extensions diff --git a/common/extensions/manifest_handlers/pdfjs_manifest_override.h b/common/extensions/manifest_handlers/pdfjs_manifest_override.h deleted file mode 100644 index 9630ff21cb48..000000000000 --- a/common/extensions/manifest_handlers/pdfjs_manifest_override.h +++ /dev/null @@ -1,26 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef BRAVE_COMMON_EXTENSIONS_MANIFEST_HANDLERS_PDFJS_OVERRIDES_HANDLER_H_ -#define BRAVE_COMMON_EXTENSIONS_MANIFEST_HANDLERS_PDFJS_OVERRIDES_HANDLER_H_ - -#include "chrome/common/extensions/manifest_handlers/extension_action_handler.h" - -namespace extensions { - -// We want PDFJS, but we don't want the PDFJS page action -// This needs to be a subclass because you can't have 2 manifest handlers -// for the same keys. -class PDFJSOverridesHandler : public ExtensionActionHandler { - public: - PDFJSOverridesHandler(); - ~PDFJSOverridesHandler() override; - bool Parse(Extension* extension, base::string16* error) override; - - private: - DISALLOW_COPY_AND_ASSIGN(PDFJSOverridesHandler); -}; - -} // namespace extensions -#endif // BRAVE_COMMON_EXTENSIONS_MANIFEST_HANDLERS_PDFJS_OVERRIDES_HANDLER_H_ diff --git a/content/browser/renderer_host/brave_plugin_registry_impl.cc b/content/browser/renderer_host/brave_plugin_registry_impl.cc deleted file mode 100644 index 5cb6e4724024..000000000000 --- a/content/browser/renderer_host/brave_plugin_registry_impl.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "brave/content/browser/renderer_host/brave_plugin_registry_impl.h" - -#include "base/strings/utf_string_conversions.h" -#include "content/public/common/content_constants.h" - -namespace content { - -BravePluginRegistryImpl::BravePluginRegistryImpl(ResourceContext* resource_context) - : PluginRegistryImpl(resource_context) {} - -BravePluginRegistryImpl::~BravePluginRegistryImpl() {} - -void BravePluginRegistryImpl::GetPluginsComplete(GetPluginsCallback callback, - std::vector plugins) { - std::vector filtered_plugins; - - for(std::vector::iterator it = plugins.begin(); - it != plugins.end(); ++it) { - if ((*it) && (*it)->name == base::ASCIIToUTF16(kFlashPluginName)) { - filtered_plugins.push_back(std::move(*it)); - } - } - std::move(callback).Run(std::move(filtered_plugins)); -} - -void BravePluginRegistryImpl::GetPlugins(bool refresh, - const url::Origin& main_frame_origin, - GetPluginsCallback callback) { - PluginRegistryImpl::GetPlugins(refresh, main_frame_origin, - base::BindOnce( - &BravePluginRegistryImpl::GetPluginsComplete, base::Unretained(this), - std::move(callback))); -} - -} // namespace content \ No newline at end of file diff --git a/content/browser/renderer_host/brave_plugin_registry_impl.h b/content/browser/renderer_host/brave_plugin_registry_impl.h deleted file mode 100644 index 4010ba1659fc..000000000000 --- a/content/browser/renderer_host/brave_plugin_registry_impl.h +++ /dev/null @@ -1,29 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef BRAVE_CONTENT_BROWSER_RENDERER_HOST_PLUGIN_REGISTRY_IMPL_H_ -#define BRAVE_CONTENT_BROWSER_RENDERER_HOST_PLUGIN_REGISTRY_IMPL_H_ - -#include "content/browser/renderer_host/plugin_registry_impl.h" - -namespace content { - -class ResourceContext; - -class BravePluginRegistryImpl : public PluginRegistryImpl { - public: - BravePluginRegistryImpl(ResourceContext* resource_context); - ~BravePluginRegistryImpl() override; - - void GetPlugins(bool refresh, - const url::Origin& main_frame_origin, - GetPluginsCallback callback) override; - private: - void GetPluginsComplete(GetPluginsCallback callback, - std::vector plugins); -}; - -} // namespace content - -#endif // BRAVE_CONTENT_BROWSER_RENDERER_HOST_PLUGIN_REGISTRY_IMPL_H_ \ No newline at end of file diff --git a/patches/chrome-browser-extensions-install_verifier.cc.patch b/patches/chrome-browser-extensions-install_verifier.cc.patch deleted file mode 100644 index 8b113d7c6788..000000000000 --- a/patches/chrome-browser-extensions-install_verifier.cc.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/chrome/browser/extensions/install_verifier.cc b/chrome/browser/extensions/install_verifier.cc -index 23b122e8627a262388927734317a1582b73542ff..d8ed84fe97b9000b38db1cd1dffa9c410ccb2df4 100644 ---- a/chrome/browser/extensions/install_verifier.cc -+++ b/chrome/browser/extensions/install_verifier.cc -@@ -16,6 +16,7 @@ - #include "base/one_shot_event.h" - #include "base/stl_util.h" - #include "base/trace_event/trace_event.h" -+#include "brave/common/extensions/extension_constants.h" - #include "build/build_config.h" - #include "chrome/browser/extensions/extension_management.h" - #include "chrome/browser/extensions/extension_service.h" -@@ -213,6 +214,10 @@ bool InstallVerifier::NeedsVerification(const Extension& extension) { - - // static - bool InstallVerifier::IsFromStore(const Extension& extension) { -+ // Do not fetch signatures for PDFJS which is hosted by Brave, not CWS -+ if (extension.id() == pdfjs_extension_id) { -+ return false; -+ } - return extension.from_webstore() || - ManifestURL::UpdatesFromGallery(&extension); - } diff --git a/patches/chrome-browser-plugins-plugin_utils.cc.patch b/patches/chrome-browser-plugins-plugin_utils.cc.patch deleted file mode 100644 index 950008b2643a..000000000000 --- a/patches/chrome-browser-plugins-plugin_utils.cc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/chrome/browser/plugins/plugin_utils.cc b/chrome/browser/plugins/plugin_utils.cc -index 01ea0ba7f0cb8a1ce2ee56a1a918d200159b4994..d77a8289ec8b07179b1ba2e89701d1132cd5920f 100644 ---- a/chrome/browser/plugins/plugin_utils.cc -+++ b/chrome/browser/plugins/plugin_utils.cc -@@ -184,7 +184,8 @@ PluginUtils::GetMimeTypeToExtensionIdMap( - bool profile_is_off_the_record = io_data->IsOffTheRecord(); - const scoped_refptr extension_info_map( - io_data->GetExtensionInfoMap()); -- std::vector whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); -+ std::vector whitelist = -+ MimeTypesHandler::BraveGetMIMETypeWhitelist(); - // Go through the white-listed extensions and try to use them to intercept - // the URL request. - for (const std::string& extension_id : whitelist) { diff --git a/patches/chrome-browser-resources-settings-site_settings-pdf_documents.js.patch b/patches/chrome-browser-resources-settings-site_settings-pdf_documents.js.patch deleted file mode 100644 index 8f5cf649fa18..000000000000 --- a/patches/chrome-browser-resources-settings-site_settings-pdf_documents.js.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/chrome/browser/resources/settings/site_settings/pdf_documents.js b/chrome/browser/resources/settings/site_settings/pdf_documents.js -index 66f61a6db59bc5a549db3ec505518462f72b5cb7..dc96ac708d68be5f82972aa3273e38ce687b61ab 100644 ---- a/chrome/browser/resources/settings/site_settings/pdf_documents.js -+++ b/chrome/browser/resources/settings/site_settings/pdf_documents.js -@@ -17,4 +17,12 @@ Polymer({ - notify: true, - }, - }, -+ -+ /** @override */ -+ ready: function () { -+ if (loadTimeData.getBoolean('isPdfjsDisabled')) { -+ this.$.toggle.disabled = true; -+ this.$.toggle.checked = true; -+ } -+ }, - }); diff --git a/patches/chrome-common-chrome_content_client_constants.cc.patch b/patches/chrome-common-chrome_content_client_constants.cc.patch new file mode 100644 index 000000000000..d87ba8aa463d --- /dev/null +++ b/patches/chrome-common-chrome_content_client_constants.cc.patch @@ -0,0 +1,16 @@ +diff --git a/chrome/common/chrome_content_client_constants.cc b/chrome/common/chrome_content_client_constants.cc +index a8365688d3ea165e26bc6a9e1b1851cbacaf59b2..a4f7083b44b8c6d9614bc5f1d72ddd78ff602900 100644 +--- a/chrome/common/chrome_content_client_constants.cc ++++ b/chrome/common/chrome_content_client_constants.cc +@@ -19,9 +19,9 @@ const char ChromeContentClient::kPDFExtensionPluginName[] = "Chrome PDF Viewer"; + const char ChromeContentClient::kPDFInternalPluginName[] = "Chrome PDF Plugin"; + #else + const char ChromeContentClient::kPDFExtensionPluginName[] = +- "Chromium PDF Viewer"; ++ "Chrome PDF Viewer"; + const char ChromeContentClient::kPDFInternalPluginName[] = +- "Chromium PDF Plugin"; ++ "Chrome PDF Plugin"; + #endif + + const base::FilePath::CharType ChromeContentClient::kPDFPluginPath[] = diff --git a/patches/content-browser-BUILD.gn.patch b/patches/content-browser-BUILD.gn.patch deleted file mode 100644 index bd04f5712205..000000000000 --- a/patches/content-browser-BUILD.gn.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 38b6a3185b14e4b2152cfa9f274c6bf0057c567e..3d6412ed7fc81529dfb2373de62aa8c1079b75cd 100644 ---- a/content/browser/BUILD.gn -+++ b/content/browser/BUILD.gn -@@ -2208,6 +2208,12 @@ jumbo_source_set("browser") { - "//ppapi/proxy:ipc", - "//ppapi/shared_impl", - ] -+ if (brave_chromium_build) { -+ sources += [ -+ "//brave/content/browser/renderer_host/brave_plugin_registry_impl.cc", -+ "//brave/content/browser/renderer_host/brave_plugin_registry_impl.h", -+ ] -+ } - if (is_linux) { - deps += [ "//components/services/font:ppapi_fontconfig_matching" ] - } diff --git a/patches/extensions-common-manifest_handlers-mime_types_handler.h.patch b/patches/extensions-common-manifest_handlers-mime_types_handler.h.patch deleted file mode 100644 index c8591f5fb133..000000000000 --- a/patches/extensions-common-manifest_handlers-mime_types_handler.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/extensions/common/manifest_handlers/mime_types_handler.h b/extensions/common/manifest_handlers/mime_types_handler.h -index 22dfd725f130ebbd8096f7a37174d2c1ce50ff4e..9afcf52ef12e170e588e5f90a644e350c4e99bc2 100644 ---- a/extensions/common/manifest_handlers/mime_types_handler.h -+++ b/extensions/common/manifest_handlers/mime_types_handler.h -@@ -17,6 +17,7 @@ class MimeTypesHandler { - public: - // Returns list of extensions' ids that are allowed to use MIME type filters. - static std::vector GetMIMETypeWhitelist(); -+ static std::vector BraveGetMIMETypeWhitelist(); - - static MimeTypesHandler* GetHandler(const extensions::Extension* extension); - diff --git a/test/BUILD.gn b/test/BUILD.gn index d630b5df5d96..1a8d38d7cd7f 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -315,8 +315,6 @@ test("brave_browser_tests") { "//brave/chromium_src/components/content_settings/core/browser/brave_content_settings_registry_browsertest.cc", "//brave/chromium_src/third_party/blink/renderer/modules/battery/navigator_batterytest.cc", "//brave/chromium_src/third_party/blink/renderer/modules/bluetooth/navigator_bluetoothtest.cc", - "//brave/chromium_src/third_party/blink/renderer/modules/plugins/navigator_pluginstest.cc", - "//brave/common/extensions/brave_pdf_download_browsertest.cc", "//brave/browser/autoplay/autoplay_permission_context_browsertest.cc", "//brave/browser/brave_content_browser_client_browsertest.cc", "//brave/browser/brave_features_browsertest.cc", @@ -350,7 +348,6 @@ test("brave_browser_tests") { "//brave/components/brave_shields/browser/https_everywhere_service_browsertest.cc", "//brave/components/brave_shields/browser/referrer_whitelist_service_browsertest.cc", "//brave/components/brave_shields/browser/tracking_protection_service_browsertest.cc", - "//brave/browser/extensions/brave_component_loader_browsertest.cc", "//brave/browser/extensions/brave_extension_provider_browsertest.cc", "//brave/renderer/brave_content_settings_observer_browsertest.cc", "//brave/renderer/brave_content_settings_observer_autoplay_browsertest.cc", diff --git a/test/data/navigatormimetypes.html b/test/data/navigatormimetypes.html deleted file mode 100644 index 7045499c817c..000000000000 --- a/test/data/navigatormimetypes.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test/data/navigatormimetypeswithflash.html b/test/data/navigatormimetypeswithflash.html deleted file mode 100644 index 65c11084368b..000000000000 --- a/test/data/navigatormimetypeswithflash.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test/data/navigatorplugins.html b/test/data/navigatorplugins.html deleted file mode 100644 index 59d8d0b53f38..000000000000 --- a/test/data/navigatorplugins.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test/data/pdfjs.crx b/test/data/pdfjs.crx deleted file mode 100644 index 2f6f388e6124..000000000000 Binary files a/test/data/pdfjs.crx and /dev/null differ diff --git a/test/data/pdfjs.pem b/test/data/pdfjs.pem deleted file mode 100644 index 420f2a527cd3..000000000000 --- a/test/data/pdfjs.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCgKsBrWk6QJq4a -ZSBnm15b9Ljw92Aot3XPKGEEj5AiLwR5rVfk3sOt2vn3GbW55LwOndBJg4WOtxAb -qERRsU/GbZQXeFCLJvrwK6o2/3wrfanzdR6aLvXX5TsQbJZ/Pdlj8PQZtcLPQZ4b -PI9LIX/noq1QMaqLVpiOtOr7h6Ad9itVg+FwQwaM7km/TKHn5r4y/OMcdnybyV+p -iakptt6rSjRcZNMHhw5Nl+4IyjuhYjqmIBiK3SkMO3/ne5hIwmmfr1hg3Tytk59I -s9XjC7/mhzZ3DythaQb6P4Zt23uCTcyM+5Rq8tzdqILGaP2ze4tNJMXGdUVIURNa -ToScQ/frAgMBAAECggEABxg9s8OpTTtZZPPrzosUT/B0LMBYcxVFU6rPOVt+n/UD -NryV8x5m/pF/lxF9ekGGjwMwkcEQrnSvcvouJIw9I2YBNFTxBGjynqbggFUq0+Za -G92pQF0qKKkPx7d3pyU/Nu0acvUZLwMSFNTG6CYQu1r6YF4C1u88DL441nF4hzsp -QKFBuc2AktTTZwNMP7d/vqTTuUK9ZC1yTdQqA12si1kWrOi5NXW8IbcC3gS1iLnb -ukwC25WWERkqnUV9rbw3cXYcvaFHh000WELHPOwfPeu/gNeiYV3z5FdZt+nlD0/M -Y7P8KszwcEbzMbdFQUIw+PHQtScPAaSIxmZneDokSQKBgQDg1IdnAxyGRl8l4Czy -OMQmkmSp11pgv96OxNwDF0HIW/xQ+IqrH9pXuhOjbnl2XpD7OapwEUjiKgAQE5Qz -bxlA4+pAA/jBGxjhgHAUz9bXJtHWcOHd8RaCJc47m0vyTM893tqcz+Qb4FkTcnHb -yJxU7fgOwYeJKd/aqB4drXLaJQKBgQC2X0E7GsQNyFTq6ySwkI6qfHoIO0fKeM/g -kNyTrtYZITdPl8H7nsA87hHdVuRBNdHTNRpJAbJ3gFOf8B0aUHRoshvZ3Ni9e6nG -YiLRPT0vHc1pfvpP6GaDkcDq8Uh2JJNOnSoPyYWEecrwotmBSV3TPYHBbYlHTPTB -kHya5/kEzwKBgFq3BgcXZ0v6WuvCXwBAzUwu5zTsMog1Aoyie483tBAupUjab8EK -MiQRbVkU+yc6ks76/n0HTFwMzEewTqzOF+dpzpuTvqvTzh82noKXNb1L6YDXvRq6 -6vUKYgME7wjN2xTAtX5uF0D0LZy+IZinggR2nA8AITrDzZHBIZ2h3WSNAoGAI5ud -pOio9vfyfJvE4iSXdnovaYQJlGLaU8J1DvDIJMfzgLrkyThJ2JuzKUBZ+NGFUnO/ -2hlWuzZ3HXdId2bWE8sS3Qrd1sFaeL2YhroqRBTRkpOUVB3QRkgjHrxVpZuml2bg -W4zBYQhWs31YcoHcq+4Kc7XrY9yGvXR0n9pDKMkCgYEAoijwHs+R6ypJMKXFMyZZ -2P7hurR8g7BEu1w/DmIb5Vc7O6OLPi5PL/g1BlBUEPTRtSwXNru1R9IVOXsj2+Ei -o2J+ALM1Z+euOsq6qYNrxEikzXAbbYcFwBvljExELkKL9EvqYTXydYYIMLT1gcj9 -soPsw/2nNHrJaxsFnyYE3nU= ------END PRIVATE KEY----- diff --git a/test/data/test.pdf b/test/data/test.pdf deleted file mode 100644 index 6da424d1f3fd..000000000000 Binary files a/test/data/test.pdf and /dev/null differ