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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/memory_pressure_listener.h" | 6 #include "base/memory/memory_pressure_listener.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/memory/oom_priority_manager.h" | 8 #include "chrome/browser/memory/oom_priority_manager.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
11 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 11 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
18 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 using content::OpenURLParams; | 21 using content::OpenURLParams; |
22 | 22 |
23 #if defined(OS_WIN) || defined(OS_CHROMEOS) | 23 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_LINUX) |
24 | 24 |
25 namespace memory { | 25 namespace memory { |
26 namespace { | 26 namespace { |
27 | 27 |
28 class OomPriorityManagerTest : public InProcessBrowserTest { | 28 class OomPriorityManagerTest : public InProcessBrowserTest { |
29 public: | 29 public: |
30 // Tab discarding is enabled by default on CrOS, on other platforms, force it | 30 // Tab discarding is enabled by default on CrOS, on other platforms, force it |
31 // by setting the command line flag. | 31 // by setting the command line flag. |
32 void SetUpCommandLine(base::CommandLine* command_line) override { | 32 void SetUpCommandLine(base::CommandLine* command_line) override { |
33 #if !defined(OS_CHROMEOS) | 33 #if !defined(OS_CHROMEOS) |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 if (oom_priority_manager->recent_tab_discard()) | 215 if (oom_priority_manager->recent_tab_discard()) |
216 break; | 216 break; |
217 } | 217 } |
218 EXPECT_TRUE(oom_priority_manager->recent_tab_discard()); | 218 EXPECT_TRUE(oom_priority_manager->recent_tab_discard()); |
219 } | 219 } |
220 | 220 |
221 } // namespace | 221 } // namespace |
222 } // namespace memory | 222 } // namespace memory |
223 | 223 |
224 #endif // OS_WIN || OS_CHROMEOS | 224 #endif // OS_WIN || OS_CHROMEOS |
OLD | NEW |