OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/extensions/extension_apitest.h" | |
6 #include "extensions/common/feature_switch.h" | |
7 #include "extensions/common/switches.h" | |
8 | |
9 using extensions::Extension; | |
10 using extensions::FeatureSwitch; | |
11 | |
12 class ExtensionOptionsApiTest : public ExtensionApiTest { | |
13 private: | |
14 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | |
15 command_line->AppendSwitch( | |
16 extensions::switches::kEnableEmbeddedExtensionOptions); | |
Devlin
2014/07/16 20:55:06
Why do we need to modify the command line _and_ us
ericzeng
2014/07/16 22:27:37
The feature switch does not get copied over to the
| |
17 ExtensionApiTest::SetUpCommandLine(command_line); | |
18 } | |
19 }; | |
20 | |
21 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, EmbedOptionsInExtension) { | |
22 FeatureSwitch::ScopedOverride enable_options( | |
23 FeatureSwitch::embedded_extension_options(), true); | |
24 | |
25 const Extension* extension = | |
26 InstallExtension(test_data_dir_.AppendASCII("extension_options") | |
27 .AppendASCII("embed_self"), 1); | |
28 ASSERT_TRUE(extension); | |
29 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html")); | |
30 } | |
OLD | NEW |