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

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

Issue 1391423002: net: Remove FilePath version of URLRequestMockHTTPJob::GetMockUrl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke review Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <set> 5 #include <set>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_NO_INTERNET, 891 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_NO_INTERNET,
892 WaitForSentStatus()); 892 WaitForSentStatus());
893 893
894 EXPECT_EQ("", Title()); 894 EXPECT_EQ("", Title());
895 } 895 }
896 896
897 // Make sure probes don't run for subframe DNS errors. 897 // Make sure probes don't run for subframe DNS errors.
898 IN_PROC_BROWSER_TEST_F(DnsProbeBrowserTest, NoProbeInSubframe) { 898 IN_PROC_BROWSER_TEST_F(DnsProbeBrowserTest, NoProbeInSubframe) {
899 SetCorrectionServiceBroken(false); 899 SetCorrectionServiceBroken(false);
900 900
901 const FilePath::CharType kIframeDnsErrorHtmlName[] = 901 NavigateToURL(browser(),
902 FILE_PATH_LITERAL("iframe_dns_error.html"); 902 URLRequestMockHTTPJob::GetMockUrl("iframe_dns_error.html"));
903
904 NavigateToURL(
905 browser(),
906 URLRequestMockHTTPJob::GetMockUrl(FilePath(kIframeDnsErrorHtmlName)));
907 903
908 // By the time NavigateToURL returns, the browser will have seen the failed 904 // By the time NavigateToURL returns, the browser will have seen the failed
909 // provisional load. If a probe was started (or considered but not run), 905 // provisional load. If a probe was started (or considered but not run),
910 // then the NetErrorTabHelper would have sent a NetErrorInfo message. Thus, 906 // then the NetErrorTabHelper would have sent a NetErrorInfo message. Thus,
911 // if one hasn't been sent by now, the NetErrorTabHelper has not (and won't) 907 // if one hasn't been sent by now, the NetErrorTabHelper has not (and won't)
912 // start a probe for this DNS error. 908 // start a probe for this DNS error.
913 EXPECT_EQ(0, pending_status_count()); 909 EXPECT_EQ(0, pending_status_count());
914 } 910 }
915 911
916 // Make sure browser sends NOT_RUN properly when probes are disabled. 912 // Make sure browser sends NOT_RUN properly when probes are disabled.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 985
990 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, 986 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE,
991 WaitForSentStatus()); 987 WaitForSentStatus());
992 EXPECT_EQ(0, pending_status_count()); 988 EXPECT_EQ(0, pending_status_count());
993 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); 989 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED");
994 } 990 }
995 991
996 } // namespace 992 } // namespace
997 993
998 } // namespace chrome_browser_net 994 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/browser_close_manager_browsertest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698