OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/callback.h" | 5 #include "base/callback.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "content/public/browser/gpu_data_manager.h" | 8 #include "content/public/browser/gpu_data_manager.h" |
9 #include "content/public/browser/gpu_data_manager_observer.h" | 9 #include "content/public/browser/gpu_data_manager_observer.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 71 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
72 base::FilePath test_dir; | 72 base::FilePath test_dir; |
73 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &test_dir)); | 73 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &test_dir)); |
74 gpu_test_dir_ = test_dir.AppendASCII("gpu"); | 74 gpu_test_dir_ = test_dir.AppendASCII("gpu"); |
75 } | 75 } |
76 | 76 |
77 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 77 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
78 command_line->AppendSwitch(switches::kEnableLogging); | 78 command_line->AppendSwitch(switches::kEnableLogging); |
79 command_line->AppendSwitch(switches::kForceCompositingMode); | |
80 command_line->AppendSwitchASCII(switches::kForceGpuMemAvailableMb, | 79 command_line->AppendSwitchASCII(switches::kForceGpuMemAvailableMb, |
81 kMemoryLimitMBSwitch); | 80 kMemoryLimitMBSwitch); |
82 // Only run this on GPU bots for now. These tests should work with | 81 // Only run this on GPU bots for now. These tests should work with |
83 // any GPU process, but may be slow. | 82 // any GPU process, but may be slow. |
84 if (command_line->HasSwitch(switches::kUseGpuInTests)) { | 83 if (command_line->HasSwitch(switches::kUseGpuInTests)) { |
85 allow_tests_to_run_ = true; | 84 allow_tests_to_run_ = true; |
86 } | 85 } |
87 // Don't enable these tests on Android just yet (they use lots of memory and | 86 // Don't enable these tests on Android just yet (they use lots of memory and |
88 // may not be stable). | 87 // may not be stable). |
89 #if defined(OS_ANDROID) | 88 #if defined(OS_ANDROID) |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 Shell* tab = CreateNewTab(); | 231 Shell* tab = CreateNewTab(); |
233 LoadPage(tab, PAGE_CSS3D, kMemoryLimitMB); | 232 LoadPage(tab, PAGE_CSS3D, kMemoryLimitMB); |
234 // Make sure that the CSS3D page maxes out a single tab's budget (otherwise | 233 // Make sure that the CSS3D page maxes out a single tab's budget (otherwise |
235 // the test doesn't test anything) but still stays under the limit. | 234 // the test doesn't test anything) but still stays under the limit. |
236 EXPECT_TRUE(MemoryUsageInRange( | 235 EXPECT_TRUE(MemoryUsageInRange( |
237 kSingleTabLimitMB - kWiggleRoomMB, | 236 kSingleTabLimitMB - kWiggleRoomMB, |
238 kMemoryLimitMB + kWiggleRoomMB)); | 237 kMemoryLimitMB + kWiggleRoomMB)); |
239 } | 238 } |
240 | 239 |
241 } // namespace content | 240 } // namespace content |
OLD | NEW |