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

Side by Side Diff: extensions/shell/test/shell_apitest.cc

Issue 642383003: Add the ability to load multiple apps into app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « extensions/shell/browser/shell_native_app_window.cc ('k') | no next file » | 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 "extensions/shell/test/shell_apitest.h" 5 #include "extensions/shell/test/shell_apitest.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "extensions/common/extension_paths.h" 9 #include "extensions/common/extension_paths.h"
10 #include "extensions/shell/browser/shell_extension_system.h" 10 #include "extensions/shell/browser/shell_extension_system.h"
11 #include "extensions/test/result_catcher.h" 11 #include "extensions/test/result_catcher.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 ShellApiTest::ShellApiTest() { 15 ShellApiTest::ShellApiTest() {
16 } 16 }
17 17
18 ShellApiTest::~ShellApiTest() { 18 ShellApiTest::~ShellApiTest() {
19 } 19 }
20 20
21 bool ShellApiTest::RunAppTest(const std::string& app_dir) { 21 bool ShellApiTest::RunAppTest(const std::string& app_dir) {
22 base::FilePath test_data_dir; 22 base::FilePath test_data_dir;
23 PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir); 23 PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir);
24 test_data_dir = test_data_dir.AppendASCII(app_dir); 24 test_data_dir = test_data_dir.AppendASCII(app_dir);
25 ResultCatcher catcher; 25 ResultCatcher catcher;
26 26
27 bool loaded = extension_system_->LoadApp(test_data_dir); 27 const Extension* extension = extension_system_->LoadApp(test_data_dir);
28 if (!loaded) 28 if (!extension)
29 return false; 29 return false;
30 30
31 extension_system_->LaunchApp(); 31 extension_system_->LaunchApp(extension->id());
32 32
33 if (!catcher.GetNextResult()) { 33 if (!catcher.GetNextResult()) {
34 message_ = catcher.message(); 34 message_ = catcher.message();
35 return false; 35 return false;
36 } 36 }
37 37
38 return true; 38 return true;
39 } 39 }
40 40
41 } // namespace extensions 41 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_native_app_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698