OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 class BookmarkBubbleControllerTest : public CocoaProfileTest { | 72 class BookmarkBubbleControllerTest : public CocoaProfileTest { |
73 public: | 73 public: |
74 static int edits_; | 74 static int edits_; |
75 BookmarkBubbleController* controller_; | 75 BookmarkBubbleController* controller_; |
76 | 76 |
77 BookmarkBubbleControllerTest() : controller_(nil) { | 77 BookmarkBubbleControllerTest() : controller_(nil) { |
78 edits_ = 0; | 78 edits_ = 0; |
79 } | 79 } |
80 | 80 |
81 virtual void TearDown() OVERRIDE { | 81 virtual void TearDown() override { |
82 [controller_ close]; | 82 [controller_ close]; |
83 CocoaProfileTest::TearDown(); | 83 CocoaProfileTest::TearDown(); |
84 } | 84 } |
85 | 85 |
86 // Returns a controller but ownership not transferred. | 86 // Returns a controller but ownership not transferred. |
87 // Only one of these will be valid at a time. | 87 // Only one of these will be valid at a time. |
88 BookmarkBubbleController* ControllerForNode(const BookmarkNode* node) { | 88 BookmarkBubbleController* ControllerForNode(const BookmarkNode* node) { |
89 if (controller_ && !IsWindowClosing()) { | 89 if (controller_ && !IsWindowClosing()) { |
90 [controller_ close]; | 90 [controller_ close]; |
91 controller_ = nil; | 91 controller_ = nil; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |