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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "base/mac/scoped_nsobject.h" 5 #import "base/mac/scoped_nsobject.h"
6 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
7 #include "chrome/browser/ui/cocoa/download/download_shelf_mac.h" 6 #include "chrome/browser/ui/cocoa/download/download_shelf_mac.h"
7 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
10 10
11 // A fake implementation of DownloadShelfController. It implements only the 11 // A fake implementation of DownloadShelfController. It implements only the
12 // methods that DownloadShelfMac call during the tests in this file. We get this 12 // methods that DownloadShelfMac call during the tests in this file. We get this
13 // class into the DownloadShelfMac constructor by some questionable casting -- 13 // class into the DownloadShelfMac constructor by some questionable casting --
14 // Objective C is a dynamic language, so we pretend that's ok. 14 // Objective C is a dynamic language, so we pretend that's ok.
15 15
16 @interface FakeDownloadShelfController : NSObject { 16 @interface FakeDownloadShelfController : NSObject {
17 @public 17 @public
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 TEST_F(DownloadShelfMacTest, ForwardsIsShowing) { 94 TEST_F(DownloadShelfMacTest, ForwardsIsShowing) {
95 DownloadShelfMac shelf(browser(), 95 DownloadShelfMac shelf(browser(),
96 (DownloadShelfController*)shelf_controller_.get()); 96 (DownloadShelfController*)shelf_controller_.get());
97 EXPECT_EQ(0, shelf_controller_.get()->callCountIsVisible); 97 EXPECT_EQ(0, shelf_controller_.get()->callCountIsVisible);
98 shelf.IsShowing(); 98 shelf.IsShowing();
99 EXPECT_EQ(1, shelf_controller_.get()->callCountIsVisible); 99 EXPECT_EQ(1, shelf_controller_.get()->callCountIsVisible);
100 } 100 }
101 101
102 } // namespace 102 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698