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 |
| 8 using extensions::Extension; |
| 9 using extensions::FeatureSwitch; |
| 10 |
| 11 class ExtensionOptionsApiTest : public ExtensionApiTest {}; |
| 12 |
| 13 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, EmbedOptionsInExtension) { |
| 14 FeatureSwitch::ScopedOverride enable_options( |
| 15 FeatureSwitch::embedded_extension_options(), true); |
| 16 |
| 17 const Extension* extension = |
| 18 InstallExtension(test_data_dir_.AppendASCII("extension_options") |
| 19 .AppendASCII("embed_self"), 1); |
| 20 ASSERT_TRUE(extension); |
| 21 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html")); |
| 22 } |
| 23 |
| 24 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, EmbedOtherExtensionOptions) { |
| 25 FeatureSwitch::ScopedOverride enable_options( |
| 26 FeatureSwitch::embedded_extension_options(), true); |
| 27 base::FilePath test_dir = test_data_dir_.AppendASCII("extension_options") |
| 28 .AppendASCII("embed_other"); |
| 29 const Extension* embedder = |
| 30 InstallExtension(test_dir.AppendASCII("embedder"), 1); |
| 31 const Extension* embedded = |
| 32 InstallExtension(test_dir.AppendASCII("embedded"), 1); |
| 33 |
| 34 ASSERT_TRUE(embedder); |
| 35 ASSERT_TRUE(embedded); |
| 36 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_other/embedder", |
| 37 "test.html")); |
| 38 } |
OLD | NEW |