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

Side by Side Diff: ui/app_list/views/progress_bar_view_unittest_mac.mm

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/mac/foundation_util.h"
6 #include "base/mac/scoped_nsobject.h"
7 #include "base/strings/utf_string_conversions.h"
8 #import "testing/gtest_mac.h"
9 #include "ui/app_list/views/progress_bar_view.h"
10 #import "ui/events/test/cocoa_test_event_utils.h"
11 #import "ui/gfx/test/ui_cocoa_test_helper.h"
12 #import "ui/views_core/bridged_view_mac.h"
13 #include "base/message_loop/message_loop.h"
14
15 namespace app_list {
16 namespace test {
17 namespace {
18
19 class ProgressBarViewTestMac : public ui::CocoaTest {
20 public:
21 ProgressBarViewTestMac() {}
22
23 virtual void SetUp() OVERRIDE {
24 progress_bar_.reset(new app_list::ProgressBarView());
25 progress_bar_->SetBoundsRect(
26 gfx::Rect(0, 0, 80, progress_bar_->GetPreferredSize().height()));
27 ui::CocoaTest::SetUp();
28 [[test_window() contentView] addSubview:progress_bar_.GetNSView()];
29 }
30
31 virtual void TearDown() OVERRIDE {
32 progress_bar_.reset();
33 ui::CocoaTest::TearDown();
34 }
35
36 protected:
37 views::BridgedView<app_list::ProgressBarView> progress_bar_;
38
39 DISALLOW_COPY_AND_ASSIGN(ProgressBarViewTestMac);
40 };
41
42 } // namespace
43
44 TEST_VIEW(ProgressBarViewTestMac, progress_bar_.GetNSView());
45
46 TEST_F(ProgressBarViewTestMac, JustShowTheDamnThing) {
47 EXPECT_TRUE([progress_bar_.GetNSView() superview]);
48
49 base::MessageLoopForUI().Run();
50 }
51
52 } // namespace test
53 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/progress_bar_view.h ('k') | ui/app_list/views/search_result_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698