Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: chrome/browser/webdata/web_data_service_unittest.cc

Issue 7633011: Added WebIntents GetAll support (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review fixes Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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]);
+}
+

Powered by Google App Engine
This is Rietveld 408576698