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

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

Issue 1130903004: [Mac] Fix download item text sometimes being misaligned. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
index c37300cce0d22a971aa4ca8e6dd7cf2585bc5ff1..a51b6eefeacfe58ebe24ab016a4f835ea6122f95 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell_unittest.mm
@@ -2,22 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
+
#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/download/download_item_model.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#import "chrome/browser/ui/cocoa/download/download_item_cell.h"
#include "content/public/test/mock_download_item.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-using ::testing::Return;
-
-
-
using ::testing::_;
+using ::testing::Return;
using ::testing::ReturnRefOfCopy;
-
class DownloadItemCellTest : public CocoaTest {
public:
DownloadItemCellTest() : CocoaTest() {
@@ -42,16 +39,19 @@ class DownloadItemCellTest : public CocoaTest {
TEST_F(DownloadItemCellTest, ToggleStatusText) {
EXPECT_FALSE([cell_ isStatusTextVisible]);
EXPECT_FLOAT_EQ(0.0, [cell_ statusTextAlpha]);
+ CGFloat titleYNoStatus = [cell_ titleY];
[cell_ showSecondaryTitle];
[cell_ skipVisibilityAnimation];
EXPECT_TRUE([cell_ isStatusTextVisible]);
EXPECT_FLOAT_EQ(1.0, [cell_ statusTextAlpha]);
+ EXPECT_LT([cell_ titleY], titleYNoStatus);
[cell_ hideSecondaryTitle];
[cell_ skipVisibilityAnimation];
EXPECT_FALSE([cell_ isStatusTextVisible]);
EXPECT_FLOAT_EQ(0.0, [cell_ statusTextAlpha]);
+ EXPECT_FLOAT_EQ(titleYNoStatus, [cell_ titleY]);
}
TEST_F(DownloadItemCellTest, IndeterminateProgress) {
« 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