Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/browser/memory/memory_coordinator_browsertest.cc

Issue 2261073002: Make HistoryBackend a client of memory coordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/memory_coordinator/browser/memory_coordinator.h" 5 #include "components/memory_coordinator/browser/memory_coordinator.h"
6 #include "components/memory_coordinator/common/memory_coordinator_features.h" 6 #include "components/memory_coordinator/common/memory_coordinator_features.h"
7 #include "content/browser/browser_main_loop.h" 7 #include "content/browser/browser_main_loop.h"
8 #include "content/public/test/content_browser_test.h" 8 #include "content/public/test/content_browser_test.h"
9 #include "content/public/test/content_browser_test_utils.h" 9 #include "content/public/test/content_browser_test_utils.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class MemoryCoordinatorTest : public ContentBrowserTest { 13 class MemoryCoordinatorTest : public ContentBrowserTest {
14 public: 14 public:
15 MemoryCoordinatorTest() {} 15 MemoryCoordinatorTest() {}
16 16
17 void SetUp() override { 17 void SetUp() override {
18 memory_coordinator::EnableForTesting(); 18 memory_coordinator::EnableForTesting();
19 ContentBrowserTest::SetUp(); 19 ContentBrowserTest::SetUp();
20 } 20 }
21 21
22 protected: 22 protected:
23 memory_coordinator::MemoryCoordinator* memory_coordinator() { 23 memory_coordinator::MemoryCoordinator* memory_coordinator() {
24 return BrowserMainLoop::GetInstance()->memory_coordinator(); 24 return memory_coordinator::MemoryCoordinator::GetInstance();
25 } 25 }
26 26
27 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorTest); 27 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorTest);
28 }; 28 };
29 29
30 IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, HandleAdded) { 30 IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, HandleAdded) {
31 GURL url = GetTestUrl("", "simple_page.html"); 31 GURL url = GetTestUrl("", "simple_page.html");
32 NavigateToURL(shell(), url); 32 NavigateToURL(shell(), url);
33 EXPECT_EQ(1u, memory_coordinator()->NumChildrenForTesting()); 33 EXPECT_EQ(1u, memory_coordinator()->NumChildrenForTesting());
34 } 34 }
35 35
36 } // namespace content 36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698