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

Side by Side Diff: content/browser/web_contents/aura/window_slider_unittest.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/web_contents/aura/window_slider.h" 5 #include "content/browser/web_contents/aura/window_slider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/aura/test/aura_test_base.h" 10 #include "ui/aura/test/aura_test_base.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // Tests that the window slide is cancelled when a different type of event 244 // Tests that the window slide is cancelled when a different type of event
245 // happens. 245 // happens.
246 TEST_F(WindowSliderTest, WindowSlideIsCancelledOnEvent) { 246 TEST_F(WindowSliderTest, WindowSlideIsCancelledOnEvent) {
247 scoped_ptr<aura::Window> window(CreateNormalWindow(0, root_window(), NULL)); 247 scoped_ptr<aura::Window> window(CreateNormalWindow(0, root_window(), NULL));
248 WindowSliderDelegateTest slider_delegate; 248 WindowSliderDelegateTest slider_delegate;
249 249
250 ui::Event* events[] = { 250 ui::Event* events[] = {
251 new ui::MouseEvent(ui::ET_MOUSE_MOVED, 251 new ui::MouseEvent(ui::ET_MOUSE_MOVED,
252 gfx::Point(55, 10), 252 gfx::Point(55, 10),
253 gfx::Point(55, 10), 253 gfx::Point(55, 10),
254 0), 254 0, 0),
255 new ui::KeyEvent(ui::ET_KEY_PRESSED, 255 new ui::KeyEvent(ui::ET_KEY_PRESSED,
256 ui::VKEY_A, 256 ui::VKEY_A,
257 0, 257 0,
258 true), 258 true),
259 NULL 259 NULL
260 }; 260 };
261 261
262 new WindowSlider(&slider_delegate, root_window(), window.get()); 262 new WindowSlider(&slider_delegate, root_window(), window.get());
263 for (int i = 0; events[i]; ++i) { 263 for (int i = 0; events[i]; ++i) {
264 // Generate a horizontal overscroll. 264 // Generate a horizontal overscroll.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 EXPECT_FALSE(slider_delegate.created_front_layer()); 404 EXPECT_FALSE(slider_delegate.created_front_layer());
405 EXPECT_FALSE(slider_delegate.slide_aborted()); 405 EXPECT_FALSE(slider_delegate.slide_aborted());
406 EXPECT_TRUE(slider_delegate.slider_destroyed()); 406 EXPECT_TRUE(slider_delegate.slider_destroyed());
407 407
408 // Destroying the slider would have destroyed |window| too. So |window| should 408 // Destroying the slider would have destroyed |window| too. So |window| should
409 // not need to be destroyed here. 409 // not need to be destroyed here.
410 EXPECT_EQ(child_windows, root_window()->children().size()); 410 EXPECT_EQ(child_windows, root_window()->children().size());
411 } 411 }
412 412
413 } // namespace content 413 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/synthetic_gesture_target_aura.cc ('k') | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698