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

Side by Side Diff: chrome/browser/net/predictor_browsertest.cc

Issue 1021233003: Disable PredictorBrowserTest.DnsPrefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disable_verifymanagedsignout
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/base64.h" 5 #include "base/base64.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/net/chrome_net_log.h" 10 #include "chrome/browser/net/chrome_net_log.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 EXPECT_THAT(cleared_referral_list, Not(HasSubstr(referring_url_.host()))); 262 EXPECT_THAT(cleared_referral_list, Not(HasSubstr(referring_url_.host())));
263 EXPECT_THAT(cleared_referral_list, Not(HasSubstr(target_url_.host()))); 263 EXPECT_THAT(cleared_referral_list, Not(HasSubstr(target_url_.host())));
264 264
265 // But also make sure this data has been first loaded into the Predictor, by 265 // But also make sure this data has been first loaded into the Predictor, by
266 // inspecting that the Predictor starts making the expected hostname requests. 266 // inspecting that the Predictor starts making the expected hostname requests.
267 PrepareFrameSubresources(referring_url_); 267 PrepareFrameSubresources(referring_url_);
268 WaitUntilHostHasBeenRequested(startup_url_.host()); 268 WaitUntilHostHasBeenRequested(startup_url_.host());
269 WaitUntilHostHasBeenRequested(target_url_.host()); 269 WaitUntilHostHasBeenRequested(target_url_.host());
270 } 270 }
271 271
272 IN_PROC_BROWSER_TEST_F(PredictorBrowserTest, DnsPrefetch) { 272 // Flaky on Windows: http://crbug.com/469120
273 #if defined(OS_WIN)
274 #define MAYBE_DnsPrefetch DISABLED_DnsPrefetch
275 #else
276 #define MAYBE_DnsPrefetch DnsPrefetch
277 #endif
278 IN_PROC_BROWSER_TEST_F(PredictorBrowserTest, MAYBE_DnsPrefetch) {
273 ASSERT_TRUE(test_server()->Start()); 279 ASSERT_TRUE(test_server()->Start());
274 int hostnames_requested_before_load = RequestedHostnameCount(); 280 int hostnames_requested_before_load = RequestedHostnameCount();
275 ui_test_utils::NavigateToURL( 281 ui_test_utils::NavigateToURL(
276 browser(), 282 browser(),
277 GURL(test_server()->GetURL("files/predictor/dns_prefetch.html"))); 283 GURL(test_server()->GetURL("files/predictor/dns_prefetch.html")));
278 WaitUntilHostHasBeenRequested(kChromiumHostname); 284 WaitUntilHostHasBeenRequested(kChromiumHostname);
279 ASSERT_FALSE(HasHostBeenRequested(kInvalidLongHostname)); 285 ASSERT_FALSE(HasHostBeenRequested(kInvalidLongHostname));
280 ASSERT_EQ(hostnames_requested_before_load + 1, RequestedHostnameCount()); 286 ASSERT_EQ(hostnames_requested_before_load + 1, RequestedHostnameCount());
281 } 287 }
282 288
(...skipping 15 matching lines...) Expand all
298 net_log_observer.Attach(); 304 net_log_observer.Attach();
299 305
300 ui_test_utils::NavigateToURL(browser(), GURL(data_uri)); 306 ui_test_utils::NavigateToURL(browser(), GURL(data_uri));
301 307
302 net_log_observer.WaitForConnect(); 308 net_log_observer.WaitForConnect();
303 net_log_observer.Detach(); 309 net_log_observer.Detach();
304 } 310 }
305 311
306 } // namespace chrome_browser_net 312 } // namespace chrome_browser_net
307 313
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698