From c7f4b627c4dde3c801649e28eea82e581797590c Mon Sep 17 00:00:00 2001 From: "maruel@google.com" Date: Tue, 30 Sep 2008 20:50:51 +0000 Subject: Fix some issues found looking at the code. Patch from Gaetano Mendola Original review: http://codereview.chromium.org/4273 I added some additions on my part and two unit test fix due to the added DCHECK. Reduced atl header inclusion. Review URL: http://codereview.chromium.org/5009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2730 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/focus_manager_unittest.cc | 2 ++ chrome/views/table_view_unittest.cc | 2 ++ 2 files changed, 4 insertions(+) (limited to 'chrome') diff --git a/chrome/views/focus_manager_unittest.cc b/chrome/views/focus_manager_unittest.cc index 8f0040f..78d02b4 100644 --- a/chrome/views/focus_manager_unittest.cc +++ b/chrome/views/focus_manager_unittest.cc @@ -514,6 +514,7 @@ TestViewWindow* FocusManagerTest::GetWindow() { } void FocusManagerTest::SetUp() { + OleInitialize(NULL); test_window_ = new TestViewWindow(this); test_window_->Init(); ShowWindow(test_window_->GetHWND(), SW_SHOW); @@ -524,6 +525,7 @@ void FocusManagerTest::TearDown() { // Flush the message loop to make Purify happy. message_loop_.RunAllPending(); + OleUninitialize(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/views/table_view_unittest.cc b/chrome/views/table_view_unittest.cc index 2467f04..2e3ab7f 100644 --- a/chrome/views/table_view_unittest.cc +++ b/chrome/views/table_view_unittest.cc @@ -137,6 +137,7 @@ class TableViewTest : public testing::Test, ChromeViews::WindowDelegate { }; void TableViewTest::SetUp() { + OleInitialize(NULL); model_.reset(CreateModel()); std::vector columns; columns.resize(2); @@ -154,6 +155,7 @@ void TableViewTest::TearDown() { window_->CloseNow(); // Temporary workaround to avoid leak of RootView::pending_paint_task_. message_loop_.RunAllPending(); + OleUninitialize(); } void TableViewTest::VeriyViewOrder(int first, ...) { -- cgit v1.1