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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm

Issue 1951943002: [Mac][Material Design] Fix AutocompleteTextFieldCell tests for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
index ef828eec3d4a8074aec4d3d9cd232cc47459d3ee..7ca8b4a73d6e79d8515872562efc44cf6515928a 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm
@@ -21,6 +21,7 @@
#include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h"
#include "third_party/ocmock/gtest_support.h"
+#include "ui/base/material_design/material_design_controller.h"
using ::testing::Return;
using ::testing::StrictMock;
@@ -162,7 +163,11 @@ TEST_F(AutocompleteTextFieldCellTest, TextFrame) {
textFrame = [cell textFrameForFrame:bounds];
EXPECT_FALSE(NSIsEmptyRect(textFrame));
EXPECT_TRUE(NSContainsRect(bounds, textFrame));
- EXPECT_EQ(NSMinX(bounds), NSMinX(textFrame));
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ EXPECT_EQ(1, NSMinX(textFrame));
+ } else {
+ EXPECT_EQ(NSMinX(bounds), NSMinX(textFrame));
+ }
EXPECT_EQ(NSMaxX(bounds), NSMaxX(textFrame));
EXPECT_TRUE(NSContainsRect(cursorFrame, textFrame));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698