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

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

Issue 1009413002: Revert "base: Implement browser process support for discardable memory." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/renderer/render_thread_impl.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"
11 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/base/ui_base_paths.h" 13 #include "ui/base/ui_base_paths.h"
15 14
16 #if defined(OS_MACOSX) 15 #if defined(OS_MACOSX)
17 #include "base/test/mock_chrome_application_mac.h" 16 #include "base/test/mock_chrome_application_mac.h"
18 #endif 17 #endif
19 18
20 #if defined(TOOLKIT_VIEWS) 19 #if defined(TOOLKIT_VIEWS)
(...skipping 13 matching lines...) Expand all
34 #endif 33 #endif
35 #if defined(TOOLKIT_VIEWS) 34 #if defined(TOOLKIT_VIEWS)
36 gfx::GLSurface::InitializeOneOffForTests(); 35 gfx::GLSurface::InitializeOneOffForTests();
37 #endif 36 #endif
38 base::TestSuite::Initialize(); 37 base::TestSuite::Initialize();
39 ui::RegisterPathProvider(); 38 ui::RegisterPathProvider();
40 39
41 base::FilePath ui_test_pak_path; 40 base::FilePath ui_test_pak_path;
42 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 41 ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
43 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 42 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
44
45 base::DiscardableMemoryShmemAllocator::SetInstance(
46 &discardable_memory_allocator_);
47 } 43 }
48 44
49 void Shutdown() override { 45 void Shutdown() override {
50 ui::ResourceBundle::CleanupSharedInstance(); 46 ui::ResourceBundle::CleanupSharedInstance();
51 base::TestSuite::Shutdown(); 47 base::TestSuite::Shutdown();
52 } 48 }
53 49
54 private: 50 private:
55 base::TestDiscardableMemoryShmemAllocator discardable_memory_allocator_;
56
57 DISALLOW_COPY_AND_ASSIGN(AppListTestSuite); 51 DISALLOW_COPY_AND_ASSIGN(AppListTestSuite);
58 }; 52 };
59 53
60 } // namespace 54 } // namespace
61 55
62 int main(int argc, char** argv) { 56 int main(int argc, char** argv) {
63 AppListTestSuite test_suite(argc, argv); 57 AppListTestSuite test_suite(argc, argv);
64 58
65 return base::LaunchUnitTests( 59 return base::LaunchUnitTests(
66 argc, 60 argc,
67 argv, 61 argv,
68 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); 62 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite)));
69 } 63 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.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