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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 static const base::FilePath::CharType kTempDirName[] = | 32 static const base::FilePath::CharType kTempDirName[] = |
33 FILE_PATH_LITERAL("memory_test_profile"); | 33 FILE_PATH_LITERAL("memory_test_profile"); |
34 | 34 |
35 class MemoryTest : public UIPerfTest { | 35 class MemoryTest : public UIPerfTest { |
36 public: | 36 public: |
37 MemoryTest() : cleanup_temp_dir_on_exit_(false) {} | 37 MemoryTest() : cleanup_temp_dir_on_exit_(false) {} |
38 | 38 |
39 virtual ~MemoryTest() { | 39 virtual ~MemoryTest() { |
40 // Cleanup our temporary directory. | 40 // Cleanup our temporary directory. |
41 if (cleanup_temp_dir_on_exit_) | 41 if (cleanup_temp_dir_on_exit_) |
42 base::Delete(temp_dir_, true); | 42 base::DeleteFile(temp_dir_, true); |
43 } | 43 } |
44 | 44 |
45 // Called from SetUp() to determine the user data dir to copy. | 45 // Called from SetUp() to determine the user data dir to copy. |
46 virtual base::FilePath GetUserDataDirSource() const = 0; | 46 virtual base::FilePath GetUserDataDirSource() const = 0; |
47 | 47 |
48 // Called from RunTest() to determine the set of URLs to retrieve. | 48 // Called from RunTest() to determine the set of URLs to retrieve. |
49 // Returns the length of the list. | 49 // Returns the length of the list. |
50 virtual size_t GetUrlList(std::string** list) = 0; | 50 virtual size_t GetUrlList(std::string** list) = 0; |
51 | 51 |
52 virtual void SetUp() { | 52 virtual void SetUp() { |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 GENERAL_MIX_MEMORY_TESTS(SingleTabTest, 1); | 517 GENERAL_MIX_MEMORY_TESTS(SingleTabTest, 1); |
518 GENERAL_MIX_MEMORY_TESTS(FiveTabTest, 5); | 518 GENERAL_MIX_MEMORY_TESTS(FiveTabTest, 5); |
519 GENERAL_MIX_MEMORY_TESTS(TwelveTabTest, 12); | 519 GENERAL_MIX_MEMORY_TESTS(TwelveTabTest, 12); |
520 | 520 |
521 // Commented out until the recorded cache data is added. | 521 // Commented out until the recorded cache data is added. |
522 //TEST_F(MembusterMemoryTest, Windows) { | 522 //TEST_F(MembusterMemoryTest, Windows) { |
523 // RunTest("membuster", 0); | 523 // RunTest("membuster", 0); |
524 //} | 524 //} |
525 | 525 |
526 } // namespace | 526 } // namespace |
OLD | NEW |