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

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

Issue 2321313002: Move components/memory_coordinator -> content/ (Closed)
Patch Set: rebase etc 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 "content/browser/memory/memory_coordinator.h"
6 6
7 #include "base/memory/memory_pressure_monitor.h" 7 #include "base/memory/memory_pressure_monitor.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "components/memory_coordinator/common/memory_coordinator_features.h"
11 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
12 11
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace memory_coordinator { 14 namespace content {
16 15
17 namespace { 16 namespace {
18 17
19 void RunUntilIdle() { 18 void RunUntilIdle() {
20 base::RunLoop loop; 19 base::RunLoop loop;
21 loop.RunUntilIdle(); 20 loop.RunUntilIdle();
22 } 21 }
23 22
24 } // namespace 23 } // namespace
25 24
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 129
131 EXPECT_TRUE(mc.SetMemoryState(1, mojom::MemoryState::THROTTLED)); 130 EXPECT_TRUE(mc.SetMemoryState(1, mojom::MemoryState::THROTTLED));
132 EXPECT_EQ(1, cmc1->on_state_change_calls()); 131 EXPECT_EQ(1, cmc1->on_state_change_calls());
133 EXPECT_EQ(mojom::MemoryState::THROTTLED, cmc1->state()); 132 EXPECT_EQ(mojom::MemoryState::THROTTLED, cmc1->state());
134 133
135 EXPECT_TRUE(mc.SetMemoryState(2, mojom::MemoryState::SUSPENDED)); 134 EXPECT_TRUE(mc.SetMemoryState(2, mojom::MemoryState::SUSPENDED));
136 EXPECT_EQ(1, cmc2->on_state_change_calls()); 135 EXPECT_EQ(1, cmc2->on_state_change_calls());
137 EXPECT_EQ(mojom::MemoryState::SUSPENDED, cmc2->state()); 136 EXPECT_EQ(mojom::MemoryState::SUSPENDED, cmc2->state());
138 } 137 }
139 138
140 } // namespace memory_coordinator 139 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698