summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 00:28:43 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 00:28:43 +0000
commit5e7799eecfa75a143feee3d0a1372232d2650ea2 (patch)
treeb640e3e1312b8d9e85ae498525be6f686e2ae70d /chrome/browser/extensions
parentb78f813dbb363f392d79401e6a365edc49423323 (diff)
downloadchromium_src-5e7799eecfa75a143feee3d0a1372232d2650ea2.zip
chromium_src-5e7799eecfa75a143feee3d0a1372232d2650ea2.tar.gz
chromium_src-5e7799eecfa75a143feee3d0a1372232d2650ea2.tar.bz2
Merge 32987 - Remove enableuserscript and associated tests.
This doesn't remove the underlying support from UserScriptMaster; that is a riskier change. BUG=27520 Review URL: http://codereview.chromium.org/418043 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/436038 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_startup_unittest.cc50
1 files changed, 1 insertions, 49 deletions
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index 00089ae..2ec4701 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());
@@ -159,7 +143,6 @@ class ExtensionStartupTestBase
FilePath extensions_dir_;
FilePath user_scripts_dir_;
bool enable_extensions_;
- bool enable_user_scripts_;
FilePath load_extension_;
NotificationRegistrar registrar_;
};
@@ -204,34 +187,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);
-}