| 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 "chrome/browser/memory/tab_manager_delegate_chromeos.h" | 5 #include "chrome/browser/memory/tab_manager_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
| 13 #include "ash/test/ash_test_base.h" | 13 #include "ash/test/ash_test_base.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 17 #include "base/process/process_handle.h" | 17 #include "base/process/process_handle.h" |
| 18 #include "chrome/browser/chromeos/arc/arc_process.h" | 18 #include "chrome/browser/chromeos/arc/process/arc_process.h" |
| 19 #include "chrome/browser/memory/tab_manager.h" | 19 #include "chrome/browser/memory/tab_manager.h" |
| 20 #include "chrome/browser/memory/tab_stats.h" | 20 #include "chrome/browser/memory/tab_stats.h" |
| 21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 22 #include "chromeos/dbus/fake_debug_daemon_client.h" | 22 #include "chromeos/dbus/fake_debug_daemon_client.h" |
| 23 #include "components/arc/common/process.mojom.h" | 23 #include "components/arc/common/process.mojom.h" |
| 24 #include "components/arc/test/fake_arc_bridge_service.h" | 24 #include "components/arc/test/fake_arc_bridge_service.h" |
| 25 #include "components/exo/shell_surface.h" | 25 #include "components/exo/shell_surface.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| 28 #include "ui/wm/public/activation_client.h" | 28 #include "ui/wm/public/activation_client.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // Killed tabs and their content id. | 300 // Killed tabs and their content id. |
| 301 // Note that process with pid 11 is counted twice. But so far I don't have a | 301 // Note that process with pid 11 is counted twice. But so far I don't have a |
| 302 // good way to estimate the memory freed if multiple tabs share one process. | 302 // good way to estimate the memory freed if multiple tabs share one process. |
| 303 EXPECT_EQ(3U, killed_tabs.size()); | 303 EXPECT_EQ(3U, killed_tabs.size()); |
| 304 EXPECT_EQ(2, killed_tabs[0]); | 304 EXPECT_EQ(2, killed_tabs[0]); |
| 305 EXPECT_EQ(5, killed_tabs[1]); | 305 EXPECT_EQ(5, killed_tabs[1]); |
| 306 EXPECT_EQ(1, killed_tabs[2]); | 306 EXPECT_EQ(1, killed_tabs[2]); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace memory | 309 } // namespace memory |
| OLD | NEW |