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

Unified Diff: views/test/views_test_base.cc

Issue 8581003: views: Move ime and test directories to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/test/views_test_base.h ('k') | views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/test/views_test_base.cc
diff --git a/views/test/views_test_base.cc b/views/test/views_test_base.cc
deleted file mode 100644
index c4db9c0d08c976662ffbf6ad5910825c96169a3a..0000000000000000000000000000000000000000
--- a/views/test/views_test_base.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "views/test/views_test_base.h"
-
-#if defined(OS_WIN)
-#include <ole2.h>
-#endif
-
-#if defined(USE_AURA)
-#include "ui/aura/desktop.h"
-#include "ui/aura/test/test_stacking_client.h"
-#endif
-
-namespace views {
-
-ViewsTestBase::ViewsTestBase()
- : setup_called_(false),
- teardown_called_(false) {
-#if defined(OS_WIN)
- OleInitialize(NULL);
-#endif
-#if defined(USE_AURA)
- new aura::test::TestStackingClient;
-#endif
-}
-
-ViewsTestBase::~ViewsTestBase() {
-#if defined(OS_WIN)
- OleUninitialize();
-#endif
- CHECK(setup_called_)
- << "You have overridden SetUp but never called super class's SetUp";
- CHECK(teardown_called_)
- << "You have overrideen TearDown but never called super class's TearDown";
-}
-
-void ViewsTestBase::SetUp() {
- testing::Test::SetUp();
- setup_called_ = true;
- if (!views_delegate_.get())
- views_delegate_.reset(new TestViewsDelegate());
-}
-
-void ViewsTestBase::TearDown() {
- // Flush the message loop because we have pending release tasks
- // and these tasks if un-executed would upset Valgrind.
- RunPendingMessages();
- teardown_called_ = true;
- views_delegate_.reset();
- testing::Test::TearDown();
-}
-
-void ViewsTestBase::RunPendingMessages() {
-#if defined(USE_AURA)
- message_loop_.RunAllPendingWithDispatcher(
- aura::Desktop::GetInstance()->GetDispatcher());
-#else
- message_loop_.RunAllPending();
-#endif
-}
-
-} // namespace views
« no previous file with comments | « views/test/views_test_base.h ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698