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

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

Issue 8417043: Add webkit_glue namespace. Improve some variable and test names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error 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/intents/web_intents_registry.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6aaa541db4e9a2202ef8341ec1fd61989e60734b..1b13a92a70c7fbced89a0e3e72ec54053fe1ea3d 100644
--- a/chrome/browser/intents/web_intents_registry_unittest.cc
+++ b/chrome/browser/intents/web_intents_registry_unittest.cc
@@ -14,6 +14,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using webkit_glue::WebIntentServiceData;
+
class MockExtensionService: public ExtensionServiceInterface {
public:
virtual ~MockExtensionService() {}
@@ -62,6 +64,7 @@ DictionaryValue* LoadManifestFile(const std::string& filename,
}
namespace {
+
scoped_refptr<Extension> LoadExtensionWithLocation(
DictionaryValue* value,
Extension::Location location,
@@ -101,7 +104,7 @@ scoped_refptr<Extension> LoadAndExpectSuccess(const std::string& name) {
return extension;
}
-}
+} // namespace
class WebIntentsRegistryTest : public testing::Test {
public:
@@ -147,7 +150,7 @@ class TestConsumer: public WebIntentsRegistry::Consumer {
public:
virtual void OnIntentsQueryDone(
WebIntentsRegistry::QueryID id,
- const std::vector<WebIntentServiceData>& services) {
+ const std::vector<webkit_glue::WebIntentServiceData>& services) {
DCHECK(id == expected_id_);
services_ = services;
@@ -162,12 +165,15 @@ class TestConsumer: public WebIntentsRegistry::Consumer {
MessageLoop::current()->Run();
}
- WebIntentsRegistry::QueryID expected_id_; // QueryID callback is tied to.
- std::vector<WebIntentServiceData> services_; // Result data from callback.
+ // QueryID callback is tied to.
+ WebIntentsRegistry::QueryID expected_id_;
+
+ // Result data from callback.
+ std::vector<webkit_glue::WebIntentServiceData> services_;
};
TEST_F(WebIntentsRegistryTest, BasicTests) {
- WebIntentServiceData service;
+ webkit_glue::WebIntentServiceData service;
service.service_url = GURL("http://google.com");
service.action = ASCIIToUTF16("share");
service.type = ASCIIToUTF16("image/*");
@@ -206,7 +212,7 @@ TEST_F(WebIntentsRegistryTest, BasicTests) {
}
TEST_F(WebIntentsRegistryTest, GetAllIntents) {
- WebIntentServiceData service;
+ webkit_glue::WebIntentServiceData service;
service.service_url = GURL("http://google.com");
service.action = ASCIIToUTF16("share");
service.type = ASCIIToUTF16("image/*");
@@ -257,7 +263,7 @@ TEST_F(WebIntentsRegistryTest, GetIntentsFromMixedSources) {
extensions_.push_back(LoadAndExpectSuccess("intent_valid.json"));
extensions_.push_back(LoadAndExpectSuccess("intent_valid_2.json"));
- WebIntentServiceData service;
+ webkit_glue::WebIntentServiceData service;
service.service_url = GURL("http://somewhere.com/intent/edit.html");
service.action = ASCIIToUTF16("http://webintents.org/edit");
service.type = ASCIIToUTF16("image/*");
« no previous file with comments | « chrome/browser/intents/web_intents_registry.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698