OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/frame_host/render_widget_host_view_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/test/test_render_view_host.h" | 24 #include "content/test/test_render_view_host.h" |
25 #include "content/test/test_web_contents.h" | 25 #include "content/test/test_web_contents.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 namespace { | 29 namespace { |
30 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { | 30 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { |
31 public: | 31 public: |
32 MockRenderWidgetHostDelegate() {} | 32 MockRenderWidgetHostDelegate() {} |
33 ~MockRenderWidgetHostDelegate() override {} | 33 ~MockRenderWidgetHostDelegate() override {} |
| 34 |
| 35 private: |
| 36 // RenderWidgetHostDelegate: |
| 37 void Cut() override {} |
| 38 void Copy() override {} |
| 39 void Paste() override {} |
34 }; | 40 }; |
35 | 41 |
36 class RenderWidgetHostViewGuestTest : public testing::Test { | 42 class RenderWidgetHostViewGuestTest : public testing::Test { |
37 public: | 43 public: |
38 RenderWidgetHostViewGuestTest() {} | 44 RenderWidgetHostViewGuestTest() {} |
39 | 45 |
40 void SetUp() override { | 46 void SetUp() override { |
41 #if !defined(OS_ANDROID) | 47 #if !defined(OS_ANDROID) |
42 ImageTransportFactory::InitializeForUnitTests( | 48 ImageTransportFactory::InitializeForUnitTests( |
43 scoped_ptr<ImageTransportFactory>( | 49 scoped_ptr<ImageTransportFactory>( |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 browser_plugin_guest_->last_scale_factor_received_); | 266 browser_plugin_guest_->last_scale_factor_received_); |
261 } | 267 } |
262 } else { | 268 } else { |
263 EXPECT_TRUE(browser_plugin_guest_->received_delegated_frame_); | 269 EXPECT_TRUE(browser_plugin_guest_->received_delegated_frame_); |
264 EXPECT_EQ(view_size, browser_plugin_guest_->last_frame_size_received_); | 270 EXPECT_EQ(view_size, browser_plugin_guest_->last_frame_size_received_); |
265 EXPECT_EQ(scale_factor, browser_plugin_guest_->last_scale_factor_received_); | 271 EXPECT_EQ(scale_factor, browser_plugin_guest_->last_scale_factor_received_); |
266 } | 272 } |
267 } | 273 } |
268 | 274 |
269 } // namespace content | 275 } // namespace content |
OLD | NEW |