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 "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 // expected result. | 1934 // expected result. |
1935 const int kMaxOutputCharacters = 256; | 1935 const int kMaxOutputCharacters = 256; |
1936 std::wstring output = UTF16ToWideHack( | 1936 std::wstring output = UTF16ToWideHack( |
1937 GetMainFrame()->contentAsText(kMaxOutputCharacters)); | 1937 GetMainFrame()->contentAsText(kMaxOutputCharacters)); |
1938 EXPECT_EQ(output, L"hello \n\nworld"); | 1938 EXPECT_EQ(output, L"hello \n\nworld"); |
1939 } | 1939 } |
1940 | 1940 |
1941 // This test ensures that a RenderFrame object is created for the top level | 1941 // This test ensures that a RenderFrame object is created for the top level |
1942 // frame in the RenderView. | 1942 // frame in the RenderView. |
1943 TEST_F(RenderViewImplTest, BasicRenderFrame) { | 1943 TEST_F(RenderViewImplTest, BasicRenderFrame) { |
1944 EXPECT_TRUE(view()->main_render_frame_.get()); | 1944 EXPECT_TRUE(view()->main_render_frame_); |
1945 } | 1945 } |
1946 | 1946 |
1947 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { | 1947 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { |
1948 LoadHTML("<!DOCTYPE html><html><body></body></html>"); | 1948 LoadHTML("<!DOCTYPE html><html><body></body></html>"); |
1949 | 1949 |
1950 WebFrame* frame = GetMainFrame(); | 1950 WebFrame* frame = GetMainFrame(); |
1951 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); | 1951 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); |
1952 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); | 1952 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); |
1953 | 1953 |
1954 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()). | 1954 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()). |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2074 | 2074 |
2075 // An error occurred. | 2075 // An error occurred. |
2076 view()->didFailProvisionalLoad(web_frame, error); | 2076 view()->didFailProvisionalLoad(web_frame, error); |
2077 ProcessPendingMessages(); | 2077 ProcessPendingMessages(); |
2078 const int kMaxOutputCharacters = 22; | 2078 const int kMaxOutputCharacters = 22; |
2079 EXPECT_EQ("A suffusion of yellow.", | 2079 EXPECT_EQ("A suffusion of yellow.", |
2080 UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters))); | 2080 UTF16ToASCII(web_frame->contentAsText(kMaxOutputCharacters))); |
2081 } | 2081 } |
2082 | 2082 |
2083 } // namespace content | 2083 } // namespace content |
OLD | NEW |