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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest_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_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 "content/browser/compositor/test/no_transport_image_transport_factory.h " 9 #include "content/browser/compositor/test/no_transport_image_transport_factory.h "
10 #include "content/browser/renderer_host/render_widget_host_delegate.h" 10 #include "content/browser/renderer_host/render_widget_host_delegate.h"
11 #include "content/browser/renderer_host/render_widget_host_impl.h" 11 #include "content/browser/renderer_host/render_widget_host_impl.h"
12 #include "content/common/view_messages.h" 12 #include "content/common/view_messages.h"
13 #include "content/public/browser/render_widget_host_view.h" 13 #include "content/public/browser/render_widget_host_view.h"
14 #include "content/public/test/mock_render_process_host.h" 14 #include "content/public/test/mock_render_process_host.h"
15 #include "content/public/test/test_browser_context.h" 15 #include "content/public/test/test_browser_context.h"
16 #include "content/test/test_render_view_host.h" 16 #include "content/test/test_render_view_host.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace content { 19 namespace content {
20 namespace { 20 namespace {
21 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate { 21 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
22 public: 22 public:
23 MockRenderWidgetHostDelegate() {} 23 MockRenderWidgetHostDelegate() {}
24 ~MockRenderWidgetHostDelegate() override {} 24 ~MockRenderWidgetHostDelegate() override {}
25
26 private:
27 // RenderWidgetHostDelegate:
28 void Cut() override {}
29 void Copy() override {}
30 void Paste() override {}
25 }; 31 };
26 32
27 class RenderWidgetHostViewGuestTest : public testing::Test { 33 class RenderWidgetHostViewGuestTest : public testing::Test {
28 public: 34 public:
29 RenderWidgetHostViewGuestTest() {} 35 RenderWidgetHostViewGuestTest() {}
30 36
31 void SetUp() override { 37 void SetUp() override {
32 #if !defined(OS_ANDROID) 38 #if !defined(OS_ANDROID)
33 ImageTransportFactory::InitializeForUnitTests( 39 ImageTransportFactory::InitializeForUnitTests(
34 scoped_ptr<ImageTransportFactory>( 40 scoped_ptr<ImageTransportFactory>(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 82
77 TEST_F(RenderWidgetHostViewGuestTest, VisibilityTest) { 83 TEST_F(RenderWidgetHostViewGuestTest, VisibilityTest) {
78 view_->Show(); 84 view_->Show();
79 ASSERT_TRUE(view_->IsShowing()); 85 ASSERT_TRUE(view_->IsShowing());
80 86
81 view_->Hide(); 87 view_->Hide();
82 ASSERT_FALSE(view_->IsShowing()); 88 ASSERT_FALSE(view_->IsShowing());
83 } 89 }
84 90
85 } // namespace content 91 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698