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

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

Issue 192031: [Mac] Add testing code to expose an NSColor memory leak. (Closed)
Patch Set: Remove egregious s/private/public/ leftover from prototyping. Created 11 years, 3 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 | chrome/browser/cocoa/autocomplete_text_field_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/autocomplete_text_field_cell_unittest.mm
diff --git a/chrome/browser/cocoa/autocomplete_text_field_cell_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_cell_unittest.mm
index fc101685138ff81b310fe35c5369522738b9bf37..0f6c8013cae4181b73e417a8793519dd32286292 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_cell_unittest.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_cell_unittest.mm
@@ -17,10 +17,11 @@ class AutocompleteTextFieldCellTest : public PlatformTest {
AutocompleteTextFieldCellTest() {
// Make sure this is wide enough to play games with the cell
// decorations.
- NSRect frame = NSMakeRect(0, 0, 300, 30);
+ const NSRect frame = NSMakeRect(0, 0, 300, 30);
view_.reset([[NSTextField alloc] initWithFrame:frame]);
scoped_nsobject<AutocompleteTextFieldCell> cell(
[[AutocompleteTextFieldCell alloc] initTextCell:@"Testing"]);
+ [cell setEditable:YES];
[view_ setCell:cell.get()];
[cocoa_helper_.contentView() addSubview:view_.get()];
}
@@ -41,6 +42,11 @@ TEST_F(AutocompleteTextFieldCellTest, AddRemove) {
TEST_F(AutocompleteTextFieldCellTest, Display) {
[view_ display];
+ // Test focussed drawing.
+ cocoa_helper_.makeFirstResponder(view_);
+ [view_ display];
+ cocoa_helper_.clearFirstResponder();
+
// Test display of various cell configurations.
AutocompleteTextFieldCell* cell =
static_cast<AutocompleteTextFieldCell*>([view_ cell]);
« no previous file with comments | « no previous file | chrome/browser/cocoa/autocomplete_text_field_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698