Chromium Code Reviews| Index: chrome/browser/webdata/web_data_service_unittest.cc |
| diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc |
| index 582ad7c870ff2d268e6f353e50536e7d3639fa86..145d67a6be763c5ea9c2135b7d4e7286a7e1f480 100644 |
| --- a/chrome/browser/webdata/web_data_service_unittest.cc |
| +++ b/chrome/browser/webdata/web_data_service_unittest.cc |
| @@ -639,6 +639,28 @@ TEST_F(WebDataServiceTest, WebIntents) { |
| EXPECT_EQ(service.type, consumer.intents[0].type); |
| } |
| +TEST_F(WebDataServiceTest, WebIntentsForURL) { |
| + WebIntentsConsumer consumer; |
| + |
| + WebIntentServiceData service; |
| + service.service_url = GURL("http://google.com"); |
| + service.action = ASCIIToUTF16("share1"); |
|
James Hawkins
2011/10/06 20:55:03
Wha? Why did you make this share1? The point of
Greg Billock
2011/10/06 21:37:57
Hmm. I see what you're saying about naming. The ex
James Hawkins
2011/10/06 21:42:32
*shrugs*
Greg Billock
2011/10/06 22:13:12
As in "indices aren't that bad" or as in "oh well,
James Hawkins
2011/10/07 20:29:48
Per-offline, I wouldn't try to optimize this yet (
|
| + service.type = ASCIIToUTF16("image/*"); |
| + wds_->AddWebIntent(service); |
| + |
| + service.action = ASCIIToUTF16("share"); |
| + service.type = ASCIIToUTF16("image/*"); |
| + wds_->AddWebIntent(service); |
| + |
| + wds_->GetWebIntentsForURL( |
| + ASCIIToUTF16("share"), |
| + UTF8ToUTF16(service.service_url.spec()), |
| + &consumer); |
| + WebIntentsConsumer::WaitUntilCalled(); |
| + ASSERT_EQ(1U, consumer.intents.size()); |
| + EXPECT_EQ(service, consumer.intents[0]); |
| +} |
| + |
| TEST_F(WebDataServiceTest, WebIntentsGetAll) { |
| WebIntentsConsumer consumer; |