| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 kStatsFileCounters); | 208 kStatsFileCounters); |
| 209 StatsTable::set_current(table); | 209 StatsTable::set_current(table); |
| 210 | 210 |
| 211 TestShell* shell; | 211 TestShell* shell; |
| 212 if (TestShell::CreateNewWindow(uri.ToWStringHack(), &shell)) { | 212 if (TestShell::CreateNewWindow(uri.ToWStringHack(), &shell)) { |
| 213 if (record_mode || playback_mode) { | 213 if (record_mode || playback_mode) { |
| 214 platform.SetWindowPositionForRecording(shell); | 214 platform.SetWindowPositionForRecording(shell); |
| 215 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); | 215 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 shell->Show(shell->webView(), NEW_WINDOW); | 218 shell->Show(WebKit::WebNavigationPolicyNewWindow); |
| 219 | 219 |
| 220 if (parsed_command_line.HasSwitch(test_shell::kDumpStatsTable)) | 220 if (parsed_command_line.HasSwitch(test_shell::kDumpStatsTable)) |
| 221 shell->DumpStatsTableOnExit(); | 221 shell->DumpStatsTableOnExit(); |
| 222 | 222 |
| 223 bool no_events = parsed_command_line.HasSwitch(test_shell::kNoEvents); | 223 bool no_events = parsed_command_line.HasSwitch(test_shell::kNoEvents); |
| 224 if ((record_mode || playback_mode) && !no_events) { | 224 if ((record_mode || playback_mode) && !no_events) { |
| 225 FilePath script_path = cache_path; | 225 FilePath script_path = cache_path; |
| 226 // Create the cache directory in case it doesn't exist. | 226 // Create the cache directory in case it doesn't exist. |
| 227 file_util::CreateDirectory(cache_path); | 227 file_util::CreateDirectory(cache_path); |
| 228 script_path = script_path.AppendASCII("script.log"); | 228 script_path = script_path.AppendASCII("script.log"); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 TestShell::ShutdownTestShell(); | 325 TestShell::ShutdownTestShell(); |
| 326 TestShell::CleanupLogging(); | 326 TestShell::CleanupLogging(); |
| 327 | 327 |
| 328 // Tear down shared StatsTable; prevents unit_tests from leaking it. | 328 // Tear down shared StatsTable; prevents unit_tests from leaking it. |
| 329 StatsTable::set_current(NULL); | 329 StatsTable::set_current(NULL); |
| 330 delete table; | 330 delete table; |
| 331 | 331 |
| 332 return 0; | 332 return 0; |
| 333 } | 333 } |
| OLD | NEW |