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 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 5 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
6 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" | 6 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" |
7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 7 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #import "testing/gtest_mac.h" | 11 #import "testing/gtest_mac.h" |
12 #include "testing/platform_test.h" | 12 #include "testing/platform_test.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 using bookmarks::BookmarkModel; | 15 using bookmarks::BookmarkModel; |
| 16 using bookmarks::BookmarkNode; |
16 | 17 |
17 // TODO(jrg): use OCMock. | 18 // TODO(jrg): use OCMock. |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 // Information needed to open a URL, as passed to the | 22 // Information needed to open a URL, as passed to the |
22 // BookmarkBarController's delegate. | 23 // BookmarkBarController's delegate. |
23 typedef std::pair<GURL,WindowOpenDisposition> OpenInfo; | 24 typedef std::pair<GURL,WindowOpenDisposition> OpenInfo; |
24 | 25 |
25 } // The namespace must end here -- I need to use OpenInfo in | 26 } // The namespace must end here -- I need to use OpenInfo in |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL, std::set<GURL>()); | 128 bridge->BookmarkNodeRemoved(NULL, NULL, 0, NULL, std::set<GURL>()); |
128 | 129 |
129 // 8 calls above plus an initial Loaded() in init routine makes 9 | 130 // 8 calls above plus an initial Loaded() in init routine makes 9 |
130 EXPECT_TRUE([controller.get()->callbacks_ count] == 9); | 131 EXPECT_TRUE([controller.get()->callbacks_ count] == 9); |
131 | 132 |
132 for (int x = 1; x < 9; x++) { | 133 for (int x = 1; x < 9; x++) { |
133 NSNumber* num = [NSNumber numberWithInt:x-1]; | 134 NSNumber* num = [NSNumber numberWithInt:x-1]; |
134 EXPECT_NSEQ(num, [controller.get()->callbacks_ objectAtIndex:x]); | 135 EXPECT_NSEQ(num, [controller.get()->callbacks_ objectAtIndex:x]); |
135 } | 136 } |
136 } | 137 } |
OLD | NEW |