Chromium Code Reviews
Help | Chromium Project | Sign in
(344)

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

Issue 2857015: Clang/mac: Get unit_tests built. (Closed)
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/bookmark_bubble_controller.h" 9 #import "chrome/browser/cocoa/bookmark_bubble_controller.h"
10 #include "chrome/browser/cocoa/browser_test_helper.h" 10 #include "chrome/browser/cocoa/browser_test_helper.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 BookmarkModel* GetBookmarkModel() { 54 BookmarkModel* GetBookmarkModel() {
55 return helper_.profile()->GetBookmarkModel(); 55 return helper_.profile()->GetBookmarkModel();
56 } 56 }
57 57
58 bool IsWindowClosing() { 58 bool IsWindowClosing() {
59 return [static_cast<InfoBubbleWindow*>([controller_ window]) isClosing]; 59 return [static_cast<InfoBubbleWindow*>([controller_ window]) isClosing];
60 } 60 }
61 }; 61 };
62 62
63 /* static */
64 int BookmarkBubbleControllerTest::edits_;
65
63 // Confirm basics about the bubble window (e.g. that it is inside the 66 // Confirm basics about the bubble window (e.g. that it is inside the
64 // parent window) 67 // parent window)
65 TEST_F(BookmarkBubbleControllerTest, TestBubbleWindow) { 68 TEST_F(BookmarkBubbleControllerTest, TestBubbleWindow) {
66 BookmarkModel* model = GetBookmarkModel(); 69 BookmarkModel* model = GetBookmarkModel();
67 const BookmarkNode* node = model->AddURL(model->GetBookmarkBarNode(), 70 const BookmarkNode* node = model->AddURL(model->GetBookmarkBarNode(),
68 0, 71 0,
69 L"Bookie markie title", 72 L"Bookie markie title",
70 GURL("http://www.google.com")); 73 GURL("http://www.google.com"));
71 BookmarkBubbleController* controller = ControllerForNode(node); 74 BookmarkBubbleController* controller = ControllerForNode(node);
72 EXPECT_TRUE(controller); 75 EXPECT_TRUE(controller);
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // Normally this would be sent up the responder tree correctly, but since 424 // Normally this would be sent up the responder tree correctly, but since
422 // tests run in the background, key window and main window are never set on 425 // tests run in the background, key window and main window are never set on
423 // NSApplication. Adding it to NSApplication directly removes the need for 426 // NSApplication. Adding it to NSApplication directly removes the need for
424 // worrying about what the current window with focus is. 427 // worrying about what the current window with focus is.
425 - (void)editBookmarkNode:(id)sender { 428 - (void)editBookmarkNode:(id)sender {
426 EXPECT_TRUE([sender respondsToSelector:@selector(node)]); 429 EXPECT_TRUE([sender respondsToSelector:@selector(node)]);
427 BookmarkBubbleControllerTest::edits_++; 430 BookmarkBubbleControllerTest::edits_++;
428 } 431 }
429 432
430 @end 433 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_controller.mm ('k') | chrome/browser/cocoa/sad_tab_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be