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

Unified Diff: ui/aura/test/aura_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: ui/aura/test/aura_test_helper.cc
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index 1b56512d376508eed8ae10942a520ebf3b37b455..7beca6095ca154ea565ec5b84d71a2224b7a639d 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -64,7 +64,8 @@ void AuraTestHelper::SetUp(ui::ContextFactory* context_factory) {
ui::InitializeInputMethodForTesting();
- test_screen_.reset(TestScreen::Create());
+ gfx::Size host_size(800, 600);
+ test_screen_.reset(TestScreen::Create(host_size));
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
host_.reset(test_screen_->CreateHostForPrimaryDisplay());
@@ -79,7 +80,7 @@ void AuraTestHelper::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));
}
void AuraTestHelper::TearDown() {

Powered by Google App Engine
This is Rietveld 408576698