Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7203)

Unified Diff: chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm

Issue 7272024: Fix regression: Download status doesn't appear anymore in the download-shelf (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_cell.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
+}
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_cell.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698