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 5c439db286407950772ecc04351d33fa21aadb94..bc11e48e99e0dc0db408f55ed68ae586b462b75c 100644 |
| --- a/chrome/browser/webdata/web_data_service_unittest.cc |
| +++ b/chrome/browser/webdata/web_data_service_unittest.cc |
| @@ -638,3 +638,27 @@ TEST_F(WebDataServiceTest, WebIntents) { |
| EXPECT_EQ(intent.type, consumer.intents[0].type); |
| } |
| +TEST_F(WebDataServiceTest, WebIntentsGetAll) { |
| + WebIntentsConsumer consumer; |
| + |
| + WebIntentData intent; |
| + intent.service_url = GURL("http://google.com"); |
| + intent.action = ASCIIToUTF16("share"); |
| + intent.type = ASCIIToUTF16("image/*"); |
| + wds_->AddWebIntent(intent); |
| + |
| + intent.action = ASCIIToUTF16("edit"); |
| + wds_->AddWebIntent(intent); |
| + |
| + wds_->GetAllWebIntents(&consumer); |
| + WebIntentsConsumer::WaitUntilCalled(); |
| + ASSERT_EQ(2U, consumer.intents.size()); |
| + |
| + if (consumer.intents[0].action != ASCIIToUTF16("edit")) |
| + std::swap(consumer.intents[0],consumer.intents[1]); |
| + |
| + EXPECT_EQ(intent, consumer.intents[0]); |
| + intent.action=ASCIIToUTF16("share"); |
|
James Hawkins
2011/08/12 20:21:24
Spaces around operators.
groby-ooo-7-16
2011/08/12 20:40:50
Done.
|
| + EXPECT_EQ(intent, consumer.intents[1]); |
| +} |
| + |