Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1427)

Unified Diff: chrome/browser/extensions/extension_startup_unittest.cc

Issue 418043: Remove --enable-user-script and associated tests. (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_startup_unittest.cc
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index f076b3710e58f10bbb8d7eacf2e6ac1de7b9eb22..d524bd001a73c2ff4b023831c03057a863ae9672 100644
--- a/chrome/browser/extensions/extension_startup_unittest.cc
+++ b/chrome/browser/extensions/extension_startup_unittest.cc
@@ -30,8 +30,7 @@
class ExtensionStartupTestBase
: public InProcessBrowserTest, public NotificationObserver {
public:
- ExtensionStartupTestBase()
- : enable_extensions_(false), enable_user_scripts_(false) {
+ ExtensionStartupTestBase() : enable_extensions_(false) {
}
protected:
@@ -61,21 +60,6 @@ class ExtensionStartupTestBase
command_line->AppendSwitch(switches::kDisableExtensions);
}
- if (enable_user_scripts_) {
- command_line->AppendSwitch(switches::kEnableUserScripts);
-
- FilePath src_dir;
- PathService::Get(chrome::DIR_TEST_DATA, &src_dir);
- src_dir = src_dir.AppendASCII("extensions").AppendASCII("good")
- .AppendASCII("Extensions")
- .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj")
- .AppendASCII("1.0.0.0");
-
- file_util::CreateDirectory(user_scripts_dir_);
- file_util::CopyFile(src_dir.AppendASCII("script2.js"),
- user_scripts_dir_.AppendASCII("script2.user.js"));
- }
-
if (!load_extension_.value().empty()) {
command_line->AppendSwitchWithValue(switches::kLoadExtension,
load_extension_.ToWStringHack());
@@ -156,7 +140,6 @@ class ExtensionStartupTestBase
FilePath extensions_dir_;
FilePath user_scripts_dir_;
bool enable_extensions_;
- bool enable_user_scripts_;
FilePath load_extension_;
NotificationRegistrar registrar_;
};
@@ -201,34 +184,3 @@ IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, Test) {
WaitForServicesToStart(1, false);
TestInjection(true, true);
}
-
-
-// ExtensionsStartupUserScriptTest
-// Tests that we can startup with --enable-user-scripts and run user scripts and
-// see them do basic things.
-
-class ExtensionsStartupUserScriptTest : public ExtensionStartupTestBase {
- public:
- ExtensionsStartupUserScriptTest() {
- enable_user_scripts_ = true;
- }
-};
-
-IN_PROC_BROWSER_TEST_F(ExtensionsStartupUserScriptTest, Test) {
- WaitForServicesToStart(0, false);
- TestInjection(false, true);
-}
-
-// Ensure we don't inject into chrome:// URLs
-IN_PROC_BROWSER_TEST_F(ExtensionsStartupUserScriptTest, NoInjectIntoChrome) {
- WaitForServicesToStart(0, false);
-
- ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab"));
-
- bool result = false;
- ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->render_view_host(), L"",
- L"window.domAutomationController.send(document.title == 'Modified')",
- &result);
- EXPECT_FALSE(result);
-}
« no previous file with comments | « no previous file | chrome/browser/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698