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

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

Issue 7930002: Rename WebIntentData for backend storage to WebIntentServiceData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix class/struct decl Created 9 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
« 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 786c4b8f3611f38eee49fea9d226bd1dd30a8a55..582ad7c870ff2d268e6f353e50536e7d3639fa86 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -154,7 +154,8 @@ class WebIntentsConsumer: public WebDataServiceConsumer {
if (result) {
DCHECK(result->GetType() == WEB_INTENTS_RESULT);
intents = static_cast<
- const WDResult<std::vector<WebIntentData> >*>(result)->GetValue();
+ const WDResult<std::vector<WebIntentServiceData> >*>(result)->
+ GetValue();
}
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -168,7 +169,8 @@ class WebIntentsConsumer: public WebDataServiceConsumer {
MessageLoop::current()->Run();
}
- std::vector<WebIntentData> intents; // Result data from completion callback.
+ // Result data from completion callback.
+ std::vector<WebIntentServiceData> intents;
};
TEST_F(WebDataServiceAutofillTest, FormFillAdd) {
@@ -601,14 +603,14 @@ TEST_F(WebDataServiceTest, WebIntents) {
WebIntentsConsumer::WaitUntilCalled();
EXPECT_EQ(0U, consumer.intents.size());
- WebIntentData intent;
- intent.service_url = GURL("http://google.com");
- intent.action = ASCIIToUTF16("share");
- intent.type = ASCIIToUTF16("image/*");
- wds_->AddWebIntent(intent);
+ WebIntentServiceData service;
+ service.service_url = GURL("http://google.com");
+ service.action = ASCIIToUTF16("share");
+ service.type = ASCIIToUTF16("image/*");
+ wds_->AddWebIntent(service);
- intent.type = ASCIIToUTF16("video/*");
- wds_->AddWebIntent(intent);
+ service.type = ASCIIToUTF16("video/*");
+ wds_->AddWebIntent(service);
wds_->GetWebIntents(ASCIIToUTF16("share"), &consumer);
WebIntentsConsumer::WaitUntilCalled();
@@ -617,37 +619,37 @@ TEST_F(WebDataServiceTest, WebIntents) {
if (consumer.intents[0].type != ASCIIToUTF16("image/*"))
std::swap(consumer.intents[0],consumer.intents[1]);
- EXPECT_EQ(intent.service_url, consumer.intents[0].service_url);
- EXPECT_EQ(intent.action, consumer.intents[0].action);
+ EXPECT_EQ(service.service_url, consumer.intents[0].service_url);
+ EXPECT_EQ(service.action, consumer.intents[0].action);
EXPECT_EQ(ASCIIToUTF16("image/*"), consumer.intents[0].type);
- EXPECT_EQ(intent.service_url, consumer.intents[1].service_url);
- EXPECT_EQ(intent.action, consumer.intents[1].action);
- EXPECT_EQ(intent.type, consumer.intents[1].type);
+ EXPECT_EQ(service.service_url, consumer.intents[1].service_url);
+ EXPECT_EQ(service.action, consumer.intents[1].action);
+ EXPECT_EQ(service.type, consumer.intents[1].type);
- intent.type = ASCIIToUTF16("image/*");
- wds_->RemoveWebIntent(intent);
+ service.type = ASCIIToUTF16("image/*");
+ wds_->RemoveWebIntent(service);
wds_->GetWebIntents(ASCIIToUTF16("share"), &consumer);
WebIntentsConsumer::WaitUntilCalled();
ASSERT_EQ(1U, consumer.intents.size());
- intent.type = ASCIIToUTF16("video/*");
- EXPECT_EQ(intent.service_url, consumer.intents[0].service_url);
- EXPECT_EQ(intent.action, consumer.intents[0].action);
- EXPECT_EQ(intent.type, consumer.intents[0].type);
+ service.type = ASCIIToUTF16("video/*");
+ EXPECT_EQ(service.service_url, consumer.intents[0].service_url);
+ EXPECT_EQ(service.action, consumer.intents[0].action);
+ EXPECT_EQ(service.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);
+ WebIntentServiceData service;
+ service.service_url = GURL("http://google.com");
+ service.action = ASCIIToUTF16("share");
+ service.type = ASCIIToUTF16("image/*");
+ wds_->AddWebIntent(service);
- intent.action = ASCIIToUTF16("edit");
- wds_->AddWebIntent(intent);
+ service.action = ASCIIToUTF16("edit");
+ wds_->AddWebIntent(service);
wds_->GetAllWebIntents(&consumer);
WebIntentsConsumer::WaitUntilCalled();
@@ -656,8 +658,7 @@ TEST_F(WebDataServiceTest, WebIntentsGetAll) {
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");
- EXPECT_EQ(intent, consumer.intents[1]);
+ EXPECT_EQ(service, consumer.intents[0]);
+ service.action = ASCIIToUTF16("share");
+ EXPECT_EQ(service, consumer.intents[1]);
}
-
« 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