OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/memory/scoped_nsobject.h" |
| 6 #import "chrome/browser/ui/cocoa/download/download_item_cell.h" |
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "testing/platform_test.h" |
| 10 |
| 11 TEST(DownloadItemCellTest, ToggleStatusText) { |
| 12 scoped_nsobject<DownloadItemCell> cell; |
| 13 cell.reset([[DownloadItemCell alloc] initTextCell:@""]); |
| 14 EXPECT_FALSE([cell isStatusTextVisible]); |
| 15 EXPECT_FLOAT_EQ(0.0, [cell statusTextAlpha]); |
| 16 |
| 17 [cell showSecondaryTitle]; |
| 18 [cell skipVisibilityAnimation]; |
| 19 EXPECT_TRUE([cell isStatusTextVisible]); |
| 20 EXPECT_FLOAT_EQ(1.0, [cell statusTextAlpha]); |
| 21 |
| 22 [cell hideSecondaryTitle]; |
| 23 [cell skipVisibilityAnimation]; |
| 24 EXPECT_FALSE([cell isStatusTextVisible]); |
| 25 EXPECT_FLOAT_EQ(0.0, [cell statusTextAlpha]); |
| 26 } |
OLD | NEW |