| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |