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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/test/test_session_state_delegate.h" 10 #include "ash/common/test/test_session_state_delegate.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 #endif 106 #endif
107 107
108 ash_test_environment_ = AshTestEnvironment::Create(); 108 ash_test_environment_ = AshTestEnvironment::Create();
109 109
110 // Must initialize |ash_test_helper_| here because some tests rely on 110 // Must initialize |ash_test_helper_| here because some tests rely on
111 // AshTestBase methods before they call AshTestBase::SetUp(). 111 // AshTestBase methods before they call AshTestBase::SetUp().
112 ash_test_helper_.reset(new AshTestHelper(ash_test_environment_.get())); 112 ash_test_helper_.reset(new AshTestHelper(ash_test_environment_.get()));
113 } 113 }
114 114
115 AshTestBase::~AshTestBase() { 115 AshTestBase::~AshTestBase() {
116 CHECK(setup_called_) 116 // You have overridden SetUp but never called AshTestBase::SetUp
117 << "You have overridden SetUp but never called AshTestBase::SetUp"; 117 CHECK(setup_called_);
118 CHECK(teardown_called_) 118 // You have overridden TearDown but never called AshTestBase::TearDown
119 << "You have overridden TearDown but never called AshTestBase::TearDown"; 119 CHECK(teardown_called_);
120 } 120 }
121 121
122 void AshTestBase::SetUp() { 122 void AshTestBase::SetUp() {
123 setup_called_ = true; 123 setup_called_ = true;
124 124
125 // Clears the saved state so that test doesn't use on the wrong 125 // Clears the saved state so that test doesn't use on the wrong
126 // default state. 126 // default state.
127 shell::ToplevelWindow::ClearSavedStateForTest(); 127 shell::ToplevelWindow::ClearSavedStateForTest();
128 128
129 // TODO(jamescook): Can we do this without changing command line? 129 // TODO(jamescook): Can we do this without changing command line?
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 void AshTestBase::SwapPrimaryDisplay() { 403 void AshTestBase::SwapPrimaryDisplay() {
404 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) 404 if (display::Screen::GetScreen()->GetNumDisplays() <= 1)
405 return; 405 return;
406 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( 406 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId(
407 display_manager()->GetSecondaryDisplay().id()); 407 display_manager()->GetSecondaryDisplay().id());
408 } 408 }
409 409
410 } // namespace test 410 } // namespace test
411 } // namespace ash 411 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698