| 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 "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" | 
| 6 | 6 | 
| 7 #import "base/mac/foundation_util.h" | 7 #import "base/mac/foundation_util.h" | 
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" | 
| 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" | 
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" | 
| 12 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 12 #import "ui/base/cocoa/controls/hyperlink_text_view.h" | 
| 13 | 13 | 
| 14 namespace { | 14 namespace { | 
| 15 | 15 | 
| 16 template <typename T> | 16 template <typename T> | 
| 17 T* FindSadTabSubview(NSView* sadTabView) { | 17 T* FindSadTabSubview(NSView* sadTabView) { | 
| 18   NSView* containerView = sadTabView.subviews.firstObject; | 18   NSView* containerView = sadTabView.subviews.firstObject; | 
| 19   for (NSView* view in [containerView subviews]) { | 19   for (NSView* view in [containerView subviews]) { | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57   EXPECT_CALL(sadTab, | 57   EXPECT_CALL(sadTab, | 
| 58               PerformAction(testing::TypedEq<Action>(Action::HELP_LINK))); | 58               PerformAction(testing::TypedEq<Action>(Action::HELP_LINK))); | 
| 59 | 59 | 
| 60   [view displayIfNeeded]; | 60   [view displayIfNeeded]; | 
| 61   [FindSadTabSubview<NSButton>(view) performClick:nil]; | 61   [FindSadTabSubview<NSButton>(view) performClick:nil]; | 
| 62   [FindSadTabSubview<HyperlinkTextView>(view) clickedOnLink:[NSNull null] | 62   [FindSadTabSubview<HyperlinkTextView>(view) clickedOnLink:[NSNull null] | 
| 63                                                     atIndex:0]; | 63                                                     atIndex:0]; | 
| 64 } | 64 } | 
| 65 | 65 | 
| 66 }  // namespace | 66 }  // namespace | 
| OLD | NEW | 
|---|