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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed Created 3 years, 8 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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 #include <vector> 7 #include <vector>
8 8
9 // Include views_test_base.h first because the definition of None in X.h 9 // Include views_test_base.h first because the definition of None in X.h
10 // conflicts with the definition of None in gtest-type-util.h 10 // conflicts with the definition of None in gtest-type-util.h
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 widget_->GetNativeWindow()->GetRootWindow(), 401 widget_->GetNativeWindow()->GetRootWindow(),
402 widget_->GetNativeWindow(), 402 widget_->GetNativeWindow(),
403 gfx::Point(), 403 gfx::Point(),
404 ui::DragDropTypes::DRAG_COPY, 404 ui::DragDropTypes::DRAG_COPY,
405 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); 405 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
406 } 406 }
407 407
408 // ViewsTestBase: 408 // ViewsTestBase:
409 void SetUp() override { 409 void SetUp() override {
410 ViewsTestBase::SetUp(); 410 ViewsTestBase::SetUp();
411 views_delegate()->set_use_desktop_native_widgets(true); 411 test_views_delegate()->set_use_desktop_native_widgets(true);
412 412
413 // Create widget to initiate the drags. 413 // Create widget to initiate the drags.
414 widget_.reset(new Widget); 414 widget_.reset(new Widget);
415 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW); 415 Widget::InitParams params(Widget::InitParams::TYPE_WINDOW);
416 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 416 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
417 params.native_widget = new DesktopNativeWidgetAura(widget_.get()); 417 params.native_widget = new DesktopNativeWidgetAura(widget_.get());
418 params.bounds = gfx::Rect(100, 100); 418 params.bounds = gfx::Rect(100, 100);
419 widget_->Init(params); 419 widget_->Init(params);
420 widget_->Show(); 420 widget_->Show();
421 421
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 // the aura::client::DragDropDelegate is properly notified. 999 // the aura::client::DragDropDelegate is properly notified.
1000 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) { 1000 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) {
1001 base::ThreadTaskRunnerHandle::Get()->PostTask( 1001 base::ThreadTaskRunnerHandle::Get()->PostTask(
1002 FROM_HERE, 1002 FROM_HERE,
1003 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN)); 1003 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN));
1004 int result = StartDragAndDrop(); 1004 int result = StartDragAndDrop();
1005 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result); 1005 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result);
1006 } 1006 }
1007 1007
1008 } // namespace views 1008 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views_delegate.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698