Revert the disabling of WebSQL after finding extension breakage
Speed dial extension was affected; may impact others too. Fixes https://github.com/brave/brave-browser/issues/8542 ----- Revert "Merge pull request #4463 from brave/disable_websql" This reverts commita50fa1df5d, reversing changes made tocd4edd37b8.
This commit is contained in:
@@ -152,8 +152,6 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
command_line.AppendSwitchASCII(switches::kSyncServiceURL,
|
||||
"https://no-thanks.invalid");
|
||||
|
||||
command_line.AppendSwitch(switches::kDisableDatabases);
|
||||
|
||||
// Enabled features.
|
||||
const std::unordered_set<const char*> enabled_features = {
|
||||
// Upgrade all mixed content
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "components/password_manager/core/common/password_manager_features.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "gpu/config/gpu_finch_features.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
@@ -40,11 +39,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisableHyperlinkAuditing) {
|
||||
EXPECT_FALSE(prefs.hyperlink_auditing_enabled);
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisableWebSQL) {
|
||||
EXPECT_TRUE(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kDisableDatabases));
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
|
||||
const base::Feature* disabled_features[] = {
|
||||
&autofill::features::kAutofillServerCommunication,
|
||||
|
||||
@@ -1,43 +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 "base/path_service.h"
|
||||
#include "brave/common/brave_paths.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/test/base/in_process_browser_test.h"
|
||||
#include "chrome/test/base/ui_test_utils.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/test/browser_test_utils.h"
|
||||
|
||||
class WebSQLDisabledTest : public InProcessBrowserTest {
|
||||
public:
|
||||
void SetUpOnMainThread() override {
|
||||
InProcessBrowserTest::SetUpOnMainThread();
|
||||
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());
|
||||
}
|
||||
};
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(WebSQLDisabledTest, IsDisabled) {
|
||||
GURL url = embedded_test_server()->GetURL("/simple.html");
|
||||
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 websql_blocked;
|
||||
ASSERT_TRUE(ExecuteScriptAndExtractBool(
|
||||
contents,
|
||||
"window.domAutomationController.send(window.openDatabase == undefined)",
|
||||
&websql_blocked));
|
||||
EXPECT_TRUE(websql_blocked);
|
||||
}
|
||||
@@ -524,7 +524,6 @@ test("brave_browser_tests") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"//brave/app/brave_main_delegate_browsertest.cc",
|
||||
"//brave/app/websql_browsertest.cc",
|
||||
"//brave/browser/autocomplete/brave_autocomplete_provider_client_browsertest.cc",
|
||||
"//brave/browser/brave_scheme_load_browsertest.cc",
|
||||
"//brave/browser/autoplay/autoplay_permission_context_browsertest.cc",
|
||||
|
||||
Reference in New Issue
Block a user