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> |
| 6 |
5 #include "base/command_line.h" | 7 #include "base/command_line.h" |
6 #include "base/debug/leak_annotations.h" | 8 #include "base/debug/leak_annotations.h" |
| 9 #include "build/build_config.h" |
7 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
8 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
9 #include "content/public/test/frame_load_waiter.h" | 12 #include "content/public/test/frame_load_waiter.h" |
10 #include "content/public/test/render_view_test.h" | 13 #include "content/public/test/render_view_test.h" |
11 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
12 #include "content/renderer/render_frame_impl.h" | 15 #include "content/renderer/render_frame_impl.h" |
13 #include "content/renderer/render_view_impl.h" | 16 #include "content/renderer/render_view_impl.h" |
14 #include "content/test/fake_compositor_dependencies.h" | 17 #include "content/test/fake_compositor_dependencies.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
17 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 20 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
18 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 21 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
19 | 22 |
20 namespace { | 23 namespace { |
21 const int32 kSubframeRouteId = 20; | 24 const int32_t kSubframeRouteId = 20; |
22 const int32 kSubframeWidgetRouteId = 21; | 25 const int32_t kSubframeWidgetRouteId = 21; |
23 const int32 kFrameProxyRouteId = 22; | 26 const int32_t kFrameProxyRouteId = 22; |
24 } // namespace | 27 } // namespace |
25 | 28 |
26 namespace content { | 29 namespace content { |
27 | 30 |
28 // RenderFrameImplTest creates a RenderFrameImpl that is a child of the | 31 // RenderFrameImplTest creates a RenderFrameImpl that is a child of the |
29 // main frame, and has its own RenderWidget. This behaves like an out | 32 // main frame, and has its own RenderWidget. This behaves like an out |
30 // of process frame even though it is in the same process as its parent. | 33 // of process frame even though it is in the same process as its parent. |
31 class RenderFrameImplTest : public RenderViewTest { | 34 class RenderFrameImplTest : public RenderViewTest { |
32 public: | 35 public: |
33 ~RenderFrameImplTest() override {} | 36 ~RenderFrameImplTest() override {} |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 171 |
169 ViewMsg_WasShown was_shown_message(0, true, ui::LatencyInfo()); | 172 ViewMsg_WasShown was_shown_message(0, true, ui::LatencyInfo()); |
170 static_cast<RenderViewImpl*>(view_)->OnMessageReceived(was_shown_message); | 173 static_cast<RenderViewImpl*>(view_)->OnMessageReceived(was_shown_message); |
171 | 174 |
172 // This test is primarily checking that this case does not crash, but | 175 // This test is primarily checking that this case does not crash, but |
173 // observers should still be notified. | 176 // observers should still be notified. |
174 EXPECT_TRUE(observer.visible()); | 177 EXPECT_TRUE(observer.visible()); |
175 } | 178 } |
176 | 179 |
177 } // namespace | 180 } // namespace |
OLD | NEW |