diff options
Diffstat (limited to 'webkit/tools/test_shell/test_shell_main.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 8ae0714..9752901 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -30,10 +30,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" #include "ui/gfx/gl/gl_implementation.h" #include "ui/gfx/gl/gl_switches.h" -#include "webkit/extensions/v8/gc_extension.h" -#include "webkit/extensions/v8/heap_profiler_extension.h" -#include "webkit/extensions/v8/playback_extension.h" -#include "webkit/extensions/v8/profiler_extension.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/window_open_disposition.h" @@ -160,21 +156,6 @@ int main(int argc, char* argv[]) { net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL; - // This is a special mode where JS helps the browser implement - // playback/record mode. Generally, in this mode, some functions - // of client-side randomness are removed. For example, in - // this mode Math.random() and Date.getTime() may not return - // values which vary. - bool playback_mode = - parsed_command_line.HasSwitch(test_shell::kPlaybackMode); - bool record_mode = - parsed_command_line.HasSwitch(test_shell::kRecordMode); - - if (playback_mode) - cache_mode = net::HttpCache::PLAYBACK; - else if (record_mode) - cache_mode = net::HttpCache::RECORD; - if (parsed_command_line.HasSwitch(test_shell::kEnableFileCookies)) net::CookieMonster::EnableFileScheme(); @@ -277,19 +258,6 @@ int main(int argc, char* argv[]) { // Test shell always exposes the GC. webkit_glue::SetJavaScriptFlags("--expose-gc"); - // Expose GCController to JavaScript. - WebScriptController::registerExtension(extensions_v8::GCExtension::Get()); - - if (parsed_command_line.HasSwitch(test_shell::kProfiler)) { - WebScriptController::registerExtension( - extensions_v8::ProfilerExtension::Get()); - } - - if (parsed_command_line.HasSwitch(test_shell::kHeapProfiler)) { - WebScriptController::registerExtension( - extensions_v8::HeapProfilerExtension::Get()); - } - // Load and initialize the stats table. Attempt to construct a somewhat // unique name to isolate separate instances from each other. @@ -305,36 +273,13 @@ int main(int argc, char* argv[]) { TestShell* shell; if (TestShell::CreateNewWindow(starting_url, &shell)) { - if (record_mode || playback_mode) { - platform.SetWindowPositionForRecording(shell); - WebScriptController::registerExtension( - extensions_v8::PlaybackExtension::Get()); - } - shell->Show(WebKit::WebNavigationPolicyNewWindow); if (parsed_command_line.HasSwitch(test_shell::kDumpStatsTable)) shell->DumpStatsTableOnExit(); - bool no_events = parsed_command_line.HasSwitch(test_shell::kNoEvents); - if ((record_mode || playback_mode) && !no_events) { - FilePath script_path = cache_path; - // Create the cache directory in case it doesn't exist. - file_util::CreateDirectory(cache_path); - script_path = script_path.AppendASCII("script.log"); - if (record_mode) - base::EventRecorder::current()->StartRecording(script_path); - if (playback_mode) - base::EventRecorder::current()->StartPlayback(script_path); - } - webkit_glue::SetJavaScriptFlags(TestShell::GetJSFlagsForLoad(0)); MessageLoop::current()->Run(); - - if (record_mode) - base::EventRecorder::current()->StopRecording(); - if (playback_mode) - base::EventRecorder::current()->StopPlayback(); } TestShell::ShutdownTestShell(); |