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" |
11 #include "content/public/common/content_paths.h" | 11 #include "content/public/common/content_paths.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "content/public/test/browser_test_utils.h" | 13 #include "content/public/test/browser_test_utils.h" |
14 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
15 #include "content/shell/shell.h" | 15 #include "content/shell/browser/shell.h" |
16 #include "content/test/content_browser_test.h" | 16 #include "content/test/content_browser_test.h" |
17 #include "content/test/content_browser_test_utils.h" | 17 #include "content/test/content_browser_test_utils.h" |
18 #include "gpu/command_buffer/service/gpu_switches.h" | 18 #include "gpu/command_buffer/service/gpu_switches.h" |
19 #include "gpu/config/gpu_test_config.h" | 19 #include "gpu/config/gpu_test_config.h" |
20 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 // Run the tests with a memory limit of 256MB, and give | 24 // Run the tests with a memory limit of 256MB, and give |
25 // and extra 4MB of wiggle-room for over-allocation. | 25 // and extra 4MB of wiggle-room for over-allocation. |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 Shell* tab = CreateNewTab(); | 232 Shell* tab = CreateNewTab(); |
233 LoadPage(tab, PAGE_CSS3D, kMemoryLimitMB); | 233 LoadPage(tab, PAGE_CSS3D, kMemoryLimitMB); |
234 // Make sure that the CSS3D page maxes out a single tab's budget (otherwise | 234 // 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. | 235 // the test doesn't test anything) but still stays under the limit. |
236 EXPECT_TRUE(MemoryUsageInRange( | 236 EXPECT_TRUE(MemoryUsageInRange( |
237 kSingleTabLimitMB - kWiggleRoomMB, | 237 kSingleTabLimitMB - kWiggleRoomMB, |
238 kMemoryLimitMB + kWiggleRoomMB)); | 238 kMemoryLimitMB + kWiggleRoomMB)); |
239 } | 239 } |
240 | 240 |
241 } // namespace content | 241 } // namespace content |
OLD | NEW |