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