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

Side by Side Diff: chrome/browser/guest_view/extension_options/extension_options_apitest.cc

Issue 471053003: Allow links inside <extensionoptions> to be opened in new tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run formatter and make the WebUI test also use LoadExtension Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/test/base/ui_test_utils.h" 8 #include "chrome/test/base/ui_test_utils.h"
9 #include "extensions/common/feature_switch.h" 9 #include "extensions/common/feature_switch.h"
10 #include "extensions/common/switches.h" 10 #include "extensions/common/switches.h"
(...skipping 14 matching lines...) Expand all
25 command_line->AppendSwitch( 25 command_line->AppendSwitch(
26 extensions::switches::kEnableEmbeddedExtensionOptions); 26 extensions::switches::kEnableEmbeddedExtensionOptions);
27 } 27 }
28 28
29 scoped_ptr<FeatureSwitch::ScopedOverride> enable_options_; 29 scoped_ptr<FeatureSwitch::ScopedOverride> enable_options_;
30 }; 30 };
31 31
32 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, ExtensionCanEmbedOwnOptions) { 32 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, ExtensionCanEmbedOwnOptions) {
33 base::FilePath extension_dir = 33 base::FilePath extension_dir =
34 test_data_dir_.AppendASCII("extension_options").AppendASCII("embed_self"); 34 test_data_dir_.AppendASCII("extension_options").AppendASCII("embed_self");
35 ASSERT_TRUE(InstallExtension(extension_dir, 1)); 35 ASSERT_TRUE(LoadExtension(extension_dir));
36 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html")); 36 ASSERT_TRUE(RunExtensionSubtest("extension_options/embed_self", "test.html"));
37 } 37 }
38 38
39 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, 39 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest,
40 ShouldNotEmbedOtherExtensionsOptions) { 40 ShouldNotEmbedOtherExtensionsOptions) {
41 base::FilePath dir = test_data_dir_.AppendASCII("extension_options") 41 base::FilePath dir = test_data_dir_.AppendASCII("extension_options")
42 .AppendASCII("embed_other"); 42 .AppendASCII("embed_other");
43 43
44 const Extension* embedder = InstallExtension(dir.AppendASCII("embedder"), 1); 44 const Extension* embedder = InstallExtension(dir.AppendASCII("embedder"), 1);
45 const Extension* embedded = InstallExtension(dir.AppendASCII("embedded"), 1); 45 const Extension* embedded = InstallExtension(dir.AppendASCII("embedded"), 1);
(...skipping 17 matching lines...) Expand all
63 } 63 }
64 64
65 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest, 65 IN_PROC_BROWSER_TEST_F(ExtensionOptionsApiTest,
66 CannotEmbedUsingInvalidExtensionIds) { 66 CannotEmbedUsingInvalidExtensionIds) {
67 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("extension_options") 67 ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("extension_options")
68 .AppendASCII("embed_invalid"), 68 .AppendASCII("embed_invalid"),
69 1)); 69 1));
70 ASSERT_TRUE( 70 ASSERT_TRUE(
71 RunExtensionSubtest("extension_options/embed_invalid", "test.html")); 71 RunExtensionSubtest("extension_options/embed_invalid", "test.html"));
72 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698