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

Side by Side Diff: ui/views/controls/webview/run_all_unittests.cc

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added an unittest and thread checker. Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/basictypes.h"
6 #include "base/bind.h" 5 #include "base/bind.h"
7 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
8 #include "base/path_service.h" 7 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 8 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h" 9 #include "base/test/test_suite.h"
11 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/base/ui_base_paths.h" 11 #include "ui/base/ui_base_paths.h"
13 #include "ui/gl/gl_surface.h" 12 #include "ui/gl/gl_surface.h"
14 13
15 class WMTestSuite : public base::TestSuite { 14 class WebViewTestSuite : public base::TestSuite {
16 public: 15 public:
17 WMTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 16 WebViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
18 17
19 protected: 18 protected:
20 virtual void Initialize() OVERRIDE { 19 virtual void Initialize() OVERRIDE {
21 base::TestSuite::Initialize(); 20 base::TestSuite::Initialize();
22 gfx::GLSurface::InitializeOneOffForTests(); 21 gfx::GLSurface::InitializeOneOffForTests();
23 ui::RegisterPathProvider(); 22 ui::RegisterPathProvider();
24 23
25 base::FilePath pak_dir; 24 base::FilePath pak_dir;
26 PathService::Get(base::DIR_MODULE, &pak_dir); 25 PathService::Get(base::DIR_MODULE, &pak_dir);
27 26
28 base::FilePath pak_file; 27 base::FilePath pak_file;
29 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 28 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
30 29
31 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 30 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
32 } 31 }
33 32
34 virtual void Shutdown() OVERRIDE { 33 virtual void Shutdown() OVERRIDE {
35 ui::ResourceBundle::CleanupSharedInstance(); 34 ui::ResourceBundle::CleanupSharedInstance();
36 base::TestSuite::Shutdown(); 35 base::TestSuite::Shutdown();
37 } 36 }
38 37
39 private: 38 private:
40 DISALLOW_COPY_AND_ASSIGN(WMTestSuite); 39 DISALLOW_COPY_AND_ASSIGN(WebViewTestSuite);
41 }; 40 };
42 41
43 int main(int argc, char** argv) { 42 int main(int argc, char** argv) {
44 WMTestSuite test_suite(argc, argv); 43 WebViewTestSuite test_suite(argc, argv);
45 44
46 return base::LaunchUnitTests( 45 return base::LaunchUnitTests(
47 argc, argv, base::Bind(&WMTestSuite::Run, base::Unretained(&test_suite))); 46 argc, argv, base::Bind(&WebViewTestSuite::Run,
47 base::Unretained(&test_suite)));
48 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698