Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 10117022: Cleanup of v8 extension stuff. Playback extension is only used in chrome, so move it to chrome\rend… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/node_leak_test.cc ('k') | webkit/tools/test_shell/test_shell_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « webkit/tools/test_shell/node_leak_test.cc ('k') | webkit/tools/test_shell/test_shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698