OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/interactive_ui/view_event_test_base.h" | 5 #include "chrome/test/interactive_ui/view_event_test_base.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <ole2.h> | 8 #include <ole2.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 OleInitialize(NULL); | 81 OleInitialize(NULL); |
82 #endif | 82 #endif |
83 window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this); | 83 window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this); |
84 } | 84 } |
85 | 85 |
86 void ViewEventTestBase::TearDown() { | 86 void ViewEventTestBase::TearDown() { |
87 if (window_) { | 87 if (window_) { |
88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
89 DestroyWindow(window_->GetNativeWindow()); | 89 DestroyWindow(window_->GetNativeWindow()); |
90 #else | 90 #else |
91 window_->CloseWindow(); | 91 window_->Close(); |
92 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); | 92 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); |
93 ui_test_utils::RunMessageLoop(); | 93 ui_test_utils::RunMessageLoop(); |
94 #endif | 94 #endif |
95 window_ = NULL; | 95 window_ = NULL; |
96 } | 96 } |
97 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
98 OleUninitialize(); | 98 OleUninitialize(); |
99 #endif | 99 #endif |
100 } | 100 } |
101 | 101 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 void ViewEventTestBase::TimedOut() { | 173 void ViewEventTestBase::TimedOut() { |
174 std::string error_message = "Test timed out. Each test runs for a max of "; | 174 std::string error_message = "Test timed out. Each test runs for a max of "; |
175 error_message += base::IntToString(kTimeoutInMS); | 175 error_message += base::IntToString(kTimeoutInMS); |
176 error_message += " ms (kTimeoutInMS)."; | 176 error_message += " ms (kTimeoutInMS)."; |
177 | 177 |
178 GTEST_NONFATAL_FAILURE_(error_message.c_str()); | 178 GTEST_NONFATAL_FAILURE_(error_message.c_str()); |
179 | 179 |
180 Done(); | 180 Done(); |
181 } | 181 } |
OLD | NEW |