| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "cc/trees/layer_tree_host.h" | 24 #include "cc/trees/layer_tree_host.h" |
| 25 #include "content/child/request_extra_data.h" | 25 #include "content/child/request_extra_data.h" |
| 26 #include "content/child/service_worker/service_worker_network_provider.h" | 26 #include "content/child/service_worker/service_worker_network_provider.h" |
| 27 #include "content/common/content_switches_internal.h" | 27 #include "content/common/content_switches_internal.h" |
| 28 #include "content/common/frame_messages.h" | 28 #include "content/common/frame_messages.h" |
| 29 #include "content/common/frame_owner_properties.h" | 29 #include "content/common/frame_owner_properties.h" |
| 30 #include "content/common/frame_replication_state.h" | 30 #include "content/common/frame_replication_state.h" |
| 31 #include "content/common/site_isolation_policy.h" | 31 #include "content/common/site_isolation_policy.h" |
| 32 #include "content/common/ssl_status_serialization.h" | |
| 33 #include "content/common/view_messages.h" | 32 #include "content/common/view_messages.h" |
| 34 #include "content/public/browser/browser_context.h" | 33 #include "content/public/browser/browser_context.h" |
| 35 #include "content/public/browser/native_web_keyboard_event.h" | 34 #include "content/public/browser/native_web_keyboard_event.h" |
| 36 #include "content/public/browser/web_ui_controller_factory.h" | 35 #include "content/public/browser/web_ui_controller_factory.h" |
| 37 #include "content/public/common/bindings_policy.h" | 36 #include "content/public/common/bindings_policy.h" |
| 38 #include "content/public/common/browser_side_navigation_policy.h" | 37 #include "content/public/common/browser_side_navigation_policy.h" |
| 39 #include "content/public/common/content_switches.h" | 38 #include "content/public/common/content_switches.h" |
| 40 #include "content/public/common/page_zoom.h" | 39 #include "content/public/common/page_zoom.h" |
| 41 #include "content/public/common/url_constants.h" | 40 #include "content/public/common/url_constants.h" |
| 42 #include "content/public/common/url_utils.h" | 41 #include "content/public/common/url_utils.h" |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 view()->GetWebView(), kMaxOutputCharacters))); | 1734 view()->GetWebView(), kMaxOutputCharacters))); |
| 1736 EXPECT_EQ(output, "hello \n\nworld"); | 1735 EXPECT_EQ(output, "hello \n\nworld"); |
| 1737 } | 1736 } |
| 1738 | 1737 |
| 1739 // This test ensures that a RenderFrame object is created for the top level | 1738 // This test ensures that a RenderFrame object is created for the top level |
| 1740 // frame in the RenderView. | 1739 // frame in the RenderView. |
| 1741 TEST_F(RenderViewImplTest, BasicRenderFrame) { | 1740 TEST_F(RenderViewImplTest, BasicRenderFrame) { |
| 1742 EXPECT_TRUE(view()->main_render_frame_); | 1741 EXPECT_TRUE(view()->main_render_frame_); |
| 1743 } | 1742 } |
| 1744 | 1743 |
| 1745 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { | |
| 1746 LoadHTML("<!DOCTYPE html><html><body></body></html>"); | |
| 1747 | |
| 1748 WebLocalFrame* frame = GetMainFrame(); | |
| 1749 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); | |
| 1750 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); | |
| 1751 | |
| 1752 SSLStatus status; | |
| 1753 status.cert_status = net::CERT_STATUS_ALL_ERRORS; | |
| 1754 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()) | |
| 1755 .setSecurityInfo(SerializeSecurityInfo(status)); | |
| 1756 ssl_status = view()->GetSSLStatusOfFrame(frame); | |
| 1757 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status)); | |
| 1758 } | |
| 1759 | |
| 1760 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { | 1744 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { |
| 1761 LoadHTML("<textarea id=\"test\"></textarea>"); | 1745 LoadHTML("<textarea id=\"test\"></textarea>"); |
| 1762 | 1746 |
| 1763 view()->SetHandlingInputEventForTesting(true); | 1747 view()->SetHandlingInputEventForTesting(true); |
| 1764 ExecuteJavaScriptForTests("document.getElementById('test').focus();"); | 1748 ExecuteJavaScriptForTests("document.getElementById('test').focus();"); |
| 1765 | 1749 |
| 1766 bool is_input_type_called = false; | 1750 bool is_input_type_called = false; |
| 1767 bool is_selection_called = false; | 1751 bool is_selection_called = false; |
| 1768 size_t last_input_type = 0; | 1752 size_t last_input_type = 0; |
| 1769 size_t last_selection = 0; | 1753 size_t last_selection = 0; |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 ExpectPauseAndResume(3); | 2480 ExpectPauseAndResume(3); |
| 2497 blink::WebScriptSource source2( | 2481 blink::WebScriptSource source2( |
| 2498 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2482 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2499 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2483 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
| 2500 | 2484 |
| 2501 EXPECT_FALSE(IsPaused()); | 2485 EXPECT_FALSE(IsPaused()); |
| 2502 Detach(); | 2486 Detach(); |
| 2503 } | 2487 } |
| 2504 | 2488 |
| 2505 } // namespace content | 2489 } // namespace content |
| OLD | NEW |