| Index: chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm b/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..788f0d831c23d5afed9f4590a5496cd9fddad115
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/memory/scoped_nsobject.h"
|
| +#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
|
| +#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#include "testing/platform_test.h"
|
| +
|
| +TEST(DownloadItemCellTest, ToggleStatusText) {
|
| + scoped_nsobject<DownloadItemCell> cell;
|
| + cell.reset([[DownloadItemCell alloc] initTextCell:@""]);
|
| + EXPECT_FALSE([cell isStatusTextVisible]);
|
| + EXPECT_FLOAT_EQ(0.0, [cell statusTextAlpha]);
|
| +
|
| + [cell showSecondaryTitle];
|
| + [cell skipVisibilityAnimation];
|
| + EXPECT_TRUE([cell isStatusTextVisible]);
|
| + EXPECT_FLOAT_EQ(1.0, [cell statusTextAlpha]);
|
| +
|
| + [cell hideSecondaryTitle];
|
| + [cell skipVisibilityAnimation];
|
| + EXPECT_FALSE([cell isStatusTextVisible]);
|
| + EXPECT_FLOAT_EQ(0.0, [cell statusTextAlpha]);
|
| +}
|
|
|