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

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

Issue 8144013: Add a check to the registry before the intent infobar is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New test Created 9 years, 2 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
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | chrome/browser/webdata/web_intents_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | chrome/browser/webdata/web_intents_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698