| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |