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

Unified Diff: ash/test/ash_test_base.h

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell_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 0865f39efa7d5947f0835bc0e18df5b59395f708..7a1c23bca1236c098b05eec1cfdd91554969f4da 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -11,8 +11,15 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/aura/client/window_types.h"
#include "ui/views/test/test_views_delegate.h"
+namespace aura {
+class Window;
+class WindowDelegate;
+}
+
namespace ash {
namespace internal {
class DisplayManager;
@@ -49,6 +56,26 @@ class AshTestBase : public testing::Test {
// See ash::test::DisplayManagerTestApi::UpdateDisplay for more details.
void UpdateDisplay(const std::string& display_specs);
+ // Versions of the functions in aura::test:: that go through our shell
+ // StackingController instead of taking a parent.
+ aura::Window* CreateTestWindowInShellWithId(int id);
+ aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds);
+ aura::Window* CreateTestWindowInShell(SkColor color,
+ int id,
+ const gfx::Rect& bounds);
+ aura::Window* CreateTestWindowInShellWithDelegate(
+ aura::WindowDelegate* delegate,
+ int id,
+ const gfx::Rect& bounds);
+ aura::Window* CreateTestWindowInShellWithDelegateAndType(
+ aura::WindowDelegate* delegate,
+ aura::client::WindowType type,
+ int id,
+ const gfx::Rect& bounds);
+
+ // Attach |window| to the current shell's root window.
+ void SetDefaultParentByPrimaryRootWindow(aura::Window* window);
+
protected:
void RunAllPendingInMessageLoop();
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698