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

Side by Side Diff: chrome/browser/ui/cocoa/spinner_progress_indicator_unittest.mm

Issue 11009017: Mac Web Intents Part 11: Progress view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a Created 8 years, 2 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 | « chrome/browser/ui/cocoa/spinner_progress_indicator.mm ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #import "base/memory/scoped_nsobject.h"
6 #include "base/message_loop.h"
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 #import "chrome/browser/ui/cocoa/spinner_progress_indicator.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h"
11
12 class SpinnerProgressIndicatorTest : public CocoaTest {
13 public:
14 SpinnerProgressIndicatorTest() {
15 view_.reset([[SpinnerProgressIndicator alloc] initWithFrame:NSZeroRect]);
16 [view_ sizeToFit];
17 [[test_window() contentView] addSubview:view_];
18 }
19
20 protected:
21 scoped_nsobject<SpinnerProgressIndicator> view_;
22 // Need for the progress indicator timer.
23 MessageLoop message_loop_;
24 };
25
26 TEST_VIEW(SpinnerProgressIndicatorTest, view_)
27
28 // Test determinate.
29 TEST_F(SpinnerProgressIndicatorTest, Determinate) {
30 [view_ setIsIndeterminate:NO];
31 [view_ setPercentDone:0];
32 [view_ display];
33 [view_ setPercentDone:50];
34 [view_ display];
35 }
36
37 // Test indeterminate.
38 TEST_F(SpinnerProgressIndicatorTest, Indeterminate) {
39 [view_ setIsIndeterminate:YES];
40 [view_ display];
41 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/spinner_progress_indicator.mm ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698