| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/memory/memory_coordinator_impl.h" | 5 #include "content/browser/memory/memory_coordinator_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
| 7 #include "base/test/scoped_feature_list.h" | 8 #include "base/test/scoped_feature_list.h" |
| 8 #include "content/browser/browser_main_loop.h" | 9 #include "content/browser/browser_main_loop.h" |
| 9 #include "content/public/common/content_features.h" | 10 #include "content/public/common/content_features.h" |
| 10 #include "content/public/test/content_browser_test.h" | 11 #include "content/public/test/content_browser_test.h" |
| 11 #include "content/public/test/content_browser_test_utils.h" | 12 #include "content/public/test/content_browser_test_utils.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate { | 16 class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate { |
| 16 public: | 17 public: |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 base::MakeUnique<TestMemoryCoordinatorDelegate>()); | 60 base::MakeUnique<TestMemoryCoordinatorDelegate>()); |
| 60 EXPECT_EQ(1u, memory_coordinator->children().size()); | 61 EXPECT_EQ(1u, memory_coordinator->children().size()); |
| 61 int render_process_id = memory_coordinator->children().begin()->first; | 62 int render_process_id = memory_coordinator->children().begin()->first; |
| 62 // Foreground tab cannot be suspended. | 63 // Foreground tab cannot be suspended. |
| 63 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); | 64 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); |
| 64 } | 65 } |
| 65 | 66 |
| 66 #endif // !defined(OS_MACOSX) | 67 #endif // !defined(OS_MACOSX) |
| 67 | 68 |
| 68 } // namespace content | 69 } // namespace content |
| OLD | NEW |