| Index: webkit/tools/test_shell/test_shell_main.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/test_shell_main.cc (revision 132793)
|
| +++ webkit/tools/test_shell/test_shell_main.cc (working copy)
|
| @@ -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 @@
|
|
|
| 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 @@
|
| // 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 @@
|
|
|
| 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();
|
|
|