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

Side by Side Diff: chrome/browser/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm

Issue 3828009: Move scoped_nsdisable_screen_update from base to app/mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/scoped_nsobject.h" 8 #include "base/scoped_nsobject.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #import "chrome/browser/cocoa/bookmarks/bookmark_bubble_controller.h" 10 #import "chrome/browser/cocoa/bookmarks/bookmark_bubble_controller.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 TEST_F(BookmarkBubbleControllerTest, TestClosingParentWindow) { 120 TEST_F(BookmarkBubbleControllerTest, TestClosingParentWindow) {
121 BookmarkModel* model = GetBookmarkModel(); 121 BookmarkModel* model = GetBookmarkModel();
122 const BookmarkNode* node = model->AddURL(model->GetBookmarkBarNode(), 122 const BookmarkNode* node = model->AddURL(model->GetBookmarkBarNode(),
123 0, 123 0,
124 ASCIIToUTF16("Bookie markie title"), 124 ASCIIToUTF16("Bookie markie title"),
125 GURL("http://www.google.com")); 125 GURL("http://www.google.com"));
126 BookmarkBubbleController* controller = ControllerForNode(node); 126 BookmarkBubbleController* controller = ControllerForNode(node);
127 EXPECT_TRUE(controller); 127 EXPECT_TRUE(controller);
128 NSWindow* window = [controller window]; 128 NSWindow* window = [controller window];
129 EXPECT_TRUE(window); 129 EXPECT_TRUE(window);
130 base::ScopedNSAutoreleasePool pool; 130 base::mac::ScopedNSAutoreleasePool pool;
131 [test_window() performClose:NSApp]; 131 [test_window() performClose:NSApp];
132 } 132 }
133 133
134 134
135 // Confirm population of folder list 135 // Confirm population of folder list
136 TEST_F(BookmarkBubbleControllerTest, TestFillInFolder) { 136 TEST_F(BookmarkBubbleControllerTest, TestFillInFolder) {
137 // Create some folders, including a nested folder 137 // Create some folders, including a nested folder
138 BookmarkModel* model = GetBookmarkModel(); 138 BookmarkModel* model = GetBookmarkModel();
139 EXPECT_TRUE(model); 139 EXPECT_TRUE(model);
140 const BookmarkNode* bookmarkBarNode = model->GetBookmarkBarNode(); 140 const BookmarkNode* bookmarkBarNode = model->GetBookmarkBarNode();
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // Normally this would be sent up the responder tree correctly, but since 481 // Normally this would be sent up the responder tree correctly, but since
482 // tests run in the background, key window and main window are never set on 482 // tests run in the background, key window and main window are never set on
483 // NSApplication. Adding it to NSApplication directly removes the need for 483 // NSApplication. Adding it to NSApplication directly removes the need for
484 // worrying about what the current window with focus is. 484 // worrying about what the current window with focus is.
485 - (void)editBookmarkNode:(id)sender { 485 - (void)editBookmarkNode:(id)sender {
486 EXPECT_TRUE([sender respondsToSelector:@selector(node)]); 486 EXPECT_TRUE([sender respondsToSelector:@selector(node)]);
487 BookmarkBubbleControllerTest::edits_++; 487 BookmarkBubbleControllerTest::edits_++;
488 } 488 }
489 489
490 @end 490 @end
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/cocoa/bookmarks/bookmark_folder_target_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698