Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm

Issue 9706012: Add abstractions that let embedders drive tests of WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CONTENT_EXPORT on statically linked functions. Merge to head for commit. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 #import "chrome/browser/ui/cocoa/hover_close_button.h" 8 #import "chrome/browser/ui/cocoa/hover_close_button.h"
9 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 9 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
10 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 10 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
11 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" 11 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h"
12 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h" 12 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
13 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" 13 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
14 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" 14 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
15 #include "content/browser/tab_contents/test_tab_contents.h"
16 #include "content/test/test_browser_thread.h" 15 #include "content/test/test_browser_thread.h"
17 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
18 17
19 namespace { 18 namespace {
20 19
21 class MockIntentPickerDelegate : public WebIntentPickerDelegate { 20 class MockIntentPickerDelegate : public WebIntentPickerDelegate {
22 public: 21 public:
23 virtual ~MockIntentPickerDelegate() {} 22 virtual ~MockIntentPickerDelegate() {}
24 23
25 MOCK_METHOD2(OnServiceChosen, void(const GURL& url, Disposition disposition)); 24 MOCK_METHOD2(OnServiceChosen, void(const GURL& url, Disposition disposition));
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ASSERT_TRUE([[[item_view subviews] objectAtIndex:1] 222 ASSERT_TRUE([[[item_view subviews] objectAtIndex:1]
224 isKindOfClass:[NSButton class]]); 223 isKindOfClass:[NSButton class]]);
225 NSButton* title_button = [[item_view subviews] objectAtIndex:1]; 224 NSButton* title_button = [[item_view subviews] objectAtIndex:1];
226 CheckButton(title_button, @selector(openExtensionLink:)); 225 CheckButton(title_button, @selector(openExtensionLink:));
227 226
228 ASSERT_TRUE([[[item_view subviews] objectAtIndex:7] 227 ASSERT_TRUE([[[item_view subviews] objectAtIndex:7]
229 isKindOfClass:[NSButton class]]); 228 isKindOfClass:[NSButton class]]);
230 NSButton* add_button = [[item_view subviews] objectAtIndex:7]; 229 NSButton* add_button = [[item_view subviews] objectAtIndex:7];
231 CheckButton(add_button, @selector(invokeService:)); 230 CheckButton(add_button, @selector(invokeService:));
232 } 231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698