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

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

Issue 9701105: Revert 127159 - Refactor extension_function_dispatcher to extract ExtensionFunctionRegistry. This a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- chrome/browser/extensions/api/dns/dns_apitest.cc (revision 127187)
+++ chrome/browser/extensions/api/dns/dns_apitest.cc (working copy)
@@ -21,12 +21,12 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
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 @@
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