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

Side by Side Diff: ash/drag_drop/drag_drop_controller_unittest.cc

Issue 11787005: Get drag and drop working on Win Ash. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and take out dcheck for win Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ash/drag_drop/drag_drop_controller.cc ('k') | ui/base/dragdrop/drag_utils_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/drag_drop/drag_image_view.h" 7 #include "ash/drag_drop/drag_image_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 private: 228 private:
229 bool check_if_capture_lost_; 229 bool check_if_capture_lost_;
230 230
231 DISALLOW_COPY_AND_ASSIGN(TestNativeWidgetAura); 231 DISALLOW_COPY_AND_ASSIGN(TestNativeWidgetAura);
232 }; 232 };
233 233
234 // TODO(sky): this is for debugging, remove when track down failure. 234 // TODO(sky): this is for debugging, remove when track down failure.
235 void SetCheckIfCaptureLost(views::Widget* widget, bool value) { 235 void SetCheckIfCaptureLost(views::Widget* widget, bool value) {
236 // On Windows, the DCHECK triggers when running on bot or locally through RDP,
237 // but not when logged in locally.
238 #if !defined(OS_WIN)
236 static_cast<TestNativeWidgetAura*>(widget->native_widget())-> 239 static_cast<TestNativeWidgetAura*>(widget->native_widget())->
237 set_check_if_capture_lost(value); 240 set_check_if_capture_lost(value);
241 #endif
238 } 242 }
239 243
240 views::Widget* CreateNewWidget() { 244 views::Widget* CreateNewWidget() {
241 views::Widget* widget = new views::Widget; 245 views::Widget* widget = new views::Widget;
242 views::Widget::InitParams params; 246 views::Widget::InitParams params;
243 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 247 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
244 params.accept_events = true; 248 params.accept_events = true;
245 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 249 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
246 params.parent = Shell::GetPrimaryRootWindow(); 250 params.parent = Shell::GetPrimaryRootWindow();
247 params.child = true; 251 params.child = true;
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); 979 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
976 } 980 }
977 for (Shell::RootWindowList::iterator iter = root_windows.begin(); 981 for (Shell::RootWindowList::iterator iter = root_windows.begin();
978 iter != root_windows.end(); ++iter) { 982 iter != root_windows.end(); ++iter) {
979 aura::client::SetDragDropClient(*iter, NULL); 983 aura::client::SetDragDropClient(*iter, NULL);
980 } 984 }
981 } 985 }
982 986
983 } // namespace test 987 } // namespace test
984 } // namespace aura 988 } // namespace aura
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_controller.cc ('k') | ui/base/dragdrop/drag_utils_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698