Revert 197227 "Change load-extension command line argument to us..."
We patched dbus-send on cros, so this workaround is not needed.
BUG=240540,234781
> Change load-extension command line argument to use semicolon as a delimiter for each extension to load in addition to commas
>
> This is a workaround for an issue in which dbus-send does not permit commas in arrays of strings.
>
> BUG=234781
> TEST=new unit tests for delimiters
>
> Review URL: https://chromiumcodereview.appspot.com/13863019
[email protected]
Review URL: https://codereview.chromium.org/15349003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200911 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index 4d3def3..e1f841e 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -42,21 +42,13 @@
}
protected:
- // The extension paths for the load-extension argument can be separated
- // by either commas or semicolons, and this method will be overriden
- // so we can test for both.
- virtual base::FilePath::StringType JoinExtensions(
- const std::vector<base::FilePath::StringType>& extensions) const {
- return JoinString(extensions, ',');
- }
-
// InProcessBrowserTest
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
if (!enable_extensions_)
command_line->AppendSwitch(switches::kDisableExtensions);
if (!load_extensions_.empty()) {
- base::FilePath::StringType paths = JoinExtensions(load_extensions_);
+ base::FilePath::StringType paths = JoinString(load_extensions_, ',');
command_line->AppendSwitchNative(switches::kLoadExtension,
paths);
command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck);
@@ -243,7 +235,6 @@
// ExtensionsLoadMultipleTest
// Ensures that we can startup the browser with multiple extensions
// via --load-extension=X1,X2,X3.
-
class ExtensionsLoadMultipleTest : public ExtensionStartupTestBase {
public:
ExtensionsLoadMultipleTest() {
@@ -281,62 +272,7 @@
}
};
-// ExtensionsLoadMultipleTestSemicolon
-// Ensures that we can startup the browser with multiple extensions
-// when the extension paths are delimited by semicolons
-// eg. --load-extension=X1;X2;X3
-
-class ExtensionsLoadMultipleTestSemicolon
- : public ExtensionsLoadMultipleTest {
- protected:
- virtual base::FilePath::StringType JoinExtensions(
- const std::vector<base::FilePath::StringType>&
- extensions) const OVERRIDE {
- return JoinString(extensions, ';');
- }
-};
-
-// ExtensionsLoadMultipleTestMixedDelimited
-// Ensures that we can startup the browser with multiple extensions
-// when the extension paths are delimited by a mixture of commas and semicolons
-// eg. --load-extension=X1,X2;X3,X4
-
-class ExtensionsLoadMultipleTestMixedDelimited
- : public ExtensionsLoadMultipleTest {
- protected:
- virtual base::FilePath::StringType JoinExtensions(
- const std::vector<base::FilePath::StringType>&
- extensions) const OVERRIDE {
- if (extensions.empty()) {
- return base::FilePath::StringType();
- }
-
- std::vector<base::FilePath::StringType>::const_iterator it
- = extensions.begin();
- base::FilePath::StringType result = *it;
- int count = 0;
- for (it = extensions.begin();
- it != extensions.end(); ++count, ++it) {
- char delimiter = count % 2 == 0 ? ',' : ';';
- result += delimiter;
- result += *it;
- }
-
- return result;
- }
-};
-
IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) {
WaitForServicesToStart(4, true);
TestInjection(true, true);
}
-
-IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTestSemicolon, Test) {
- WaitForServicesToStart(4, true);
- TestInjection(true, true);
-}
-
-IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTestMixedDelimited, Test) {
- WaitForServicesToStart(4, true);
- TestInjection(true, true);
-}