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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 134183002: Pass frame to ChromeContentRendererClient::ShouldSuppressErrorPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix nits Created 6 years, 11 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) 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/basictypes.h" 5 #include "base/basictypes.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 RenderViewTest::SetUp(); 2064 RenderViewTest::SetUp();
2065 } 2065 }
2066 2066
2067 RenderViewImpl* view() { 2067 RenderViewImpl* view() {
2068 return static_cast<RenderViewImpl*>(view_); 2068 return static_cast<RenderViewImpl*>(view_);
2069 } 2069 }
2070 2070
2071 private: 2071 private:
2072 class TestContentRendererClient : public ContentRendererClient { 2072 class TestContentRendererClient : public ContentRendererClient {
2073 public: 2073 public:
2074 virtual bool ShouldSuppressErrorPage(const GURL& url) OVERRIDE { 2074 virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame,
2075 const GURL& url) OVERRIDE {
2075 return url == GURL("http://example.com/suppress"); 2076 return url == GURL("http://example.com/suppress");
2076 } 2077 }
2077 2078
2078 virtual void GetNavigationErrorStrings( 2079 virtual void GetNavigationErrorStrings(
2079 blink::WebFrame* frame, 2080 blink::WebFrame* frame,
2080 const blink::WebURLRequest& failed_request, 2081 const blink::WebURLRequest& failed_request,
2081 const blink::WebURLError& error, 2082 const blink::WebURLError& error,
2082 const std::string& accept_languages, 2083 const std::string& accept_languages,
2083 std::string* error_html, 2084 std::string* error_html,
2084 base::string16* error_description) OVERRIDE { 2085 base::string16* error_description) OVERRIDE {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 // made by some of Chrome's favicon handling. 2203 // made by some of Chrome's favicon handling.
2203 LoadHTML("<html>" 2204 LoadHTML("<html>"
2204 "<head>" 2205 "<head>"
2205 "</head>" 2206 "</head>"
2206 "</html>"); 2207 "</html>");
2207 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( 2208 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching(
2208 ViewHostMsg_UpdateFaviconURL::ID)); 2209 ViewHostMsg_UpdateFaviconURL::ID));
2209 } 2210 }
2210 2211
2211 } // namespace content 2212 } // namespace content
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698