| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ATHENA_TEST_BASE_TEST_UTIL_H_ | |
| 6 #define ATHENA_TEST_BASE_TEST_UTIL_H_ | |
| 7 | |
| 8 #include "athena/resource_manager/public/resource_manager.h" | |
| 9 #include "base/strings/string16.h" | |
| 10 | |
| 11 class GURL; | |
| 12 | |
| 13 namespace content { | |
| 14 class BrowserContext; | |
| 15 } | |
| 16 | |
| 17 namespace athena { | |
| 18 class Activity; | |
| 19 | |
| 20 namespace test_util { | |
| 21 // Sends a memory pressure event to the resource manager with a new |pressure| | |
| 22 // level. turning off asynchronous pressure changed events. | |
| 23 void SendTestMemoryPressureEvent(ResourceManager::MemoryPressure pressure); | |
| 24 | |
| 25 // Create a new web activity and return after the page is fully loaded. | |
| 26 Activity* CreateTestWebActivity(content::BrowserContext* context, | |
| 27 const base::string16& title, | |
| 28 const GURL& url); | |
| 29 | |
| 30 // Wait until the system is idle. | |
| 31 void WaitUntilIdle(); | |
| 32 | |
| 33 } // namespace test_util | |
| 34 | |
| 35 } // namespace athena | |
| 36 | |
| 37 #endif // ATHENA_TEST_BASE_TEST_UTIL_H_ | |
| OLD | NEW |