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

Unified Diff: chrome/browser/guest_view/extension_options/extension_options_apitest.cc

Issue 378783002: Initial implementation of the <extensionoptions> GuestView tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 5 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/browser/guest_view/extension_options/extension_options_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/guest_view/extension_options/extension_options_apitest.cc
diff --git a/chrome/browser/guest_view/extension_options/extension_options_apitest.cc b/chrome/browser/guest_view/extension_options/extension_options_apitest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..af96f02598a0da2fbf0b011631a3e1afb3cbc170
--- /dev/null
+++ b/chrome/browser/guest_view/extension_options/extension_options_apitest.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_apitest.h"
+#include "extensions/common/feature_switch.h"
+#include "extensions/common/switches.h"
+
+using extensions::Extension;
+using extensions::FeatureSwitch;
+
+class ExtensionOptionsApiTest : public ExtensionApiTest {
+ private:
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ // Need to add a command line flag as well as a FeatureSwitch because the
+ // FeatureSwitch is not copied over to the renderer process from the
+ // browser process.
+ command_line->AppendSwitch(
+ extensions::switches::kEnableEmbeddedExtensionOptions);
+ ExtensionApiTest::SetUpCommandLine(command_line);
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, ExtensionCanEmbedOwnOptions) {
+ FeatureSwitch::ScopedOverride enable_options(
+ FeatureSwitch::embedded_extension_options(), true);
+
+ const Extension* extension = InstallExtension(
+ test_data_dir_.AppendASCII("extension_options").AppendASCII("embed_self"),
+ 1);
+ ASSERT_TRUE(extension);
+ ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html"));
+}
« no previous file with comments | « no previous file | chrome/browser/guest_view/extension_options/extension_options_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698