| 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 10 matching lines...) Expand all Loading... |
| 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" |
| 26 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
| 27 #include "chrome/test/base/in_process_browser_test.h" | 27 #include "chrome/test/base/in_process_browser_test.h" |
| 28 #include "chrome/test/base/ui_test_utils.h" | 28 #include "chrome/test/base/ui_test_utils.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "content/public/browser/web_intents_dispatcher.h" | 30 #include "content/public/browser/web_intents_dispatcher.h" |
| 31 #include "content/test/test_url_fetcher_factory.h" | 31 #include "content/public/test/test_url_fetcher_factory.h" |
| 32 #include "net/base/escape.h" | 32 #include "net/base/escape.h" |
| 33 #include "net/base/mock_host_resolver.h" | 33 #include "net/base/mock_host_resolver.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 #include "ui/gfx/image/image_unittest_util.h" | 35 #include "ui/gfx/image/image_unittest_util.h" |
| 36 #include "ui/gfx/image/image_util.h" | 36 #include "ui/gfx/image/image_util.h" |
| 37 #include "webkit/glue/web_intent_service_data.h" | 37 #include "webkit/glue/web_intent_service_data.h" |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 const string16 kAction1(ASCIIToUTF16("http://webintents.org/share")); | 41 const string16 kAction1(ASCIIToUTF16("http://webintents.org/share")); |
| (...skipping 551 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 |