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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc

Issue 10392192: Remove content::URLFetcherDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cleanup Created 8 years, 7 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 <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/string_util.h"
11 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/favicon/favicon_service.h"
14 #include "chrome/browser/intents/default_web_intent_service.h" 15 #include "chrome/browser/intents/default_web_intent_service.h"
15 #include "chrome/browser/favicon/favicon_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/intents/web_intent_picker.h" 18 #include "chrome/browser/ui/intents/web_intent_picker.h"
19 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" 19 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
20 #include "chrome/browser/ui/intents/web_intent_picker_model.h" 20 #include "chrome/browser/ui/intents/web_intent_picker_model.h"
21 #include "chrome/browser/ui/intents/web_intent_picker_model_observer.h" 21 #include "chrome/browser/ui/intents/web_intent_picker_model_observer.h"
22 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 22 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
23 #include "chrome/browser/webdata/web_data_service.h" 23 #include "chrome/browser/webdata/web_data_service.h"
24 #include "chrome/browser/webdata/web_data_service_factory.h" 24 #include "chrome/browser/webdata/web_data_service_factory.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 class DummyURLFetcherFactory : public content::URLFetcherFactory { 79 class DummyURLFetcherFactory : public content::URLFetcherFactory {
80 public: 80 public:
81 DummyURLFetcherFactory() {} 81 DummyURLFetcherFactory() {}
82 virtual ~DummyURLFetcherFactory() {} 82 virtual ~DummyURLFetcherFactory() {}
83 83
84 virtual content::URLFetcher* CreateURLFetcher( 84 virtual content::URLFetcher* CreateURLFetcher(
85 int id, 85 int id,
86 const GURL& url, 86 const GURL& url,
87 content::URLFetcher::RequestType request_type, 87 content::URLFetcher::RequestType request_type,
88 content::URLFetcherDelegate* d) OVERRIDE { 88 net::URLFetcherDelegate* d) OVERRIDE {
89 return new TestURLFetcher(id, url, d); 89 return new TestURLFetcher(id, url, d);
90 } 90 }
91 }; 91 };
92 92
93 } // namespace 93 } // namespace
94 94
95 class WebIntentPickerMock : public WebIntentPicker, 95 class WebIntentPickerMock : public WebIntentPicker,
96 public WebIntentPickerModelObserver { 96 public WebIntentPickerModelObserver {
97 public: 97 public:
98 WebIntentPickerMock() 98 WebIntentPickerMock()
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 EXPECT_EQ(2, picker_.num_installed_services_); 594 EXPECT_EQ(2, picker_.num_installed_services_);
595 595
596 // The tab is shown immediately without needing to call OnServiceChosen. 596 // The tab is shown immediately without needing to call OnServiceChosen.
597 ASSERT_EQ(2, browser()->tab_count()); 597 ASSERT_EQ(2, browser()->tab_count());
598 EXPECT_EQ(GURL(kServiceURL1), 598 EXPECT_EQ(GURL(kServiceURL1),
599 browser()->GetSelectedWebContents()->GetURL()); 599 browser()->GetSelectedWebContents()->GetURL());
600 600
601 EXPECT_TRUE(dispatcher.dispatched_); 601 EXPECT_TRUE(dispatcher.dispatched_);
602 } 602 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.cc ('k') | chrome/browser/ui/webui/ntp/suggestions_source_discovery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698