Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc

Issue 1162373002: Make some editing/selection functions accessible to c/b/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nasko@'s comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.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 "cc/surfaces/surface.h" 9 #include "cc/surfaces/surface.h"
10 #include "cc/surfaces/surface_factory.h" 10 #include "cc/surfaces/surface_factory.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/public/test/test_browser_context.h" 21 #include "content/public/test/test_browser_context.h"
22 #include "content/test/test_render_view_host.h" 22 #include "content/test/test_render_view_host.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace content { 25 namespace content {
26 namespace { 26 namespace {
27 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { 27 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
28 public: 28 public:
29 MockRenderWidgetHostDelegate() {} 29 MockRenderWidgetHostDelegate() {}
30 ~MockRenderWidgetHostDelegate() override {} 30 ~MockRenderWidgetHostDelegate() override {}
31 private:
32 void Cut() override {}
33 void Copy() override {}
34 void Paste() override {}
31 }; 35 };
32 36
33 class MockCrossProcessFrameConnector : public CrossProcessFrameConnector { 37 class MockCrossProcessFrameConnector : public CrossProcessFrameConnector {
34 public: 38 public:
35 MockCrossProcessFrameConnector() 39 MockCrossProcessFrameConnector()
36 : CrossProcessFrameConnector(nullptr), 40 : CrossProcessFrameConnector(nullptr),
37 last_scale_factor_received_(0.f), 41 last_scale_factor_received_(0.f),
38 received_delegated_frame_(false) {} 42 received_delegated_frame_(false) {}
39 ~MockCrossProcessFrameConnector() override {} 43 ~MockCrossProcessFrameConnector() override {}
40 44
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 test_frame_connector_->last_scale_factor_received_); 183 test_frame_connector_->last_scale_factor_received_);
180 } 184 }
181 } else { 185 } else {
182 EXPECT_TRUE(test_frame_connector_->received_delegated_frame_); 186 EXPECT_TRUE(test_frame_connector_->received_delegated_frame_);
183 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); 187 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_);
184 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); 188 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_);
185 } 189 }
186 } 190 }
187 191
188 } // namespace content 192 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698