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" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 virtual void TearDown() { | 142 virtual void TearDown() { |
143 controller_.reset(); | 143 controller_.reset(); |
144 | 144 |
145 TabContentsWrapperTestHarness::TearDown(); | 145 TabContentsWrapperTestHarness::TearDown(); |
146 } | 146 } |
147 | 147 |
148 protected: | 148 protected: |
149 void AddWebIntentService(const string16& action, | 149 void AddWebIntentService(const string16& action, |
150 const GURL& service_url) { | 150 const GURL& service_url) { |
151 WebIntentServiceData web_intent_service_data; | 151 webkit_glue::WebIntentServiceData service; |
152 web_intent_service_data.action = action; | 152 service.action = action; |
153 web_intent_service_data.type = kType; | 153 service.type = kType; |
154 web_intent_service_data.service_url = service_url; | 154 service.service_url = service_url; |
155 web_data_service_->AddWebIntent(web_intent_service_data); | 155 web_data_service_->AddWebIntent(service); |
156 } | 156 } |
157 | 157 |
158 void AddFaviconForURL(const GURL& url) { | 158 void AddFaviconForURL(const GURL& url) { |
159 std::vector<unsigned char> image_data; | 159 std::vector<unsigned char> image_data; |
160 FillBitmap(16, 16, &image_data); | 160 FillBitmap(16, 16, &image_data); |
161 | 161 |
162 favicon_service_->SetFavicon(url, | 162 favicon_service_->SetFavicon(url, |
163 MakeFaviconURL(url), | 163 MakeFaviconURL(url), |
164 image_data, | 164 image_data, |
165 history::FAVICON); | 165 history::FAVICON); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 .Times(0); | 252 .Times(0); |
253 EXPECT_CALL(*controller_, OnCancelled()) | 253 EXPECT_CALL(*controller_, OnCancelled()) |
254 .WillOnce(Invoke(controller_.get(), | 254 .WillOnce(Invoke(controller_.get(), |
255 &TestWebIntentPickerController::BaseOnCancelled)); | 255 &TestWebIntentPickerController::BaseOnCancelled)); |
256 EXPECT_CALL(*picker_factory_, ClosePicker(_)); | 256 EXPECT_CALL(*picker_factory_, ClosePicker(_)); |
257 | 257 |
258 controller_->ShowDialog(NULL, kAction1, kType); | 258 controller_->ShowDialog(NULL, kAction1, kType); |
259 WaitForDialogToShow(); | 259 WaitForDialogToShow(); |
260 delegate_->OnCancelled(); | 260 delegate_->OnCancelled(); |
261 } | 261 } |
OLD | NEW |