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

Unified Diff: chrome/browser/net/predictor_browsertest.cc

Issue 874163005: Fix DNS Prefetch in Chrome: new message type not added to filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only start test server for DnsPrefetch test Created 5 years, 10 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/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_browsertest.cc
diff --git a/chrome/browser/net/predictor_browsertest.cc b/chrome/browser/net/predictor_browsertest.cc
index fe5d0d98ad66856bcdf3b25ca0d596fb5c14d046..307c61c25604fb0f7ceb9c9982de881fc264bf9c 100644
--- a/chrome/browser/net/predictor_browsertest.cc
+++ b/chrome/browser/net/predictor_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/test_utils.h"
#include "net/base/net_errors.h"
#include "net/dns/host_resolver_proc.h"
@@ -20,6 +21,8 @@ using testing::HasSubstr;
namespace {
+const char kChromiumHostname[] = "chromium.org";
+
// Records a history of all hostnames for which resolving has been requested,
// and immediately fails the resolution requests themselves.
class HostResolutionRequestRecorder : public net::HostResolverProc {
@@ -189,5 +192,13 @@ IN_PROC_BROWSER_TEST_F(PredictorBrowserTest, ShutdownStartupCycle) {
WaitUntilHostHasBeenRequested(target_url_.host());
}
+IN_PROC_BROWSER_TEST_F(PredictorBrowserTest, DnsPrefetch) {
+ ASSERT_TRUE(test_server()->Start());
+ ui_test_utils::NavigateToURL(
+ browser(),
+ GURL(test_server()->GetURL("files/predictor/dns_prefetch.html")));
+ WaitUntilHostHasBeenRequested(kChromiumHostname);
+}
+
} // namespace chrome_browser_net
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698