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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2447143003: Use kRenderClientId command line flag when starting a render process (Closed)
Patch Set: Added RenderThread::GetClientId() to fix the problem where some tests don't have the kRendererClien… Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 4113 matching lines...) Expand 10 before | Expand all | Expand 10 after
4124 EXPECT_EQ("0 1 0", delegate.GetMouseMotionCountsAndReset()); 4124 EXPECT_EQ("0 1 0", delegate.GetMouseMotionCountsAndReset());
4125 4125
4126 view_->UnlockMouse(); 4126 view_->UnlockMouse();
4127 4127
4128 // view_ will be destroyed when parent is destroyed. 4128 // view_ will be destroyed when parent is destroyed.
4129 view_ = nullptr; 4129 view_ = nullptr;
4130 } 4130 }
4131 4131
4132 // Tests the RenderWidgetHostImpl sends the correct surface ID namespace to 4132 // Tests the RenderWidgetHostImpl sends the correct surface ID namespace to
4133 // the renderer process. 4133 // the renderer process.
4134 TEST_F(RenderWidgetHostViewAuraTest, FrameSinkIdInitialized) { 4134 TEST_F(RenderWidgetHostViewAuraTest, FrameSinkIdInitialized) {
Fady Samuel 2016/10/28 20:59:33 just delete this test. It's irrelevant I think.
Alex Z. 2016/10/31 15:19:23 Done.
4135 gfx::Size size(5, 5); 4135 gfx::Size size(5, 5);
4136 4136
4137 const IPC::Message* msg =
4138 sink_->GetUniqueMessageMatching(ViewMsg_SetFrameSinkId::ID);
4139 EXPECT_TRUE(msg);
4140 ViewMsg_SetFrameSinkId::Param params;
4141 ViewMsg_SetFrameSinkId::Read(msg, &params);
4142 view_->InitAsChild(nullptr); 4137 view_->InitAsChild(nullptr);
4143 view_->Show(); 4138 view_->Show();
4144 view_->SetSize(size); 4139 view_->SetSize(size);
4145 view_->OnSwapCompositorFrame(0, 4140 view_->OnSwapCompositorFrame(0,
4146 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); 4141 MakeDelegatedFrame(1.f, size, gfx::Rect(size)));
4147 EXPECT_EQ(view_->GetFrameSinkId(), std::get<0>(params));
4148 } 4142 }
4149 4143
4150 // This class provides functionality to test a RenderWidgetHostViewAura 4144 // This class provides functionality to test a RenderWidgetHostViewAura
4151 // instance which has been hooked up to a test RenderViewHost instance and 4145 // instance which has been hooked up to a test RenderViewHost instance and
4152 // a WebContents instance. 4146 // a WebContents instance.
4153 class RenderWidgetHostViewAuraWithViewHarnessTest 4147 class RenderWidgetHostViewAuraWithViewHarnessTest
4154 : public RenderViewHostImplTestHarness { 4148 : public RenderViewHostImplTestHarness {
4155 public: 4149 public:
4156 RenderWidgetHostViewAuraWithViewHarnessTest() 4150 RenderWidgetHostViewAuraWithViewHarnessTest()
4157 : view_(nullptr) {} 4151 : view_(nullptr) {}
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 4684
4691 // Retrieve the selected text from clipboard and verify it is as expected. 4685 // Retrieve the selected text from clipboard and verify it is as expected.
4692 base::string16 result_text; 4686 base::string16 result_text;
4693 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); 4687 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text);
4694 EXPECT_EQ(expected_text, result_text); 4688 EXPECT_EQ(expected_text, result_text);
4695 } 4689 }
4696 } 4690 }
4697 #endif 4691 #endif
4698 4692
4699 } // namespace content 4693 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698