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

Side by Side Diff: mojo/public/cpp/application/lib/application_test_base.cc

Issue 703273002: Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442ac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content/child -> mojo/common linking Created 6 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 | « mojo/public/cpp/PRESUBMIT.py ('k') | mojo/public/cpp/application/lib/application_test_main.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 "mojo/public/cpp/application/application_test_base.h" 5 #include "mojo/public/cpp/application/application_test_base.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/environment/environment.h" 9 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/environment/logging.h" 10 #include "mojo/public/cpp/environment/logging.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 ApplicationTestBase::~ApplicationTestBase() { 40 ApplicationTestBase::~ApplicationTestBase() {
41 } 41 }
42 42
43 void ApplicationTestBase::SetUp() { 43 void ApplicationTestBase::SetUp() {
44 // A run loop is needed for ApplicationImpl initialization and communication. 44 // A run loop is needed for ApplicationImpl initialization and communication.
45 Environment::InstantiateDefaultRunLoop(); 45 Environment::InstantiateDefaultRunLoop();
46 46
47 // New applications are constructed for each test to avoid persisting state. 47 // New applications are constructed for each test to avoid persisting state.
48 application_impl_ = 48 application_impl_ = new ApplicationImpl(GetApplicationDelegate(),
49 new ApplicationImpl(GetApplicationDelegate(), PassShellHandle()); 49 PassShellHandle());
50 50
51 // Fake application initialization with the given command line arguments. 51 // Fake application initialization with the given command line arguments.
52 application_impl_->Initialize(args_.Clone()); 52 application_impl_->Initialize(args_.Clone());
53 } 53 }
54 54
55 void ApplicationTestBase::TearDown() { 55 void ApplicationTestBase::TearDown() {
56 SetShellHandle(application_impl_->UnbindShell()); 56 SetShellHandle(application_impl_->UnbindShell());
57 delete application_impl_; 57 delete application_impl_;
58 Environment::DestroyDefaultRunLoop(); 58 Environment::DestroyDefaultRunLoop();
59 } 59 }
60 60
61 } // namespace test 61 } // namespace test
62 } // namespace mojo 62 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/PRESUBMIT.py ('k') | mojo/public/cpp/application/lib/application_test_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698