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

Unified Diff: ash/common/test/ash_test.cc

Issue 2377853002: Test coverage for bug in WmWindowAura::OnWindowVisibilityChanged() (Closed)
Patch Set: parent and merge Created 4 years, 3 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/common/test/ash_test.h ('k') | ash/common/wm_window_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/test/ash_test.cc
diff --git a/ash/common/test/ash_test.cc b/ash/common/test/ash_test.cc
index 7f5630096e5eb0b7b09226c89ec7c052f1d48274..88030968a8bf716a2ebddbacd6d7c10ef3306ee9 100644
--- a/ash/common/test/ash_test.cc
+++ b/ash/common/test/ash_test.cc
@@ -5,7 +5,9 @@
#include "ash/common/test/ash_test.h"
#include "ash/common/test/ash_test_impl.h"
+#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
+#include "ui/compositor/layer_type.h"
#include "ui/display/display.h"
namespace ash {
@@ -34,6 +36,19 @@ std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds,
return test_impl_->CreateTestWindow(bounds, type, shell_window_id);
}
+std::unique_ptr<WindowOwner> AshTest::CreateChildWindow(WmWindow* parent,
+ const gfx::Rect& bounds,
+ int shell_window_id) {
+ std::unique_ptr<WindowOwner> window_owner =
+ base::MakeUnique<WindowOwner>(WmShell::Get()->NewWindow(
+ ui::wm::WINDOW_TYPE_NORMAL, ui::LAYER_NOT_DRAWN));
+ window_owner->window()->SetBounds(bounds);
+ window_owner->window()->SetShellWindowId(shell_window_id);
+ parent->AddChild(window_owner->window());
+ window_owner->window()->Show();
+ return window_owner;
+}
+
display::Display AshTest::GetSecondaryDisplay() {
return test_impl_->GetSecondaryDisplay();
}
« no previous file with comments | « ash/common/test/ash_test.h ('k') | ash/common/wm_window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698