OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/memory_coordinator/browser/memory_coordinator.h" |
| 6 #include "components/memory_coordinator/common/memory_coordinator_features.h" |
| 7 #include "content/browser/browser_main_loop.h" |
| 8 #include "content/public/test/content_browser_test.h" |
| 9 #include "content/public/test/content_browser_test_utils.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class MemoryCoordinatorTest : public ContentBrowserTest { |
| 14 public: |
| 15 MemoryCoordinatorTest() {} |
| 16 |
| 17 void SetUp() override { |
| 18 memory_coordinator::EnableForTesting(); |
| 19 ContentBrowserTest::SetUp(); |
| 20 } |
| 21 |
| 22 protected: |
| 23 memory_coordinator::MemoryCoordinator* memory_coordinator() { |
| 24 return BrowserMainLoop::GetInstance()->memory_coordinator(); |
| 25 } |
| 26 |
| 27 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorTest); |
| 28 }; |
| 29 |
| 30 IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, HandleAdded) { |
| 31 GURL url = GetTestUrl("", "simple_page.html"); |
| 32 NavigateToURL(shell(), url); |
| 33 EXPECT_EQ(1u, memory_coordinator()->NumChildrenForTesting()); |
| 34 } |
| 35 |
| 36 } // namespace content |
OLD | NEW |