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 <iostream> | 5 #include <iostream> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/event_recorder.h" | 10 #include "base/event_recorder.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // unique name to isolate separate instances from each other. | 201 // unique name to isolate separate instances from each other. |
202 StatsTable *table = new StatsTable( | 202 StatsTable *table = new StatsTable( |
203 // truncate the random # to 32 bits for the benefit of Mac OS X, to | 203 // truncate the random # to 32 bits for the benefit of Mac OS X, to |
204 // avoid tripping over its maximum shared memory segment name length | 204 // avoid tripping over its maximum shared memory segment name length |
205 kStatsFilePrefix + Uint64ToString(base::RandUint64() & 0xFFFFFFFFL), | 205 kStatsFilePrefix + Uint64ToString(base::RandUint64() & 0xFFFFFFFFL), |
206 kStatsFileThreads, | 206 kStatsFileThreads, |
207 kStatsFileCounters); | 207 kStatsFileCounters); |
208 StatsTable::set_current(table); | 208 StatsTable::set_current(table); |
209 | 209 |
210 TestShell* shell; | 210 TestShell* shell; |
211 if (TestShell::CreateNewWindow(uri.ToWStringHack(), &shell)) { | 211 if (TestShell::CreateNewWindow(net::FilePathToFileURL(uri), &shell)) { |
212 if (record_mode || playback_mode) { | 212 if (record_mode || playback_mode) { |
213 platform.SetWindowPositionForRecording(shell); | 213 platform.SetWindowPositionForRecording(shell); |
214 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); | 214 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); |
215 } | 215 } |
216 | 216 |
217 shell->Show(WebKit::WebNavigationPolicyNewWindow); | 217 shell->Show(WebKit::WebNavigationPolicyNewWindow); |
218 | 218 |
219 if (parsed_command_line.HasSwitch(test_shell::kDumpStatsTable)) | 219 if (parsed_command_line.HasSwitch(test_shell::kDumpStatsTable)) |
220 shell->DumpStatsTableOnExit(); | 220 shell->DumpStatsTableOnExit(); |
221 | 221 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 | 331 |
332 TestShell::ShutdownTestShell(); | 332 TestShell::ShutdownTestShell(); |
333 TestShell::CleanupLogging(); | 333 TestShell::CleanupLogging(); |
334 | 334 |
335 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 335 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
336 StatsTable::set_current(NULL); | 336 StatsTable::set_current(NULL); |
337 delete table; | 337 delete table; |
338 | 338 |
339 return 0; | 339 return 0; |
340 } | 340 } |
OLD | NEW |