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 "chrome/browser/ui/cocoa/download/download_item_cell.h" | 5 #import "chrome/browser/ui/cocoa/download/download_item_cell.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/macros.h" |
8 #include "chrome/browser/download/download_item_model.h" | 9 #include "chrome/browser/download/download_item_model.h" |
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 10 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
10 #include "content/public/test/mock_download_item.h" | 11 #include "content/public/test/mock_download_item.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
13 | 14 |
14 using ::testing::_; | 15 using ::testing::_; |
15 using ::testing::Return; | 16 using ::testing::Return; |
16 using ::testing::ReturnRefOfCopy; | 17 using ::testing::ReturnRefOfCopy; |
17 | 18 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 [button_ lockFocus]; | 74 [button_ lockFocus]; |
74 [cell_ drawWithFrame:[button_ bounds] | 75 [cell_ drawWithFrame:[button_ bounds] |
75 inView:button_]; | 76 inView:button_]; |
76 [button_ unlockFocus]; | 77 [button_ unlockFocus]; |
77 | 78 |
78 // Unset indeterminate state. | 79 // Unset indeterminate state. |
79 ON_CALL(item, PercentComplete()).WillByDefault(Return(0)); | 80 ON_CALL(item, PercentComplete()).WillByDefault(Return(0)); |
80 [cell_ setStateFromDownload:&model]; | 81 [cell_ setStateFromDownload:&model]; |
81 EXPECT_FALSE([cell_ indeterminateProgressTimer]); | 82 EXPECT_FALSE([cell_ indeterminateProgressTimer]); |
82 } | 83 } |
OLD | NEW |