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

Unified Diff: ash/test/ash_test_base.cc

Issue 2821213002: chromeos: converts ash devtools to aura::Window (Closed)
Patch Set: fix cast Created 3 years, 8 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
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index ec5972b352b5a1427653f1357fe8f2feeaf072b4..24f734a9e51847297cef1e477cacb304c2d80c7b 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -248,6 +248,20 @@ aura::Window* AshTestBase::CreateTestWindowInShell(SkColor color,
new aura::test::ColorTestWindowDelegate(color), id, bounds);
}
+std::unique_ptr<aura::Window> AshTestBase::CreateChildWindow(
+ aura::Window* parent,
+ const gfx::Rect& bounds,
+ int shell_window_id) {
+ std::unique_ptr<aura::Window> window =
+ base::MakeUnique<aura::Window>(nullptr, ui::wm::WINDOW_TYPE_NORMAL);
+ window->Init(ui::LAYER_NOT_DRAWN);
+ window->SetBounds(bounds);
+ window->set_id(shell_window_id);
+ parent->AddChild(window.get());
+ window->Show();
+ return window;
+}
+
aura::Window* AshTestBase::CreateTestWindowInShellWithDelegate(
aura::WindowDelegate* delegate,
int id,

Powered by Google App Engine
This is Rietveld 408576698