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

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

Issue 2136413002: Update Surface ID Terminology (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed webkit_unit_tests Created 4 years, 5 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 (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 3845 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 EXPECT_EQ("0 1 0", delegate.GetMouseMotionCountsAndReset()); 3856 EXPECT_EQ("0 1 0", delegate.GetMouseMotionCountsAndReset());
3857 3857
3858 view_->UnlockMouse(); 3858 view_->UnlockMouse();
3859 3859
3860 // view_ will be destroyed when parent is destroyed. 3860 // view_ will be destroyed when parent is destroyed.
3861 view_ = nullptr; 3861 view_ = nullptr;
3862 } 3862 }
3863 3863
3864 // Tests the RenderWidgetHostImpl sends the correct surface ID namespace to 3864 // Tests the RenderWidgetHostImpl sends the correct surface ID namespace to
3865 // the renderer process. 3865 // the renderer process.
3866 TEST_F(RenderWidgetHostViewAuraTest, SurfaceIdNamespaceInitialized) { 3866 TEST_F(RenderWidgetHostViewAuraTest, SurfaceClientIdInitialized) {
3867 gfx::Size size(5, 5); 3867 gfx::Size size(5, 5);
3868 3868
3869 const IPC::Message* msg = 3869 const IPC::Message* msg =
3870 sink_->GetUniqueMessageMatching(ViewMsg_SetSurfaceIdNamespace::ID); 3870 sink_->GetUniqueMessageMatching(ViewMsg_SetSurfaceClientId::ID);
3871 EXPECT_TRUE(msg); 3871 EXPECT_TRUE(msg);
3872 ViewMsg_SetSurfaceIdNamespace::Param params; 3872 ViewMsg_SetSurfaceClientId::Param params;
3873 ViewMsg_SetSurfaceIdNamespace::Read(msg, &params); 3873 ViewMsg_SetSurfaceClientId::Read(msg, &params);
3874 view_->InitAsChild(NULL); 3874 view_->InitAsChild(NULL);
3875 view_->Show(); 3875 view_->Show();
3876 view_->SetSize(size); 3876 view_->SetSize(size);
3877 view_->OnSwapCompositorFrame(0, 3877 view_->OnSwapCompositorFrame(0,
3878 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); 3878 MakeDelegatedFrame(1.f, size, gfx::Rect(size)));
3879 EXPECT_EQ(view_->GetSurfaceIdNamespace(), std::get<0>(params)); 3879 EXPECT_EQ(view_->GetSurfaceClientId(), std::get<0>(params));
3880 } 3880 }
3881 3881
3882 // This class provides functionality to test a RenderWidgetHostViewAura 3882 // This class provides functionality to test a RenderWidgetHostViewAura
3883 // instance which has been hooked up to a test RenderViewHost instance and 3883 // instance which has been hooked up to a test RenderViewHost instance and
3884 // a WebContents instance. 3884 // a WebContents instance.
3885 class RenderWidgetHostViewAuraWithViewHarnessTest 3885 class RenderWidgetHostViewAuraWithViewHarnessTest
3886 : public RenderViewHostImplTestHarness { 3886 : public RenderViewHostImplTestHarness {
3887 public: 3887 public:
3888 RenderWidgetHostViewAuraWithViewHarnessTest() 3888 RenderWidgetHostViewAuraWithViewHarnessTest()
3889 : view_(nullptr) {} 3889 : view_(nullptr) {}
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
4294 anchor_bound.set_type(gfx::SelectionBound::LEFT); 4294 anchor_bound.set_type(gfx::SelectionBound::LEFT);
4295 focus_bound.set_type(gfx::SelectionBound::RIGHT); 4295 focus_bound.set_type(gfx::SelectionBound::RIGHT);
4296 gfx::Rect measured_rect = 4296 gfx::Rect measured_rect =
4297 gfx::RectBetweenSelectionBounds(anchor_bound, focus_bound); 4297 gfx::RectBetweenSelectionBounds(anchor_bound, focus_bound);
4298 4298
4299 EXPECT_EQ(measured_rect, text_input_client()->GetCaretBounds()); 4299 EXPECT_EQ(measured_rect, text_input_client()->GetCaretBounds());
4300 } 4300 }
4301 } 4301 }
4302 4302
4303 } // namespace content 4303 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698