OLD | NEW |
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/scoped_ptr.h" | 7 #include "base/scoped_ptr.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/bookmark_model_observer_for_cocoa.h" | 10 #import "chrome/browser/cocoa/bookmark_model_observer_for_cocoa.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 scoped_nsobject<ObserverPingTracker> | 46 scoped_nsobject<ObserverPingTracker> |
47 pingCount([[ObserverPingTracker alloc] init]); | 47 pingCount([[ObserverPingTracker alloc] init]); |
48 | 48 |
49 scoped_ptr<BookmarkModelObserverForCocoa> | 49 scoped_ptr<BookmarkModelObserverForCocoa> |
50 observer(new BookmarkModelObserverForCocoa(node, model, | 50 observer(new BookmarkModelObserverForCocoa(node, model, |
51 pingCount, | 51 pingCount, |
52 @selector(pingMe:))); | 52 @selector(pingMe:))); |
53 | 53 |
54 EXPECT_EQ(0, pingCount.get()->pings); | 54 EXPECT_EQ(0, pingCount.get()->pings); |
55 | 55 |
56 model->SetTitle(node, L"duper"); | 56 model->SetTitle(node, ASCIIToUTF16("duper")); |
57 EXPECT_EQ(1, pingCount.get()->pings); | 57 EXPECT_EQ(1, pingCount.get()->pings); |
58 model->SetURL(node, GURL("http://www.google.com/reader")); | 58 model->SetURL(node, GURL("http://www.google.com/reader")); |
59 EXPECT_EQ(2, pingCount.get()->pings); | 59 EXPECT_EQ(2, pingCount.get()->pings); |
60 | 60 |
61 model->Move(node, model->other_node(), 0); | 61 model->Move(node, model->other_node(), 0); |
62 EXPECT_EQ(3, pingCount.get()->pings); | 62 EXPECT_EQ(3, pingCount.get()->pings); |
63 | 63 |
64 model->Remove(node->GetParent(), 0); | 64 model->Remove(node->GetParent(), 0); |
65 EXPECT_EQ(4, pingCount.get()->pings); | 65 EXPECT_EQ(4, pingCount.get()->pings); |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
OLD | NEW |