| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_UI_UI_TEST_H_ | 5 #ifndef CHROME_TEST_UI_UI_TEST_H_ |
| 6 #define CHROME_TEST_UI_UI_TEST_H_ | 6 #define CHROME_TEST_UI_UI_TEST_H_ |
| 7 | 7 |
| 8 // This file provides a common base for running UI unit tests, which operate | 8 // This file provides a common base for running UI unit tests, which operate |
| 9 // the entire browser application in a separate process for holistic | 9 // the entire browser application in a separate process for holistic |
| 10 // functional testing. | 10 // functional testing. |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 bool EvictFileFromSystemCacheWrapper(const FilePath& path); | 445 bool EvictFileFromSystemCacheWrapper(const FilePath& path); |
| 446 | 446 |
| 447 // Synchronously launches local http server normally used to run LayoutTests. | 447 // Synchronously launches local http server normally used to run LayoutTests. |
| 448 void StartHttpServer(const FilePath& root_directory); | 448 void StartHttpServer(const FilePath& root_directory); |
| 449 | 449 |
| 450 // Launches local http server on the specified port. | 450 // Launches local http server on the specified port. |
| 451 void StartHttpServerWithPort(const FilePath& root_directory, | 451 void StartHttpServerWithPort(const FilePath& root_directory, |
| 452 const std::wstring& port); | 452 const std::wstring& port); |
| 453 void StopHttpServer(); | 453 void StopHttpServer(); |
| 454 | 454 |
| 455 // Prints IO performance data for use by perf graphs. |
| 456 void PrintIOPerfInfo(const char* test_name, FilePath data_dir); |
| 457 |
| 458 // Prints memory usage data for use by perf graphs. |
| 459 void PrintMemoryUsageInfo(const char* test_name, FilePath data_dir); |
| 460 |
| 461 // Prints memory commit charge stats for use by perf graphs. |
| 462 void PrintSystemCommitCharge(const char* test_name, size_t charge); |
| 463 |
| 455 private: | 464 private: |
| 456 // Check that no processes related to Chrome exist, displaying | 465 // Check that no processes related to Chrome exist, displaying |
| 457 // the given message if any do. | 466 // the given message if any do. |
| 458 void AssertAppNotRunning(const std::wstring& error_message); | 467 void AssertAppNotRunning(const std::wstring& error_message); |
| 459 | 468 |
| 460 // Common functionality for the public PrintResults methods. | 469 // Common functionality for the public PrintResults methods. |
| 461 void PrintResultsImpl(const std::string& measurement, | 470 void PrintResultsImpl(const std::string& measurement, |
| 462 const std::string& modifier, | 471 const std::string& modifier, |
| 463 const std::string& trace, | 472 const std::string& trace, |
| 464 const std::string& values, | 473 const std::string& values, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 #ifdef UNIT_TEST | 579 #ifdef UNIT_TEST |
| 571 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); | 580 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); |
| 572 | 581 |
| 573 template<typename T> | 582 template<typename T> |
| 574 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { | 583 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { |
| 575 return out << ptr.get(); | 584 return out << ptr.get(); |
| 576 } | 585 } |
| 577 #endif // UNIT_TEST | 586 #endif // UNIT_TEST |
| 578 | 587 |
| 579 #endif // CHROME_TEST_UI_UI_TEST_H_ | 588 #endif // CHROME_TEST_UI_UI_TEST_H_ |
| OLD | NEW |