OLD | NEW |
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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 public: | 478 public: |
479 explicit TestFailProvisionalLoadObserver(content::WebContents* contents) | 479 explicit TestFailProvisionalLoadObserver(content::WebContents* contents) |
480 : content::WebContentsObserver(contents) {} | 480 : content::WebContentsObserver(contents) {} |
481 ~TestFailProvisionalLoadObserver() override {} | 481 ~TestFailProvisionalLoadObserver() override {} |
482 | 482 |
483 // This method is invoked when the provisional load failed. | 483 // This method is invoked when the provisional load failed. |
484 void DidFailProvisionalLoad( | 484 void DidFailProvisionalLoad( |
485 content::RenderFrameHost* render_frame_host, | 485 content::RenderFrameHost* render_frame_host, |
486 const GURL& validated_url, | 486 const GURL& validated_url, |
487 int error_code, | 487 int error_code, |
488 const base::string16& error_description) override { | 488 const base::string16& error_description, |
| 489 bool was_ignored_by_handler) override { |
489 fail_url_ = validated_url; | 490 fail_url_ = validated_url; |
490 } | 491 } |
491 | 492 |
492 const GURL& fail_url() const { return fail_url_; } | 493 const GURL& fail_url() const { return fail_url_; } |
493 | 494 |
494 private: | 495 private: |
495 GURL fail_url_; | 496 GURL fail_url_; |
496 | 497 |
497 DISALLOW_COPY_AND_ASSIGN(TestFailProvisionalLoadObserver); | 498 DISALLOW_COPY_AND_ASSIGN(TestFailProvisionalLoadObserver); |
498 }; | 499 }; |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 ui_test_utils::NavigateToURL( | 1221 ui_test_utils::NavigateToURL( |
1221 browser(), | 1222 browser(), |
1222 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, | 1223 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, |
1223 kHostname)); | 1224 kHostname)); |
1224 | 1225 |
1225 ToggleHelpBox(browser()); | 1226 ToggleHelpBox(browser()); |
1226 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); | 1227 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); |
1227 } | 1228 } |
1228 | 1229 |
1229 } // namespace | 1230 } // namespace |
OLD | NEW |