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 // Need to add a command line flag as well as a FeatureSwitch because the |
| 16 // FeatureSwitch is not copied over to the renderer process from the |
| 17 // browser process. |
| 18 command_line->AppendSwitch( |
| 19 extensions::switches::kEnableEmbeddedExtensionOptions); |
| 20 ExtensionApiTest::SetUpCommandLine(command_line); |
| 21 } |
| 22 }; |
| 23 |
| 24 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, ExtensionCanEmbedOwnOptions) { |
| 25 FeatureSwitch::ScopedOverride enable_options( |
| 26 FeatureSwitch::embedded_extension_options(), true); |
| 27 |
| 28 const Extension* extension = InstallExtension( |
| 29 test_data_dir_.AppendASCII("extension_options").AppendASCII("embed_self"), |
| 30 1); |
| 31 ASSERT_TRUE(extension); |
| 32 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html")); |
| 33 } |
OLD | NEW |