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

Side by Side Diff: chrome/browser/memory/tab_manager_unittest.cc

Issue 1858033002: [ChromeOS] Do not send the memory pressure notification from chrome to renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gied ifdef Created 4 years, 8 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
« no previous file with comments | « chrome/browser/memory/tab_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 444
445 // Function that simply parrots back an externally specified memory pressure 445 // Function that simply parrots back an externally specified memory pressure
446 // level. 446 // level.
447 MemoryPressureLevel ReturnSpecifiedPressure( 447 MemoryPressureLevel ReturnSpecifiedPressure(
448 const MemoryPressureLevel* level) { 448 const MemoryPressureLevel* level) {
449 return *level; 449 return *level;
450 } 450 }
451 451
452 } // namespace 452 } // namespace
453 453
454 // ChildProcessNotification is disabled on Chrome OS. crbug.com/588172.
455 #if defined(OS_CHROMEOS)
456 #define MAYBE_ChildProcessNotifications DISABLED_ChildProcessNotifications
457 #else
458 #define MAYBE_ChildProcessNotifications ChildProcessNotifications
459 #endif
460
454 // Ensure that memory pressure notifications are forwarded to child processes. 461 // Ensure that memory pressure notifications are forwarded to child processes.
455 TEST_F(TabManagerTest, ChildProcessNotifications) { 462 TEST_F(TabManagerTest, MAYBE_ChildProcessNotifications) {
456 TabManager tm; 463 TabManager tm;
457 464
458 // Set up the tab strip. 465 // Set up the tab strip.
459 TabStripDummyDelegate delegate; 466 TabStripDummyDelegate delegate;
460 TabStripModel tabstrip(&delegate, profile()); 467 TabStripModel tabstrip(&delegate, profile());
461 468
462 // Create test clock, task runner. 469 // Create test clock, task runner.
463 base::SimpleTestTickClock test_clock; 470 base::SimpleTestTickClock test_clock;
464 MockTaskRunner mock_task_runner; 471 MockTaskRunner mock_task_runner;
465 scoped_refptr<TaskRunnerProxy> task_runner( 472 scoped_refptr<TaskRunnerProxy> task_runner(
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 EXPECT_EQ(0u, task_runner->size()); 592 EXPECT_EQ(0u, task_runner->size());
586 EXPECT_EQ(0u, tm.notified_renderers_.size()); 593 EXPECT_EQ(0u, tm.notified_renderers_.size());
587 594
588 595
589 // Clean up the tabstrip. 596 // Clean up the tabstrip.
590 tabstrip.CloseAllTabs(); 597 tabstrip.CloseAllTabs();
591 ASSERT_TRUE(tabstrip.empty()); 598 ASSERT_TRUE(tabstrip.empty());
592 } 599 }
593 600
594 } // namespace memory 601 } // namespace memory
OLDNEW
« no previous file with comments | « chrome/browser/memory/tab_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698