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/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 NSString* const kBookmarkBubbleTouchBarId = @"bookmark-bubble"; | 49 NSString* const kBookmarkBubbleTouchBarId = @"bookmark-bubble"; |
50 | 50 |
51 // Touch bar item identifiers. | 51 // Touch bar item identifiers. |
52 NSString* const kRemoveTouchBarId = @"REMOVE"; | 52 NSString* const kRemoveTouchBarId = @"REMOVE"; |
53 NSString* const kEditTouchBarId = @"EDIT"; | 53 NSString* const kEditTouchBarId = @"EDIT"; |
54 NSString* const kDoneTouchBarId = @"DONE"; | 54 NSString* const kDoneTouchBarId = @"DONE"; |
55 | 55 |
56 class TestBookmarkBubbleObserver : public BookmarkBubbleObserver { | 56 class TestBookmarkBubbleObserver : public BookmarkBubbleObserver { |
57 public: | 57 public: |
58 TestBookmarkBubbleObserver() {} | 58 TestBookmarkBubbleObserver() {} |
59 ~TestBookmarkBubbleObserver() override{}; | 59 ~TestBookmarkBubbleObserver() override {} |
60 | 60 |
61 // bookmarks::BookmarkBubbleObserver. | 61 // bookmarks::BookmarkBubbleObserver. |
62 void OnBookmarkBubbleShown(const BookmarkNode* node) override { | 62 void OnBookmarkBubbleShown(const BookmarkNode* node) override { |
63 ++shown_count_; | 63 ++shown_count_; |
64 } | 64 } |
65 void OnBookmarkBubbleHidden() override { ++hidden_count_; } | 65 void OnBookmarkBubbleHidden() override { ++hidden_count_; } |
66 | 66 |
67 int shown_count() { return shown_count_; } | 67 int shown_count() { return shown_count_; } |
68 int hidden_count() { return hidden_count_; } | 68 int hidden_count() { return hidden_count_; } |
69 | 69 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // Normally this would be sent up the responder tree correctly, but since | 514 // Normally this would be sent up the responder tree correctly, but since |
515 // tests run in the background, key window and main window are never set on | 515 // tests run in the background, key window and main window are never set on |
516 // NSApplication. Adding it to NSApplication directly removes the need for | 516 // NSApplication. Adding it to NSApplication directly removes the need for |
517 // worrying about what the current window with focus is. | 517 // worrying about what the current window with focus is. |
518 - (void)editBookmarkNode:(id)sender { | 518 - (void)editBookmarkNode:(id)sender { |
519 EXPECT_TRUE([sender respondsToSelector:@selector(node)]); | 519 EXPECT_TRUE([sender respondsToSelector:@selector(node)]); |
520 BookmarkBubbleControllerTest::edits_++; | 520 BookmarkBubbleControllerTest::edits_++; |
521 } | 521 } |
522 | 522 |
523 @end | 523 @end |
OLD | NEW |