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

Unified Diff: chrome/browser/extensions/api/dns/dns_apitest.cc

Issue 9716003: Extract ExtensionFunctionRegistry from ExtensionFunctionDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits; fix Windows build (thanks Brad Nelson!). Created 8 years, 9 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/extensions/api/dns/dns_apitest.cc
diff --git a/chrome/browser/extensions/api/dns/dns_apitest.cc b/chrome/browser/extensions/api/dns/dns_apitest.cc
index 7657db2db07aadad5153b13388622d52e20864b4..508a9aad3c13ee197e95af1ae2bd103e3bfc4dec 100644
--- a/chrome/browser/extensions/api/dns/dns_apitest.cc
+++ b/chrome/browser/extensions/api/dns/dns_apitest.cc
@@ -21,12 +21,12 @@ using extension_function_test_utils::RunFunctionAndReturnResult;
namespace {
-class DNSApiTest : public ExtensionApiTest {
+class DnsApiTest : public ExtensionApiTest {
public:
static const std::string kHostname;
static const std::string kAddress;
- DNSApiTest() : resolver_event_(true, false),
+ DnsApiTest() : resolver_event_(true, false),
mock_host_resolver_(NULL) {
}
@@ -38,13 +38,13 @@ class DNSApiTest : public ExtensionApiTest {
virtual void SetUpOnMainThread() OVERRIDE {
CreateMockHostResolverOnIOThread();
- extensions::DNSResolveFunction::set_host_resolver_for_testing(
+ extensions::DnsResolveFunction::set_host_resolver_for_testing(
get_mock_host_resolver());
}
virtual void CleanUpOnMainThread() OVERRIDE {
if (mock_host_resolver_) {
- extensions::DNSResolveFunction::set_host_resolver_for_testing(NULL);
+ extensions::DnsResolveFunction::set_host_resolver_for_testing(NULL);
DeleteMockHostResolverOnIOThread();
}
}
@@ -52,7 +52,7 @@ class DNSApiTest : public ExtensionApiTest {
void CreateMockHostResolverOnIOThread() {
bool result = BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&DNSApiTest::FinishMockHostResolverCreation, this));
+ base::Bind(&DnsApiTest::FinishMockHostResolverCreation, this));
DCHECK(result);
base::TimeDelta max_time = base::TimeDelta::FromSeconds(5);
@@ -74,7 +74,7 @@ class DNSApiTest : public ExtensionApiTest {
resolver_event_.Reset();
bool result = BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&DNSApiTest::FinishMockHostResolverDeletion, this));
+ base::Bind(&DnsApiTest::FinishMockHostResolverDeletion, this));
DCHECK(result);
base::TimeDelta max_time = base::TimeDelta::FromSeconds(5);
@@ -100,14 +100,14 @@ class DNSApiTest : public ExtensionApiTest {
// Plain pointer because we have to manage lifetime manually.
net::MockHostResolver* mock_host_resolver_;
};
-const std::string DNSApiTest::kHostname = "www.sowbug.org";
-const std::string DNSApiTest::kAddress = "9.8.7.6";
+const std::string DnsApiTest::kHostname = "www.sowbug.org";
+const std::string DnsApiTest::kAddress = "9.8.7.6";
} // namespace
-IN_PROC_BROWSER_TEST_F(DNSApiTest, DNSResolveIPLiteral) {
- scoped_refptr<extensions::DNSResolveFunction> resolve_function(
- new extensions::DNSResolveFunction());
+IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsResolveIPLiteral) {
+ scoped_refptr<extensions::DnsResolveFunction> resolve_function(
+ new extensions::DnsResolveFunction());
scoped_refptr<Extension> empty_extension(CreateEmptyExtension());
resolve_function->set_extension(empty_extension.get());
@@ -127,16 +127,16 @@ IN_PROC_BROWSER_TEST_F(DNSApiTest, DNSResolveIPLiteral) {
EXPECT_EQ("127.0.0.1", address);
}
-IN_PROC_BROWSER_TEST_F(DNSApiTest, DNSResolveHostname) {
- scoped_refptr<extensions::DNSResolveFunction> resolve_function(
- new extensions::DNSResolveFunction());
+IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsResolveHostname) {
+ scoped_refptr<extensions::DnsResolveFunction> resolve_function(
+ new extensions::DnsResolveFunction());
scoped_refptr<Extension> empty_extension(CreateEmptyExtension());
resolve_function->set_extension(empty_extension.get());
resolve_function->set_has_callback(true);
std::string function_arguments("[\"");
- function_arguments += DNSApiTest::kHostname;
+ function_arguments += DnsApiTest::kHostname;
function_arguments += "\"]";
scoped_ptr<base::Value> result(
RunFunctionAndReturnResult(resolve_function.get(),
@@ -150,9 +150,9 @@ IN_PROC_BROWSER_TEST_F(DNSApiTest, DNSResolveHostname) {
std::string address;
EXPECT_TRUE(value->GetString("address", &address));
- EXPECT_EQ(DNSApiTest::kAddress, address);
+ EXPECT_EQ(DnsApiTest::kAddress, address);
}
-IN_PROC_BROWSER_TEST_F(DNSApiTest, DNSExtension) {
+IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsExtension) {
ASSERT_TRUE(RunExtensionTest("dns/api")) << message_;
}
« no previous file with comments | « chrome/browser/extensions/api/dns/dns_api.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698