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

Unified Diff: ash/test/ash_test_base.h

Issue 2144003003: Add CreateTestWidget() to AshTestBase, collapse duplicates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movetray
Patch Set: rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.h
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h
index a02ec9d388bb8b2dab61ec6d423609fdef1e0f35..288dbb54d30c6abc2f0a8ec531779556dcaed702 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -24,6 +24,12 @@
#include "ui/base/win/scoped_ole_initializer.h"
#endif
+namespace aura {
+class RootWindow;
+class Window;
+class WindowDelegate;
+} // namespace aura
+
namespace gfx {
class Rect;
}
@@ -34,11 +40,10 @@ class EventGenerator;
}
}
-namespace aura {
-class RootWindow;
-class Window;
-class WindowDelegate;
-} // namespace aura
+namespace views {
+class Widget;
+class WidgetDelegate;
+}
namespace ash {
class DisplayManager;
@@ -75,6 +80,13 @@ class AshTestBase : public testing::Test {
// primary root Window.
aura::Window* CurrentContext();
+ // Creates and shows a widget. See ash/common/shell_window_ids.h for values
+ // for |container_id|.
+ static std::unique_ptr<views::Widget> CreateTestWidget(
+ views::WidgetDelegate* delegate,
+ int container_id,
+ const gfx::Rect& bounds);
+
// Versions of the functions in aura::test:: that go through our shell
// StackingController instead of taking a parent.
aura::Window* CreateTestWindowInShellWithId(int id);
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698