| 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 <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" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 "\"family_safe\":true," | 74 "\"family_safe\":true," |
| 75 "\"icon_url\": \"%s\"}]}"; | 75 "\"icon_url\": \"%s\"}]}"; |
| 76 | 76 |
| 77 const char kCWSFakeIconURLFormat[] = "http://example.com/%s/icon.png"; | 77 const char kCWSFakeIconURLFormat[] = "http://example.com/%s/icon.png"; |
| 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 net::URLFetcher* CreateURLFetcher( |
| 85 int id, | 85 int id, |
| 86 const GURL& url, | 86 const GURL& url, |
| 87 content::URLFetcher::RequestType request_type, | 87 net::URLFetcher::RequestType request_type, |
| 88 net::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: |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |