OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/browser_window.h" | 7 #import "chrome/browser/ui/browser_window.h" |
8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
10 #import "chrome/browser/ui/cocoa/new_tab_button.h" | 10 #import "chrome/browser/ui/cocoa/new_tab_button.h" |
11 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 11 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
12 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 12 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
14 #include "content/browser/site_instance.h" | 14 #include "content/browser/site_instance.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "testing/platform_test.h" | 17 #include "testing/platform_test.h" |
18 | 18 |
19 @interface TestTabStripControllerDelegate : | 19 @interface TestTabStripControllerDelegate |
20 NSObject<TabStripControllerDelegate> { | 20 : NSObject<TabStripControllerDelegate> { |
21 } | 21 } |
22 @end | 22 @end |
23 | 23 |
24 @implementation TestTabStripControllerDelegate | 24 @implementation TestTabStripControllerDelegate |
25 - (void)onSelectTabWithContents:(TabContents*)contents { | 25 - (void)onActivateTabWithContents:(TabContents*)contents { |
26 } | 26 } |
27 - (void)onReplaceTabWithContents:(TabContents*)contents { | 27 - (void)onReplaceTabWithContents:(TabContents*)contents { |
28 } | 28 } |
29 - (void)onSelectedTabChange:(TabStripModelObserver::TabChangeType)change { | 29 - (void)onTabChanged:(TabStripModelObserver::TabChangeType)change |
| 30 withContents:(TabContents*)contents { |
30 } | 31 } |
31 - (void)onTabDetachedWithContents:(TabContents*)contents { | 32 - (void)onTabDetachedWithContents:(TabContents*)contents { |
32 } | 33 } |
33 @end | 34 @end |
34 | 35 |
35 namespace { | 36 namespace { |
36 | 37 |
37 // Stub model delegate | 38 // Stub model delegate |
38 class TestTabStripDelegate : public TabStripModelDelegate { | 39 class TestTabStripDelegate : public TabStripModelDelegate { |
39 public: | 40 public: |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // TODO(pinkerton): Implement http://crbug.com/10899 | 169 // TODO(pinkerton): Implement http://crbug.com/10899 |
169 } | 170 } |
170 | 171 |
171 // Test that changing the number of tabs broadcasts a | 172 // Test that changing the number of tabs broadcasts a |
172 // kTabStripNumberOfTabsChanged notifiction. | 173 // kTabStripNumberOfTabsChanged notifiction. |
173 TEST_F(TabStripControllerTest, Notifications) { | 174 TEST_F(TabStripControllerTest, Notifications) { |
174 // TODO(pinkerton): Implement http://crbug.com/10899 | 175 // TODO(pinkerton): Implement http://crbug.com/10899 |
175 } | 176 } |
176 | 177 |
177 } // namespace | 178 } // namespace |
OLD | NEW |