summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-15 16:40:37 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-15 16:40:37 +0000
commitd93bacd7355059013865a8d1ca4b927bdbc38689 (patch)
tree0c4119c53a26e0d3911b31e71ac3d8dcfd76ced2 /ui/aura
parente06adfa329941a084b603cc9d2b8f00e0ec752c4 (diff)
downloadchromium_src-d93bacd7355059013865a8d1ca4b927bdbc38689.zip
chromium_src-d93bacd7355059013865a8d1ca4b927bdbc38689.tar.gz
chromium_src-d93bacd7355059013865a8d1ca4b927bdbc38689.tar.bz2
Add test to verify that the stacking controller picks the correct activatable window for menu.
BUG=103820 TEST=new test added (ClickOnMenu) The new test depends on http://codereview.chromium.org/8387043/ to pass. Review URL: http://codereview.chromium.org/8536027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/test/test_windows.cc15
-rw-r--r--ui/aura/test/test_windows.h6
2 files changed, 20 insertions, 1 deletions
diff --git a/ui/aura/test/test_windows.cc b/ui/aura/test/test_windows.cc
index 5fe85f4..98e5335 100644
--- a/ui/aura/test/test_windows.cc
+++ b/ui/aura/test/test_windows.cc
@@ -31,9 +31,22 @@ Window* CreateTestWindowWithDelegate(WindowDelegate* delegate,
int id,
const gfx::Rect& bounds,
Window* parent) {
+ return CreateTestWindowWithDelegateAndType(
+ delegate,
+ aura::WINDOW_TYPE_NORMAL,
+ id,
+ bounds,
+ parent);
+}
+
+Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate,
+ WindowType type,
+ int id,
+ const gfx::Rect& bounds,
+ Window* parent) {
Window* window = new Window(delegate);
window->set_id(id);
- window->SetType(aura::WINDOW_TYPE_NORMAL);
+ window->SetType(type);
window->Init(ui::Layer::LAYER_HAS_TEXTURE);
window->SetBounds(bounds);
window->Show();
diff --git a/ui/aura/test/test_windows.h b/ui/aura/test/test_windows.h
index 2edf133..c1babf0 100644
--- a/ui/aura/test/test_windows.h
+++ b/ui/aura/test/test_windows.h
@@ -10,6 +10,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/window_types.h"
namespace gfx {
class Canvas;
@@ -28,6 +29,11 @@ Window* CreateTestWindowWithDelegate(WindowDelegate* delegate,
int id,
const gfx::Rect& bounds,
Window* parent);
+Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate,
+ WindowType type,
+ int id,
+ const gfx::Rect& bounds,
+ Window* parent);
} // namespace test
} // namespace aura