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

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

Issue 24503004: Show IDN in error screens (DNS failure etc.) (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/common/ssl_status_serialization.h" 10 #include "content/common/ssl_status_serialization.h"
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 class TestContentRendererClient : public ContentRendererClient { 1965 class TestContentRendererClient : public ContentRendererClient {
1966 public: 1966 public:
1967 virtual bool ShouldSuppressErrorPage(const GURL& url) OVERRIDE { 1967 virtual bool ShouldSuppressErrorPage(const GURL& url) OVERRIDE {
1968 return url == GURL("http://example.com/suppress"); 1968 return url == GURL("http://example.com/suppress");
1969 } 1969 }
1970 1970
1971 virtual void GetNavigationErrorStrings( 1971 virtual void GetNavigationErrorStrings(
1972 WebKit::WebFrame* frame, 1972 WebKit::WebFrame* frame,
1973 const WebKit::WebURLRequest& failed_request, 1973 const WebKit::WebURLRequest& failed_request,
1974 const WebKit::WebURLError& error, 1974 const WebKit::WebURLError& error,
1975 const std::string& accept_languages,
1975 std::string* error_html, 1976 std::string* error_html,
1976 string16* error_description) OVERRIDE { 1977 string16* error_description) OVERRIDE {
1977 if (error_html) 1978 if (error_html)
1978 *error_html = "A suffusion of yellow."; 1979 *error_html = "A suffusion of yellow.";
1979 } 1980 }
1980 }; 1981 };
1981 1982
1982 TestContentRendererClient client_; 1983 TestContentRendererClient client_;
1983 }; 1984 };
1984 1985
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 2021
2021 // An error occurred. 2022 // An error occurred.
2022 view()->didFailProvisionalLoad(web_frame, error); 2023 view()->didFailProvisionalLoad(web_frame, error);
2023 ProcessPendingMessages(); 2024 ProcessPendingMessages();
2024 const int kMaxOutputCharacters = 22; 2025 const int kMaxOutputCharacters = 22;
2025 EXPECT_EQ("A suffusion of yellow.", 2026 EXPECT_EQ("A suffusion of yellow.",
2026 UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters))); 2027 UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters)));
2027 } 2028 }
2028 2029
2029 } // namespace content 2030 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698