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

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

Issue 1054813002: Refactor ScopedCommandLineSwitch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@whitelisted
Patch Set: Created 5 years, 9 months 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/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/permission_message_combinations_unittest.cc
diff --git a/chrome/browser/extensions/permission_message_combinations_unittest.cc b/chrome/browser/extensions/permission_message_combinations_unittest.cc
index 819c52dc7a6c5f53b0da40d6f3a66d79d19cc02f..7f13c09ce107403cbc1a27a56a4abf39cc29c55c 100644
--- a/chrome/browser/extensions/permission_message_combinations_unittest.cc
+++ b/chrome/browser/extensions/permission_message_combinations_unittest.cc
@@ -11,6 +11,7 @@
#include "extensions/common/permissions/permission_message_test_util.h"
#include "extensions/common/permissions/permissions_data.h"
#include "extensions/common/switches.h"
+#include "extensions/common/test/scoped_command_line_switch.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -32,8 +33,8 @@ class PermissionMessageCombinationsUnittest : public testing::Test {
// Whitelist a known extension id so we can test all permissions. This ID
// will be used for each test app.
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kWhitelistedExtensionID, "ahplfneplbnjcflhdgkkjeiglkkfeelb");
+ command_line_.reset(new ScopedCommandLineSwitch(
+ switches::kWhitelistedExtensionID, "ahplfneplbnjcflhdgkkjeiglkkfeelb"));
}
protected:
@@ -204,6 +205,9 @@ class PermissionMessageCombinationsUnittest : public testing::Test {
extensions::TestExtensionEnvironment env_;
scoped_ptr<ChromePermissionMessageProvider> message_provider_;
scoped_refptr<const Extension> app_;
+ // Whitelist a known extension id so we can test all permissions. This ID
+ // will be used for each test app.
+ scoped_ptr<ScopedCommandLineSwitch> command_line_;
DISALLOW_COPY_AND_ASSIGN(PermissionMessageCombinationsUnittest);
};
« no previous file with comments | « no previous file | chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698