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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/favicon/favicon_service.h" | 9 #include "chrome/browser/favicon/favicon_service.h" |
10 #include "chrome/browser/intents/web_intents_registry.h" | 10 #include "chrome/browser/intents/web_intents_registry.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 webkit_glue::WebIntentData intent; | 179 webkit_glue::WebIntentData intent; |
180 intent.action = ASCIIToUTF16("a"); | 180 intent.action = ASCIIToUTF16("a"); |
181 intent.type = ASCIIToUTF16("b"); | 181 intent.type = ASCIIToUTF16("b"); |
182 IntentsDispatcherMock* host = new IntentsDispatcherMock(intent); | 182 IntentsDispatcherMock* host = new IntentsDispatcherMock(intent); |
183 controller->SetIntentsDispatcher(host); | 183 controller->SetIntentsDispatcher(host); |
184 | 184 |
185 OnServiceChosen(controller, 1); | 185 OnServiceChosen(controller, 1); |
186 ASSERT_EQ(2, browser()->tab_count()); | 186 ASSERT_EQ(2, browser()->tab_count()); |
187 EXPECT_EQ(GURL(kServiceURL2), | 187 EXPECT_EQ(GURL(kServiceURL2), |
188 browser()->GetSelectedTabContents()->GetURL()); | 188 browser()->GetSelectedWebContents()->GetURL()); |
189 | 189 |
190 EXPECT_TRUE(host->dispatched_); | 190 EXPECT_TRUE(host->dispatched_); |
191 | 191 |
192 OnSendReturnMessage(controller); | 192 OnSendReturnMessage(controller); |
193 ASSERT_EQ(1, browser()->tab_count()); | 193 ASSERT_EQ(1, browser()->tab_count()); |
194 } | 194 } |
OLD | NEW |