| OLD | NEW | 
|---|
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|