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.h" | 5 #include "chrome/browser/memory/tab_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 TabStats stats; | 119 TabStats stats; |
120 stats.last_active = now; | 120 stats.last_active = now; |
121 stats.is_app = true; | 121 stats.is_app = true; |
122 stats.child_process_host_id = kApp; | 122 stats.child_process_host_id = kApp; |
123 test_list.push_back(stats); | 123 test_list.push_back(stats); |
124 } | 124 } |
125 | 125 |
126 { | 126 { |
127 TabStats stats; | 127 TabStats stats; |
128 stats.last_active = now; | 128 stats.last_active = now; |
129 stats.is_playing_audio = true; | 129 stats.is_media = true; |
130 stats.child_process_host_id = kPlayingAudio; | 130 stats.child_process_host_id = kPlayingAudio; |
131 test_list.push_back(stats); | 131 test_list.push_back(stats); |
132 } | 132 } |
133 | 133 |
134 { | 134 { |
135 TabStats stats; | 135 TabStats stats; |
136 stats.last_active = now; | 136 stats.last_active = now; |
137 stats.has_form_entry = true; | 137 stats.has_form_entry = true; |
138 stats.child_process_host_id = kFormEntry; | 138 stats.child_process_host_id = kFormEntry; |
139 test_list.push_back(stats); | 139 test_list.push_back(stats); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 EXPECT_EQ(new_last_active_time, test_contents->GetLastActiveTime()); | 330 EXPECT_EQ(new_last_active_time, test_contents->GetLastActiveTime()); |
331 | 331 |
332 WebContents* null_contents = tab_manager.DiscardWebContentsAt(1, &tabstrip); | 332 WebContents* null_contents = tab_manager.DiscardWebContentsAt(1, &tabstrip); |
333 EXPECT_EQ(new_last_active_time, null_contents->GetLastActiveTime()); | 333 EXPECT_EQ(new_last_active_time, null_contents->GetLastActiveTime()); |
334 | 334 |
335 tabstrip.CloseAllTabs(); | 335 tabstrip.CloseAllTabs(); |
336 EXPECT_TRUE(tabstrip.empty()); | 336 EXPECT_TRUE(tabstrip.empty()); |
337 } | 337 } |
338 | 338 |
339 } // namespace memory | 339 } // namespace memory |
OLD | NEW |