| 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 "chrome/browser/net/net_error_tab_helper.h" | 5 #include "chrome/browser/net/net_error_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/common/net/net_error_info.h" | |
| 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 7 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 8 #include "components/error_page/common/net_error_info.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
| 11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 using chrome_browser_net::NetErrorTabHelper; | 14 using chrome_browser_net::NetErrorTabHelper; |
| 15 using chrome_common_net::DnsProbeStatus; | 15 using chrome_common_net::DnsProbeStatus; |
| 16 | 16 |
| 17 class TestNetErrorTabHelper : public NetErrorTabHelper { | 17 class TestNetErrorTabHelper : public NetErrorTabHelper { |
| 18 public: | 18 public: |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 CommitProvisionalLoad(MAIN_FRAME); | 373 CommitProvisionalLoad(MAIN_FRAME); |
| 374 EXPECT_TRUE(probe_running()); | 374 EXPECT_TRUE(probe_running()); |
| 375 EXPECT_EQ(3, sent_count()); | 375 EXPECT_EQ(3, sent_count()); |
| 376 EXPECT_EQ(chrome_common_net::DNS_PROBE_STARTED, last_status_sent()); | 376 EXPECT_EQ(chrome_common_net::DNS_PROBE_STARTED, last_status_sent()); |
| 377 | 377 |
| 378 FinishProbe(chrome_common_net::DNS_PROBE_FINISHED_NXDOMAIN); | 378 FinishProbe(chrome_common_net::DNS_PROBE_FINISHED_NXDOMAIN); |
| 379 EXPECT_FALSE(probe_running()); | 379 EXPECT_FALSE(probe_running()); |
| 380 EXPECT_EQ(4, sent_count()); | 380 EXPECT_EQ(4, sent_count()); |
| 381 EXPECT_EQ(chrome_common_net::DNS_PROBE_FINISHED_NXDOMAIN, last_status_sent()); | 381 EXPECT_EQ(chrome_common_net::DNS_PROBE_FINISHED_NXDOMAIN, last_status_sent()); |
| 382 } | 382 } |
| OLD | NEW |