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

Side by Side Diff: extensions/browser/guest_view/app_view/app_view_apitest.cc

Issue 2482583002: Ensure ShellExtensionSystem::Init() is called in all extensions_browsertests. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | extensions/shell/test/shell_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "components/guest_view/browser/guest_view_manager.h" 8 #include "components/guest_view/browser/guest_view_manager.h"
9 #include "components/guest_view/browser/guest_view_manager_factory.h" 9 #include "components/guest_view/browser/guest_view_manager_factory.h"
10 #include "components/guest_view/browser/test_guest_view_manager.h" 10 #include "components/guest_view/browser/test_guest_view_manager.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 const Extension* LoadApp(const std::string& app_location) { 113 const Extension* LoadApp(const std::string& app_location) {
114 base::FilePath test_data_dir; 114 base::FilePath test_data_dir;
115 PathService::Get(DIR_TEST_DATA, &test_data_dir); 115 PathService::Get(DIR_TEST_DATA, &test_data_dir);
116 test_data_dir = test_data_dir.AppendASCII(app_location.c_str()); 116 test_data_dir = test_data_dir.AppendASCII(app_location.c_str());
117 return extension_system_->LoadApp(test_data_dir); 117 return extension_system_->LoadApp(test_data_dir);
118 } 118 }
119 119
120 void RunTest(const std::string& test_name, 120 void RunTest(const std::string& test_name,
121 const std::string& app_location, 121 const std::string& app_location,
122 const std::string& app_to_embed) { 122 const std::string& app_to_embed) {
123 extension_system_->Init();
124
125 const Extension* app_embedder = LoadApp(app_location); 123 const Extension* app_embedder = LoadApp(app_location);
126 ASSERT_TRUE(app_embedder); 124 ASSERT_TRUE(app_embedder);
127 const Extension* app_embedded = LoadApp(app_to_embed); 125 const Extension* app_embedded = LoadApp(app_to_embed);
128 ASSERT_TRUE(app_embedded); 126 ASSERT_TRUE(app_embedded);
129 127
130 extension_system_->LaunchApp(app_embedder->id()); 128 extension_system_->LaunchApp(app_embedder->id());
131 129
132 ExtensionTestMessageListener launch_listener("LAUNCHED", false); 130 ExtensionTestMessageListener launch_listener("LAUNCHED", false);
133 ASSERT_TRUE(launch_listener.WaitUntilSatisfied()); 131 ASSERT_TRUE(launch_listener.WaitUntilSatisfied());
134 132
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #endif 201 #endif
204 // Tests that <appview> is able to navigate to another installed app. 202 // Tests that <appview> is able to navigate to another installed app.
205 IN_PROC_BROWSER_TEST_P(AppViewTest, 203 IN_PROC_BROWSER_TEST_P(AppViewTest,
206 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) { 204 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) {
207 RunTest("testAppViewWithUndefinedDataShouldSucceed", 205 RunTest("testAppViewWithUndefinedDataShouldSucceed",
208 "app_view/apitest", 206 "app_view/apitest",
209 "app_view/apitest/skeleton"); 207 "app_view/apitest/skeleton");
210 } 208 }
211 209
212 } // namespace extensions 210 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/shell/test/shell_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698