| OLD | NEW | 
|   1 // Copyright 2012 The Chromium Authors. All rights reserved. |   1 // Copyright 2012 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #if defined(USE_X11) |   5 #if defined(USE_X11) | 
|   6 #include <X11/Xlib.h> |   6 #include <X11/Xlib.h> | 
|   7 #endif |   7 #endif | 
|   8  |   8  | 
|   9 #include "base/at_exit.h" |   9 #include "base/at_exit.h" | 
|  10 #include "base/command_line.h" |  10 #include "base/command_line.h" | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  64   pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); |  64   pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); | 
|  65  |  65  | 
|  66   ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); |  66   ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); | 
|  67  |  67  | 
|  68   aura::Env::CreateInstance(); |  68   aura::Env::CreateInstance(); | 
|  69  |  69  | 
|  70   ui::InitializeInputMethodForTesting(); |  70   ui::InitializeInputMethodForTesting(); | 
|  71  |  71  | 
|  72   { |  72   { | 
|  73     views::DesktopTestViewsDelegate views_delegate; |  73     views::DesktopTestViewsDelegate views_delegate; | 
|  74     views::corewm::WMState wm_state; |  74     wm::WMState wm_state; | 
|  75  |  75  | 
|  76 #if !defined(OS_CHROMEOS) |  76 #if !defined(OS_CHROMEOS) | 
|  77     scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); |  77     scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); | 
|  78     gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |  78     gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 
|  79                                    desktop_screen.get()); |  79                                    desktop_screen.get()); | 
|  80 #endif |  80 #endif | 
|  81  |  81  | 
|  82     views::examples::ShowExamplesWindow( |  82     views::examples::ShowExamplesWindow( | 
|  83         views::examples::QUIT_ON_CLOSE, |  83         views::examples::QUIT_ON_CLOSE, | 
|  84         NULL, |  84         NULL, | 
|  85         scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); |  85         scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); | 
|  86  |  86  | 
|  87     base::RunLoop().Run(); |  87     base::RunLoop().Run(); | 
|  88  |  88  | 
|  89     ui::ResourceBundle::CleanupSharedInstance(); |  89     ui::ResourceBundle::CleanupSharedInstance(); | 
|  90   } |  90   } | 
|  91  |  91  | 
|  92   ui::ShutdownInputMethod(); |  92   ui::ShutdownInputMethod(); | 
|  93  |  93  | 
|  94   aura::Env::DeleteInstance(); |  94   aura::Env::DeleteInstance(); | 
|  95  |  95  | 
|  96   return 0; |  96   return 0; | 
|  97 } |  97 } | 
| OLD | NEW |