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

Unified Diff: chrome/browser/intents/web_intents_registry_unittest.cc

Issue 10914278: Fix for non-sticky defaults bug. Added a bunch of tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix up comments. Created 8 years, 3 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/intents/web_intents_registry_unittest.cc
diff --git a/chrome/browser/intents/web_intents_registry_unittest.cc b/chrome/browser/intents/web_intents_registry_unittest.cc
index 156825ccd4bd52a0ac590b0bd2bd356f52e201fc..9506849f2c69faa1593659095934c736636fb512 100644
--- a/chrome/browser/intents/web_intents_registry_unittest.cc
+++ b/chrome/browser/intents/web_intents_registry_unittest.cc
@@ -596,6 +596,19 @@ TEST_F(WebIntentsRegistryTest, TestGetDefaults) {
EXPECT_EQ(1, consumer.service_.user_date);
EXPECT_EQ(4, consumer.service_.suppression);
+ // Can get for wildcard.
+ consumer.service_ = DefaultWebIntentService();
+ registry_.GetDefaultIntentService(
+ ASCIIToUTF16("share"),
+ ASCIIToUTF16("text/*"),
+ GURL("http://www.google.com/"),
+ base::Bind(&DefaultServiceConsumer::Accept,
+ base::Unretained(&consumer)));
+ consumer.WaitForData();
+ EXPECT_EQ("service_url", consumer.service_.service_url);
+ EXPECT_EQ(1, consumer.service_.user_date);
+ EXPECT_EQ(4, consumer.service_.suppression);
+
// Test that no action match means we don't retrieve any
// default entries.
consumer.service_ = DefaultWebIntentService();

Powered by Google App Engine
This is Rietveld 408576698