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

Side by Side Diff: ui/app_list/test/run_all_unittests.cc

Issue 1001873002: base: Rename discardable memory allocator interface and remove unnecessary class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-dm-types
Patch Set: fix child process DiscardableMemoryImpl Created 5 years, 9 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
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | ui/message_center/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_discardable_memory_shmem_allocator.h" 10 #include "base/test/test_discardable_memory_allocator.h"
11 #include "base/test/test_suite.h" 11 #include "base/test/test_suite.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/base/ui_base_paths.h" 14 #include "ui/base/ui_base_paths.h"
15 15
16 #if defined(OS_MACOSX) 16 #if defined(OS_MACOSX)
17 #include "base/test/mock_chrome_application_mac.h" 17 #include "base/test/mock_chrome_application_mac.h"
18 #endif 18 #endif
19 19
20 #if defined(TOOLKIT_VIEWS) 20 #if defined(TOOLKIT_VIEWS)
(...skipping 14 matching lines...) Expand all
35 #if defined(TOOLKIT_VIEWS) 35 #if defined(TOOLKIT_VIEWS)
36 gfx::GLSurface::InitializeOneOffForTests(); 36 gfx::GLSurface::InitializeOneOffForTests();
37 #endif 37 #endif
38 base::TestSuite::Initialize(); 38 base::TestSuite::Initialize();
39 ui::RegisterPathProvider(); 39 ui::RegisterPathProvider();
40 40
41 base::FilePath ui_test_pak_path; 41 base::FilePath ui_test_pak_path;
42 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 42 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
43 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 43 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
44 44
45 base::DiscardableMemoryShmemAllocator::SetInstance( 45 base::DiscardableMemoryAllocator::SetInstance(
46 &discardable_memory_allocator_); 46 &discardable_memory_allocator_);
47 } 47 }
48 48
49 void Shutdown() override { 49 void Shutdown() override {
50 ui::ResourceBundle::CleanupSharedInstance(); 50 ui::ResourceBundle::CleanupSharedInstance();
51 base::TestSuite::Shutdown(); 51 base::TestSuite::Shutdown();
52 } 52 }
53 53
54 private: 54 private:
55 base::TestDiscardableMemoryShmemAllocator discardable_memory_allocator_; 55 base::TestDiscardableMemoryAllocator discardable_memory_allocator_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(AppListTestSuite); 57 DISALLOW_COPY_AND_ASSIGN(AppListTestSuite);
58 }; 58 };
59 59
60 } // namespace 60 } // namespace
61 61
62 int main(int argc, char** argv) { 62 int main(int argc, char** argv) {
63 AppListTestSuite test_suite(argc, argv); 63 AppListTestSuite test_suite(argc, argv);
64 64
65 return base::LaunchUnitTests( 65 return base::LaunchUnitTests(
66 argc, 66 argc,
67 argv, 67 argv,
68 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); 68 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite)));
69 } 69 }
OLDNEW
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | ui/message_center/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698