| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/leak_annotations.h" | 8 #include "base/debug/leak_annotations.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
| 11 #include "content/common/frame_owner_properties.h" | 11 #include "content/common/frame_owner_properties.h" |
| 12 #include "content/common/renderer.mojom.h" |
| 12 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
| 13 #include "content/public/renderer/document_state.h" | 14 #include "content/public/renderer/document_state.h" |
| 14 #include "content/public/test/frame_load_waiter.h" | 15 #include "content/public/test/frame_load_waiter.h" |
| 15 #include "content/public/test/render_view_test.h" | 16 #include "content/public/test/render_view_test.h" |
| 16 #include "content/public/test/test_utils.h" | 17 #include "content/public/test/test_utils.h" |
| 17 #include "content/renderer/navigation_state_impl.h" | 18 #include "content/renderer/navigation_state_impl.h" |
| 18 #include "content/renderer/render_frame_impl.h" | 19 #include "content/renderer/render_frame_impl.h" |
| 19 #include "content/renderer/render_view_impl.h" | 20 #include "content/renderer/render_view_impl.h" |
| 20 #include "content/test/fake_compositor_dependencies.h" | 21 #include "content/test/fake_compositor_dependencies.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 39 // main frame, and has its own RenderWidget. This behaves like an out | 40 // main frame, and has its own RenderWidget. This behaves like an out |
| 40 // of process frame even though it is in the same process as its parent. | 41 // of process frame even though it is in the same process as its parent. |
| 41 class RenderFrameImplTest : public RenderViewTest { | 42 class RenderFrameImplTest : public RenderViewTest { |
| 42 public: | 43 public: |
| 43 ~RenderFrameImplTest() override {} | 44 ~RenderFrameImplTest() override {} |
| 44 | 45 |
| 45 void SetUp() override { | 46 void SetUp() override { |
| 46 RenderViewTest::SetUp(); | 47 RenderViewTest::SetUp(); |
| 47 EXPECT_TRUE(GetMainRenderFrame()->is_main_frame_); | 48 EXPECT_TRUE(GetMainRenderFrame()->is_main_frame_); |
| 48 | 49 |
| 49 FrameMsg_NewFrame_WidgetParams widget_params; | 50 mojom::CreateFrameWidgetParams widget_params; |
| 50 widget_params.routing_id = kSubframeWidgetRouteId; | 51 widget_params.routing_id = kSubframeWidgetRouteId; |
| 51 widget_params.hidden = false; | 52 widget_params.hidden = false; |
| 52 | 53 |
| 53 IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess()); | 54 IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess()); |
| 54 | 55 |
| 55 LoadHTML("Parent frame <iframe name='frame'></iframe>"); | 56 LoadHTML("Parent frame <iframe name='frame'></iframe>"); |
| 56 | 57 |
| 57 FrameReplicationState frame_replication_state; | 58 FrameReplicationState frame_replication_state; |
| 58 frame_replication_state.name = "frame"; | 59 frame_replication_state.name = "frame"; |
| 59 frame_replication_state.unique_name = "frame-uniqueName"; | 60 frame_replication_state.unique_name = "frame-uniqueName"; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 const std::string exceeded_data_url(1024 * 1024 * 20 + 1, 'd'); | 338 const std::string exceeded_data_url(1024 * 1024 * 20 + 1, 'd'); |
| 338 | 339 |
| 339 frame()->saveImageFromDataURL(WebString::fromUTF8(exceeded_data_url)); | 340 frame()->saveImageFromDataURL(WebString::fromUTF8(exceeded_data_url)); |
| 340 ProcessPendingMessages(); | 341 ProcessPendingMessages(); |
| 341 const IPC::Message* msg4 = render_thread_->sink().GetFirstMessageMatching( | 342 const IPC::Message* msg4 = render_thread_->sink().GetFirstMessageMatching( |
| 342 FrameHostMsg_SaveImageFromDataURL::ID); | 343 FrameHostMsg_SaveImageFromDataURL::ID); |
| 343 EXPECT_FALSE(msg4); | 344 EXPECT_FALSE(msg4); |
| 344 } | 345 } |
| 345 | 346 |
| 346 } // namespace | 347 } // namespace |
| OLD | NEW |