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

Unified Diff: athena/test/athena_test_helper.cc

Issue 345603003: aura: Allow specifying the size of TestScreen when creating it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: athena/test/athena_test_helper.cc
diff --git a/athena/test/athena_test_helper.cc b/athena/test/athena_test_helper.cc
index 1b99ea85316ac094590b77efe7c21226ba846f04..2e87d3e600da03d3b6d10f587c57568131221242 100644
--- a/athena/test/athena_test_helper.cc
+++ b/athena/test/athena_test_helper.cc
@@ -56,7 +56,8 @@ void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
ui::InitializeInputMethodForTesting();
- test_screen_.reset(aura::TestScreen::Create());
+ const gfx::Size host_size(800, 600);
+ test_screen_.reset(aura::TestScreen::Create(host_size));
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
host_.reset(test_screen_->CreateHostForPrimaryDisplay());
@@ -73,7 +74,7 @@ void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
root_window()->Show();
// Ensure width != height so tests won't confuse them.
- host()->SetBounds(gfx::Rect(800, 600));
+ host()->SetBounds(gfx::Rect(host_size));
athena::StartAthena(root_window(),
new SampleActivityFactory(),

Powered by Google App Engine
This is Rietveld 408576698