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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 class StartupFileTest : public StartupTest { | 104 class StartupFileTest : public StartupTest { |
105 public: | 105 public: |
106 // Load a file on startup rather than about:blank. This tests a longer | 106 // Load a file on startup rather than about:blank. This tests a longer |
107 // startup path, including resource loading and the loading of gears.dll. | 107 // startup path, including resource loading and the loading of gears.dll. |
108 void SetUp() { | 108 void SetUp() { |
109 std::wstring file_url; | 109 std::wstring file_url; |
110 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &file_url)); | 110 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &file_url)); |
111 file_util::AppendToPath(&file_url, L"empty.html"); | 111 file_util::AppendToPath(&file_url, L"empty.html"); |
112 ASSERT_TRUE(file_util::PathExists(file_url)); | 112 ASSERT_TRUE(file_util::PathExists(file_url)); |
113 launch_arguments_ += file_url; | 113 launch_arguments_.AppendLooseValue(file_url); |
114 | 114 |
115 pages_ = WideToUTF8(file_url); | 115 pages_ = WideToUTF8(file_url); |
116 } | 116 } |
117 }; | 117 }; |
118 } // namespace | 118 } // namespace |
119 | 119 |
120 TEST_F(StartupTest, Perf) { | 120 TEST_F(StartupTest, Perf) { |
121 RunStartupTest(L"warm", L"t", false /* not cold */, true /* important */); | 121 RunStartupTest(L"warm", L"t", false /* not cold */, true /* important */); |
122 } | 122 } |
123 | 123 |
(...skipping 11 matching lines...) Expand all Loading... |
135 TEST_F(StartupFileTest, PerfGears) { | 135 TEST_F(StartupFileTest, PerfGears) { |
136 RunStartupTest(L"warm", L"gears", false /* not cold */, | 136 RunStartupTest(L"warm", L"gears", false /* not cold */, |
137 false /* not important */); | 137 false /* not important */); |
138 } | 138 } |
139 | 139 |
140 TEST_F(StartupFileTest, PerfColdGears) { | 140 TEST_F(StartupFileTest, PerfColdGears) { |
141 RunStartupTest(L"cold", L"gears", true /* cold */, | 141 RunStartupTest(L"cold", L"gears", true /* cold */, |
142 false /* not important */); | 142 false /* not important */); |
143 } | 143 } |
144 | 144 |
OLD | NEW |