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

Side by Side Diff: chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc

Issue 1053303003: [MacViews] Implement colored window frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 7 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 "chrome/browser/ui/views/apps/shaped_app_window_targeter.h" 5 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h" 8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h"
9 #include "ui/aura/test/aura_test_base.h" 9 #include "ui/aura/test/aura_test_base.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 gfx::Point(32, 37), ui::EventTimeForNow(), ui::EF_NONE, 207 gfx::Point(32, 37), ui::EventTimeForNow(), ui::EF_NONE,
208 ui::EF_NONE); 208 ui::EF_NONE);
209 ui::EventDispatchDetails details = 209 ui::EventDispatchDetails details =
210 event_processor()->OnEventFromSource(&move); 210 event_processor()->OnEventFromSource(&move);
211 ASSERT_FALSE(details.dispatcher_destroyed); 211 ASSERT_FALSE(details.dispatcher_destroyed);
212 EXPECT_EQ(window, move.target()); 212 EXPECT_EQ(window, move.target());
213 } 213 }
214 214
215 #if !defined(OS_CHROMEOS) 215 #if !defined(OS_CHROMEOS)
216 // The non standard app frame has a easy resize targetter installed. 216 // The non standard app frame has a easy resize targetter installed.
217 scoped_ptr<apps::AppWindowFrameView> frame( 217 scoped_ptr<views::NonClientFrameView> frame(
218 app_window_views()->CreateNonStandardAppFrame()); 218 app_window_views()->CreateNonStandardAppFrame());
219 { 219 {
220 // Ensure that the window has an event targeter (there should be an 220 // Ensure that the window has an event targeter (there should be an
221 // EasyResizeWindowTargeter installed). 221 // EasyResizeWindowTargeter installed).
222 EXPECT_TRUE(static_cast<ui::EventTarget*>(window)->GetEventTargeter()); 222 EXPECT_TRUE(static_cast<ui::EventTarget*>(window)->GetEventTargeter());
223 } 223 }
224 { 224 {
225 // An event in the center of the window should always have 225 // An event in the center of the window should always have
226 // |window| as its target. 226 // |window| as its target.
227 // TODO(mgiuca): This isn't really testing anything (note that it has the 227 // TODO(mgiuca): This isn't really testing anything (note that it has the
(...skipping 19 matching lines...) Expand all
247 ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(32, 37), 247 ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(32, 37),
248 gfx::Point(32, 37), ui::EventTimeForNow(), ui::EF_NONE, 248 gfx::Point(32, 37), ui::EventTimeForNow(), ui::EF_NONE,
249 ui::EF_NONE); 249 ui::EF_NONE);
250 ui::EventDispatchDetails details = 250 ui::EventDispatchDetails details =
251 event_processor()->OnEventFromSource(&move); 251 event_processor()->OnEventFromSource(&move);
252 ASSERT_FALSE(details.dispatcher_destroyed); 252 ASSERT_FALSE(details.dispatcher_destroyed);
253 EXPECT_EQ(window, move.target()); 253 EXPECT_EQ(window, move.target());
254 } 254 }
255 #endif // defined (OS_CHROMEOS) 255 #endif // defined (OS_CHROMEOS)
256 } 256 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.mm ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698