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

Side by Side Diff: chrome/test/base/in_process_browser_test_browsertest.cc

Issue 1194383003: Add a flag showing whether the current request was ignored by a handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failures (DidFailProvisionalLoad calls in unit tests) Created 5 years, 5 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string.h> 5 #include <string.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 26 matching lines...) Expand all
37 public: 37 public:
38 explicit LoadFailObserver(content::WebContents* contents) 38 explicit LoadFailObserver(content::WebContents* contents)
39 : content::WebContentsObserver(contents), 39 : content::WebContentsObserver(contents),
40 failed_load_(false), 40 failed_load_(false),
41 error_code_(net::OK) { } 41 error_code_(net::OK) { }
42 42
43 void DidFailProvisionalLoad( 43 void DidFailProvisionalLoad(
44 content::RenderFrameHost* render_frame_host, 44 content::RenderFrameHost* render_frame_host,
45 const GURL& validated_url, 45 const GURL& validated_url,
46 int error_code, 46 int error_code,
47 const base::string16& error_description) override { 47 const base::string16& error_description,
48 bool was_ignored_by_handler) override {
48 failed_load_ = true; 49 failed_load_ = true;
49 error_code_ = static_cast<net::Error>(error_code); 50 error_code_ = static_cast<net::Error>(error_code);
50 validated_url_ = validated_url; 51 validated_url_ = validated_url;
51 } 52 }
52 53
53 bool failed_load() const { return failed_load_; } 54 bool failed_load() const { return failed_load_; }
54 net::Error error_code() const { return error_code_; } 55 net::Error error_code() const { return error_code_; }
55 const GURL& validated_url() const { return validated_url_; } 56 const GURL& validated_url() const { return validated_url_; }
56 57
57 private: 58 private:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ASSERT_TRUE(NavigateToURL(kFailHTML)); 135 ASSERT_TRUE(NavigateToURL(kFailHTML));
135 136
136 std::string test_result; 137 std::string test_result;
137 EXPECT_FALSE(RunAccessibilityChecks(&test_result)); 138 EXPECT_FALSE(RunAccessibilityChecks(&test_result));
138 139
139 // Error should NOT be empty on failure. 140 // Error should NOT be empty on failure.
140 EXPECT_NE("", test_result); 141 EXPECT_NE("", test_result);
141 } 142 }
142 143
143 } // namespace 144 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc ('k') | components/dom_distiller/content/distiller_page_web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698