| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/download/download_item_controller.h" | 5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | |
| 14 #import "chrome/browser/ui/cocoa/download/download_item_button.h" | 13 #import "chrome/browser/ui/cocoa/download/download_item_button.h" |
| 15 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" | 14 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" |
| 15 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" |
| 16 #include "content/public/test/mock_download_item.h" | 16 #include "content/public/test/mock_download_item.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "testing/platform_test.h" | 18 #include "testing/platform_test.h" |
| 19 #import "third_party/ocmock/OCMock/OCMock.h" | 19 #import "third_party/ocmock/OCMock/OCMock.h" |
| 20 #import "third_party/ocmock/gtest_support.h" | 20 #import "third_party/ocmock/gtest_support.h" |
| 21 | 21 |
| 22 using ::testing::Return; | 22 using ::testing::Return; |
| 23 using ::testing::ReturnRefOfCopy; | 23 using ::testing::ReturnRefOfCopy; |
| 24 | 24 |
| 25 @interface DownloadItemController (DownloadItemControllerTest) | 25 @interface DownloadItemController (DownloadItemControllerTest) |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // download item are mock objects. | 182 // download item are mock objects. |
| 183 [downloadItemButton removeFromSuperview]; | 183 [downloadItemButton removeFromSuperview]; |
| 184 }]; | 184 }]; |
| 185 // The unit test will stop here until the block causes the DownloadItemButton | 185 // The unit test will stop here until the block causes the DownloadItemButton |
| 186 // to dismiss the menu. | 186 // to dismiss the menu. |
| 187 [item showContextMenu:nil]; | 187 [item showContextMenu:nil]; |
| 188 } | 188 } |
| 189 | 189 |
| 190 | 190 |
| 191 } // namespace | 191 } // namespace |
| OLD | NEW |