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

Side by Side Diff: ui/snapshot/snapshot_aura_unittest.cc

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh Created 7 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/win/singleton_hwnd.cc ('k') | ui/surface/accelerated_surface_win.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/snapshot/snapshot.h" 5 #include "ui/snapshot/snapshot.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/test/aura_test_helper.h" 9 #include "ui/aura/test/aura_test_helper.h"
10 #include "ui/aura/test/test_screen.h" 10 #include "ui/aura/test/test_screen.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 } // namespace 60 } // namespace
61 61
62 class SnapshotAuraTest : public testing::Test { 62 class SnapshotAuraTest : public testing::Test {
63 public: 63 public:
64 SnapshotAuraTest() {} 64 SnapshotAuraTest() {}
65 virtual ~SnapshotAuraTest() {} 65 virtual ~SnapshotAuraTest() {}
66 66
67 virtual void SetUp() OVERRIDE { 67 virtual void SetUp() OVERRIDE {
68 testing::Test::SetUp(); 68 testing::Test::SetUp();
69 helper_.reset(new aura::test::AuraTestHelper(MessageLoopForUI::current())); 69 helper_.reset(
70 new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
70 helper_->SetUp(); 71 helper_->SetUp();
71 } 72 }
72 73
73 virtual void TearDown() OVERRIDE { 74 virtual void TearDown() OVERRIDE {
74 test_window_.reset(); 75 test_window_.reset();
75 delegate_.reset(); 76 delegate_.reset();
76 helper_->RunAllPendingInMessageLoop(); 77 helper_->RunAllPendingInMessageLoop();
77 helper_->TearDown(); 78 helper_->TearDown();
78 testing::Test::TearDown(); 79 testing::Test::TearDown();
79 } 80 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 gfx::SizeF snapshot_size(test_bounds.size()); 214 gfx::SizeF snapshot_size(test_bounds.size());
214 snapshot_size.Scale(2.0f / kUIScale); 215 snapshot_size.Scale(2.0f / kUIScale);
215 216
216 gfx::Image snapshot = GrabSnapshotForTestWindow(); 217 gfx::Image snapshot = GrabSnapshotForTestWindow();
217 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(), 218 EXPECT_EQ(gfx::ToRoundedSize(snapshot_size).ToString(),
218 snapshot.Size().ToString()); 219 snapshot.Size().ToString());
219 EXPECT_EQ(0u, GetFailedPixelsCount(snapshot)); 220 EXPECT_EQ(0u, GetFailedPixelsCount(snapshot));
220 } 221 }
221 222
222 } // namespace ui 223 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/singleton_hwnd.cc ('k') | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698