| Index: chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
|
| diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
|
| index 4f3a2c94f9d6e3fd4cb2f1cd9bd7f344fdea44b2..3e95d4b64f869f4fb80209a3a13736650deb0ce3 100644
|
| --- a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
|
| +++ b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "extensions/common/manifest_handlers/csp_info.h"
|
| #include "extensions/common/manifest_handlers/incognito_info.h"
|
| #include "extensions/common/switches.h"
|
| +#include "extensions/common/test/scoped_command_line_switch.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace extensions {
|
| @@ -68,9 +69,8 @@ TEST_F(PlatformAppsManifestTest, PlatformAppContentSecurityPolicy) {
|
| // The whitelisted extension ID is cached the first time it is used, so set it
|
| // before running the test. This is the ID corresponding to the base 64
|
| // encoded key in the init_platform_app_csp.json manifest.
|
| - std::string test_id = "ahplfneplbnjcflhdgkkjeiglkkfeelb";
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
| - switches::kWhitelistedExtensionID, test_id);
|
| + ScopedCommandLineSwitch command_line(switches::kWhitelistedExtensionID,
|
| + "ahplfneplbnjcflhdgkkjeiglkkfeelb");
|
|
|
| // Normal platform apps can't specify a CSP value.
|
| Testcase warning_testcases[] = {
|
| @@ -142,7 +142,7 @@ TEST_F(PlatformAppsManifestTest, CertainApisRequirePlatformApps) {
|
| }
|
|
|
| // Now try again with the experimental flag set.
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| + ScopedCommandLineSwitch command_line(
|
| switches::kEnableExperimentalExtensionApis);
|
| for (size_t i = 0; i < arraysize(kPlatformAppExperimentalApis); ++i) {
|
| LoadAndExpectSuccess(ManifestData(manifests[i].get(), ""));
|
|
|