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

Side by Side Diff: ui/aura/test/test_windows.cc

Issue 8536027: Add test to verify that the stacking controller picks the correct activatable window for menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/test_windows.h ('k') | ui/aura_shell/stacking_controller_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura/test/test_windows.h" 5 #include "ui/aura/test/test_windows.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/gfx/compositor/layer.h" 8 #include "ui/gfx/compositor/layer.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
(...skipping 13 matching lines...) Expand all
24 const gfx::Rect& bounds, 24 const gfx::Rect& bounds,
25 Window* parent) { 25 Window* parent) {
26 return CreateTestWindowWithDelegate(new ColorTestWindowDelegate(color), 26 return CreateTestWindowWithDelegate(new ColorTestWindowDelegate(color),
27 id, bounds, parent); 27 id, bounds, parent);
28 } 28 }
29 29
30 Window* CreateTestWindowWithDelegate(WindowDelegate* delegate, 30 Window* CreateTestWindowWithDelegate(WindowDelegate* delegate,
31 int id, 31 int id,
32 const gfx::Rect& bounds, 32 const gfx::Rect& bounds,
33 Window* parent) { 33 Window* parent) {
34 return CreateTestWindowWithDelegateAndType(
35 delegate,
36 aura::WINDOW_TYPE_NORMAL,
37 id,
38 bounds,
39 parent);
40 }
41
42 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate,
43 WindowType type,
44 int id,
45 const gfx::Rect& bounds,
46 Window* parent) {
34 Window* window = new Window(delegate); 47 Window* window = new Window(delegate);
35 window->set_id(id); 48 window->set_id(id);
36 window->SetType(aura::WINDOW_TYPE_NORMAL); 49 window->SetType(type);
37 window->Init(ui::Layer::LAYER_HAS_TEXTURE); 50 window->Init(ui::Layer::LAYER_HAS_TEXTURE);
38 window->SetBounds(bounds); 51 window->SetBounds(bounds);
39 window->Show(); 52 window->Show();
40 window->SetParent(parent); 53 window->SetParent(parent);
41 return window; 54 return window;
42 } 55 }
43 56
44 } // namespace test 57 } // namespace test
45 } // namespace aura 58 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_windows.h ('k') | ui/aura_shell/stacking_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698