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

Side by Side Diff: apps/test/app_shell_test.cc

Issue 224723022: Add the first app_shell_browsertest test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temp dep Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « apps/test/app_shell_test.h ('k') | apps/test/apps_test_launcher_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "apps/test/app_shell_test.h"
6
7 #include "apps/shell/browser/shell_content_browser_client.h"
8 #include "apps/shell/browser/shell_extension_system.h"
9 #include "base/files/file_path.h"
10 #include "base/logging.h"
11 #include "extensions/browser/extension_system.h"
12
13 namespace apps {
14
15 AppShellTest::AppShellTest()
16 : browser_context_(NULL), extension_system_(NULL) {}
17
18 AppShellTest::~AppShellTest() {}
19
20 void AppShellTest::SetUpOnMainThread() {
21 browser_context_ = ShellContentBrowserClient::Get()->GetBrowserContext();
22
23 extension_system_ = static_cast<extensions::ShellExtensionSystem*>(
24 extensions::ExtensionSystem::Get(browser_context_));
25 }
26
27 void AppShellTest::RunTestOnMainThreadLoop() {
28 // Pump startup related events.
29 base::MessageLoopForUI::current()->RunUntilIdle();
30
31 SetUpOnMainThread();
32
33 RunTestOnMainThread();
34
35 TearDownOnMainThread();
36 }
37
38 bool AppShellTest::LoadAndLaunchApp(const base::FilePath& app_dir) {
39 return extension_system_->LoadAndLaunchApp(app_dir);
40 }
41
42 } // namespace apps
OLDNEW
« no previous file with comments | « apps/test/app_shell_test.h ('k') | apps/test/apps_test_launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698