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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/progress_bar_view_unittest_mac.mm
diff --git a/ui/app_list/views/progress_bar_view_unittest_mac.mm b/ui/app_list/views/progress_bar_view_unittest_mac.mm
new file mode 100644
index 0000000000000000000000000000000000000000..d06b5cf899aa0521f637a1f7dfe4accad1af6209
--- /dev/null
+++ b/ui/app_list/views/progress_bar_view_unittest_mac.mm
@@ -0,0 +1,53 @@
+// Copyright 2013 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 "base/mac/foundation_util.h"
+#include "base/mac/scoped_nsobject.h"
+#include "base/strings/utf_string_conversions.h"
+#import "testing/gtest_mac.h"
+#include "ui/app_list/views/progress_bar_view.h"
+#import "ui/events/test/cocoa_test_event_utils.h"
+#import "ui/gfx/test/ui_cocoa_test_helper.h"
+#import "ui/views_core/bridged_view_mac.h"
+#include "base/message_loop/message_loop.h"
+
+namespace app_list {
+namespace test {
+namespace {
+
+class ProgressBarViewTestMac : public ui::CocoaTest {
+ public:
+ ProgressBarViewTestMac() {}
+
+ virtual void SetUp() OVERRIDE {
+ progress_bar_.reset(new app_list::ProgressBarView());
+ progress_bar_->SetBoundsRect(
+ gfx::Rect(0, 0, 80, progress_bar_->GetPreferredSize().height()));
+ ui::CocoaTest::SetUp();
+ [[test_window() contentView] addSubview:progress_bar_.GetNSView()];
+ }
+
+ virtual void TearDown() OVERRIDE {
+ progress_bar_.reset();
+ ui::CocoaTest::TearDown();
+ }
+
+ protected:
+ views::BridgedView<app_list::ProgressBarView> progress_bar_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProgressBarViewTestMac);
+};
+
+} // namespace
+
+TEST_VIEW(ProgressBarViewTestMac, progress_bar_.GetNSView());
+
+TEST_F(ProgressBarViewTestMac, JustShowTheDamnThing) {
+ EXPECT_TRUE([progress_bar_.GetNSView() superview]);
+
+ base::MessageLoopForUI().Run();
+}
+
+} // namespace test
+} // namespace app_list
« 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