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

Unified Diff: ui/views/corewm/desktop_capture_controller_unittest.cc

Issue 2466023003: Makes CaptureController be created and owned by WMState (Closed)
Patch Set: moar 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ui/views/test/views_test_helper_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/desktop_capture_controller_unittest.cc
diff --git a/ui/views/corewm/desktop_capture_controller_unittest.cc b/ui/views/corewm/desktop_capture_controller_unittest.cc
index f32a3cbed23e574acde1907731d0bcfff145f04f..b4b852f9f2e14e5030ebb6b001d9f65cae54284b 100644
--- a/ui/views/corewm/desktop_capture_controller_unittest.cc
+++ b/ui/views/corewm/desktop_capture_controller_unittest.cc
@@ -100,8 +100,7 @@ TEST_F(DesktopCaptureControllerTest, CaptureWindowInputEventTest) {
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
std::unique_ptr<wm::ScopedCaptureClient> scoped_capture_client(
new wm::ScopedCaptureClient(params.context->GetRootWindow()));
- aura::client::CaptureClient* capture_client =
- scoped_capture_client->capture_client();
+ aura::client::CaptureClient* capture_client = wm::CaptureController::Get();
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
params.bounds = gfx::Rect(50, 50, 650, 650);
widget1->Init(params);
@@ -142,8 +141,7 @@ TEST_F(DesktopCaptureControllerTest, CaptureWindowInputEventTest) {
EXPECT_FALSE(widget1->GetNativeView()->HasCapture());
EXPECT_FALSE(widget2->GetNativeView()->HasCapture());
- EXPECT_EQ(reinterpret_cast<aura::Window*>(0),
- capture_client->GetCaptureWindow());
+ EXPECT_EQ(nullptr, capture_client->GetCaptureWindow());
widget1->GetNativeView()->SetCapture();
EXPECT_TRUE(widget1->GetNativeView()->HasCapture());
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ui/views/test/views_test_helper_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698