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

Side by Side Diff: ui/views/examples/examples_main.cc

Issue 145293007: ui: No more TestCompositor. Use NullDraw contexts in unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testsnulldraw: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 PathService::Get(base::DIR_MODULE, &pak_dir); 43 PathService::Get(base::DIR_MODULE, &pak_dir);
44 44
45 base::FilePath pak_file; 45 base::FilePath pak_file;
46 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 46 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
47 47
48 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 48 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
49 49
50 gfx::GLSurface::InitializeOneOff(); 50 gfx::GLSurface::InitializeOneOff();
51 51
52 // The ContextFactory must exist before any Compositors are created. 52 // The ContextFactory must exist before any Compositors are created.
53 bool allow_test_contexts = false; 53 bool enable_pixel_output = true;
54 ui::InitializeContextFactoryForTests(allow_test_contexts); 54 ui::InitializeContextFactoryForTests(enable_pixel_output);
55 55
56 aura::Env::CreateInstance(); 56 aura::Env::CreateInstance();
57 57
58 ui::InitializeInputMethodForTesting(); 58 ui::InitializeInputMethodForTesting();
59 59
60 { 60 {
61 views::DesktopTestViewsDelegate views_delegate; 61 views::DesktopTestViewsDelegate views_delegate;
62 views::corewm::WMState wm_state; 62 views::corewm::WMState wm_state;
63 63
64 #if !defined(OS_CHROMEOS) 64 #if !defined(OS_CHROMEOS)
(...skipping 11 matching lines...) Expand all
76 76
77 ui::ResourceBundle::CleanupSharedInstance(); 77 ui::ResourceBundle::CleanupSharedInstance();
78 } 78 }
79 79
80 ui::ShutdownInputMethod(); 80 ui::ShutdownInputMethod();
81 81
82 aura::Env::DeleteInstance(); 82 aura::Env::DeleteInstance();
83 83
84 return 0; 84 return 0;
85 } 85 }
OLDNEW
« ui/gl/gl_implementation.h ('K') | « ui/views/DEPS ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698