OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/favicon/favicon_service.h" | 12 #include "chrome/browser/favicon/favicon_service.h" |
13 #include "chrome/browser/intents/web_intent_service_data.h" | |
14 #include "chrome/browser/intents/web_intents_registry.h" | 13 #include "chrome/browser/intents/web_intents_registry.h" |
15 #include "chrome/browser/intents/web_intents_registry_factory.h" | 14 #include "chrome/browser/intents/web_intents_registry_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/intents/web_intent_picker.h" | 16 #include "chrome/browser/ui/intents/web_intent_picker.h" |
18 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | 17 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
19 #include "chrome/browser/ui/intents/web_intent_picker_factory.h" | 18 #include "chrome/browser/ui/intents/web_intent_picker_factory.h" |
20 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
21 #include "chrome/browser/webdata/web_data_service.h" | 20 #include "chrome/browser/webdata/web_data_service.h" |
22 #include "chrome/test/base/testing_profile.h" | 21 #include "chrome/test/base/testing_profile.h" |
23 #include "content/browser/browser_thread.h" | 22 #include "content/browser/browser_thread.h" |
24 #include "content/browser/tab_contents/tab_contents.h" | 23 #include "content/browser/tab_contents/tab_contents.h" |
25 #include "content/browser/tab_contents/test_tab_contents.h" | 24 #include "content/browser/tab_contents/test_tab_contents.h" |
26 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
27 #include "ui/gfx/codec/png_codec.h" | 26 #include "ui/gfx/codec/png_codec.h" |
28 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 28 #include "webkit/glue/web_intent_service_data.h" |
29 | 29 |
30 using testing::_; | 30 using testing::_; |
31 using testing::AtMost; | 31 using testing::AtMost; |
32 using testing::DoAll; | 32 using testing::DoAll; |
33 using testing::Invoke; | 33 using testing::Invoke; |
34 using testing::Return; | 34 using testing::Return; |
35 using testing::SaveArg; | 35 using testing::SaveArg; |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 .Times(0); | 265 .Times(0); |
266 EXPECT_CALL(*controller_, OnCancelled()) | 266 EXPECT_CALL(*controller_, OnCancelled()) |
267 .WillOnce(Invoke(controller_.get(), | 267 .WillOnce(Invoke(controller_.get(), |
268 &TestWebIntentPickerController::BaseOnCancelled)); | 268 &TestWebIntentPickerController::BaseOnCancelled)); |
269 EXPECT_CALL(*picker_factory_, ClosePicker(_)); | 269 EXPECT_CALL(*picker_factory_, ClosePicker(_)); |
270 | 270 |
271 controller_->ShowDialog(NULL, kAction1, kType); | 271 controller_->ShowDialog(NULL, kAction1, kType); |
272 WaitForDialogToShow(); | 272 WaitForDialogToShow(); |
273 delegate_->OnCancelled(); | 273 delegate_->OnCancelled(); |
274 } | 274 } |
OLD | NEW |