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

Side by Side Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm

Issue 2854052: Mark test as flaky, disabling because it crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/scoped_nsobject.h" 8 #include "base/scoped_nsobject.h"
9 #import "chrome/browser/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h" 10 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 NSTextField* view_; 73 NSTextField* view_;
74 MockDecoration mock_left_decoration_; 74 MockDecoration mock_left_decoration_;
75 MockDecoration mock_right_decoration0_; 75 MockDecoration mock_right_decoration0_;
76 MockDecoration mock_right_decoration1_; 76 MockDecoration mock_right_decoration1_;
77 }; 77 };
78 78
79 // Basic view tests (AddRemove, Display). 79 // Basic view tests (AddRemove, Display).
80 TEST_VIEW(AutocompleteTextFieldCellTest, view_); 80 TEST_VIEW(AutocompleteTextFieldCellTest, view_);
81 81
82 // Test drawing, mostly to ensure nothing leaks or crashes. 82 // Test drawing, mostly to ensure nothing leaks or crashes.
83 TEST_F(AutocompleteTextFieldCellTest, FocusedDisplay) { 83 // Flaky, disabled. Bug http://crbug.com/49522
84 TEST_F(AutocompleteTextFieldCellTest, DISABLED_FocusedDisplay) {
84 [view_ display]; 85 [view_ display];
85 86
86 // Test focused drawing. 87 // Test focused drawing.
87 [test_window() makePretendKeyWindowAndSetFirstResponder:view_]; 88 [test_window() makePretendKeyWindowAndSetFirstResponder:view_];
88 [view_ display]; 89 [view_ display];
89 [test_window() clearPretendKeyWindowAndFirstResponder]; 90 [test_window() clearPretendKeyWindowAndFirstResponder];
90 91
91 // Test display of various cell configurations. 92 // Test display of various cell configurations.
92 AutocompleteTextFieldCell* cell = 93 AutocompleteTextFieldCell* cell =
93 static_cast<AutocompleteTextFieldCell*>([view_ cell]); 94 static_cast<AutocompleteTextFieldCell*>([view_ cell]);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 EXPECT_TRUE([[[cell hintString] string] hasPrefix:kHintPrefix]); 383 EXPECT_TRUE([[[cell hintString] string] hasPrefix:kHintPrefix]);
383 EXPECT_TRUE([[[cell hintString] string] hasSuffix:kHintSuffix]); 384 EXPECT_TRUE([[[cell hintString] string] hasSuffix:kHintSuffix]);
384 385
385 // Narrow width suppresses everything but the image. 386 // Narrow width suppresses everything but the image.
386 [cell setKeywordHintPrefix:kHintPrefix image:image suffix:kHintSuffix 387 [cell setKeywordHintPrefix:kHintPrefix image:image suffix:kHintSuffix
387 availableWidth:kNarrowWidth]; 388 availableWidth:kNarrowWidth];
388 EXPECT_EQ([[cell hintString] length], 1U); 389 EXPECT_EQ([[cell hintString] length], 1U);
389 } 390 }
390 391
391 } // namespace 392 } // namespace
OLDNEW
« 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