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

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

Issue 529293003: Extract ResultCatcher from ExtensionApiTest. Use it in ShellApiTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: deprecate Created 6 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 | « no previous file | chrome/browser/extensions/extension_apitest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
deleted file mode 100644
index 8bb70ac41e36850b4c94bd292317e7f111051738..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/dns/dns_apitest.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/ref_counted.h"
-#include "chrome/browser/extensions/extension_apitest.h"
-#include "extensions/browser/api/dns/host_resolver_wrapper.h"
-#include "extensions/browser/api/dns/mock_host_resolver_creator.h"
-#include "net/dns/mock_host_resolver.h"
-
-class DnsApiTest : public ExtensionApiTest {
- public:
- DnsApiTest() : resolver_creator_(new extensions::MockHostResolverCreator()) {}
-
- private:
- virtual void SetUpOnMainThread() OVERRIDE {
- ExtensionApiTest::SetUpOnMainThread();
- extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting(
- resolver_creator_->CreateMockHostResolver());
- }
-
- virtual void TearDownOnMainThread() OVERRIDE {
- extensions::HostResolverWrapper::GetInstance()->
- SetHostResolverForTesting(NULL);
- resolver_creator_->DeleteMockHostResolver();
- ExtensionApiTest::TearDownOnMainThread();
- }
-
- // The MockHostResolver asserts that it's used on the same thread on which
- // it's created, which is actually a stronger rule than its real counterpart.
- // But that's fine; it's good practice.
- scoped_refptr<extensions::MockHostResolverCreator> resolver_creator_;
-};
-
-IN_PROC_BROWSER_TEST_F(DnsApiTest, DnsExtension) {
- ASSERT_TRUE(RunExtensionTest("dns/api")) << message_;
-}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_apitest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698