summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 19:26:37 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 19:26:37 +0000
commitf45c5f3d74273e913c62598fcbde35e20924ab50 (patch)
tree6364e206042679e527802f2214132138a731e826 /webkit
parent55410d7379f605f828d9845ee1ae8f62c0b0b145 (diff)
downloadchromium_src-f45c5f3d74273e913c62598fcbde35e20924ab50.zip
chromium_src-f45c5f3d74273e913c62598fcbde35e20924ab50.tar.gz
chromium_src-f45c5f3d74273e913c62598fcbde35e20924ab50.tar.bz2
Cleanup of v8 extension stuff. Playback extension is only used in chrome, so move it to chrome\renderer and all of its associated switches to chrome. GC extension is only used by webkit\support, so move it there. The other two profiler extensions aren't used, so remove them.
Review URL: https://chromiumcodereview.appspot.com/10117022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/extensions/v8/OWNERS1
-rw-r--r--webkit/extensions/v8/heap_profiler_extension.cc112
-rw-r--r--webkit/extensions/v8/heap_profiler_extension.h26
-rw-r--r--webkit/extensions/v8/playback_extension.cc48
-rw-r--r--webkit/extensions/v8/playback_extension.h35
-rw-r--r--webkit/extensions/v8/profiler_extension.cc104
-rw-r--r--webkit/extensions/v8/profiler_extension.h27
-rw-r--r--webkit/extensions/webkit_extensions_export.h26
-rw-r--r--webkit/glue/webkit_glue.gypi13
-rw-r--r--webkit/support/gc_extension.cc (renamed from webkit/extensions/v8/gc_extension.cc)2
-rw-r--r--webkit/support/gc_extension.h (renamed from webkit/extensions/v8/gc_extension.h)10
-rw-r--r--webkit/support/test_webkit_platform_support.cc2
-rw-r--r--webkit/support/webkit_support.gypi2
-rw-r--r--webkit/tools/test_shell/node_leak_test.cc6
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc55
-rw-r--r--webkit/tools/test_shell/test_shell_switches.cc15
-rw-r--r--webkit/tools/test_shell/test_shell_switches.h5
17 files changed, 9 insertions, 480 deletions
diff --git a/webkit/extensions/v8/OWNERS b/webkit/extensions/v8/OWNERS
deleted file mode 100644
index 30288836..0000000
--- a/webkit/extensions/v8/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-mbelshe@chromium.org
diff --git a/webkit/extensions/v8/heap_profiler_extension.cc b/webkit/extensions/v8/heap_profiler_extension.cc
deleted file mode 100644
index 17f9110..0000000
--- a/webkit/extensions/v8/heap_profiler_extension.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/extensions/v8/heap_profiler_extension.h"
-
-#include "base/basictypes.h"
-#include "v8/include/v8.h"
-
-#if defined(USE_TCMALLOC) && !defined(OS_WIN)
-#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
-#endif
-
-namespace extensions_v8 {
-
-namespace {
-
-const char kHeapProfilerExtensionName[] = "v8/HeapProfiler";
-
-class HeapProfilerWrapper : public v8::Extension {
- public:
- HeapProfilerWrapper()
- : v8::Extension(kHeapProfilerExtensionName,
- "if (typeof(chromium) == 'undefined') {"
- " chromium = {};"
- "}"
- "(function() {"
- " native function HeapProfilerStart();"
- " native function HeapProfilerStop();"
- " native function HeapProfilerDump();"
- " chromium.HeapProfiler = {};"
- " chromium.HeapProfiler.start = function(opt_prefix) {"
- " var prefix = opt_prefix;"
- " if (!prefix) {"
- " var d = new Date();"
- " prefix = \"chromium-\" + "
- " (1900 + d.getYear()) + "
- " \"-\" + d.getMonth() + "
- " \"-\" + d.getDay() + "
- " \"-\" + d.getTime();"
- " }"
- " HeapProfilerStart(prefix);"
- " };"
- " chromium.HeapProfiler.stop = function() {"
- " HeapProfilerStop();"
- " };"
- " chromium.HeapProfiler.dump = function(opt_reason) {"
- " HeapProfilerDump(opt_reason || \"\");"
- " };"
- "})();") {}
-
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
- v8::Handle<v8::String> name) {
- if (name->Equals(v8::String::New("HeapProfilerStart"))) {
- return v8::FunctionTemplate::New(HeapProfilerStart);
- } else if (name->Equals(v8::String::New("HeapProfilerStop"))) {
- return v8::FunctionTemplate::New(HeapProfilerStop);
- } else if (name->Equals(v8::String::New("HeapProfilerDump"))) {
- return v8::FunctionTemplate::New(HeapProfilerDump);
- }
- return v8::Handle<v8::FunctionTemplate>();
- }
-
-#if defined(USE_TCMALLOC) && !defined(OS_WIN)
- static v8::Handle<v8::Value> HeapProfilerStart(const v8::Arguments& args) {
- if (args.Length() >= 1 && args[0]->IsString()) {
- v8::Local<v8::String> js_prefix = args[0]->ToString();
- char prefix[256];
- js_prefix->WriteAscii(prefix, 0, arraysize(prefix) - 1);
- ::HeapProfilerStart(prefix);
- }
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> HeapProfilerStop(const v8::Arguments& args) {
- ::HeapProfilerStop();
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> HeapProfilerDump(const v8::Arguments& args) {
- if (args.Length() >= 1 && args[0]->IsString()) {
- v8::Local<v8::String> js_reason = args[0]->ToString();
- char reason[256];
- js_reason->WriteAscii(reason, 0, arraysize(reason) - 1);
- ::HeapProfilerDump(reason);
- }
- return v8::Undefined();
- }
-
-#else
-
- static v8::Handle<v8::Value> HeapProfilerStart(const v8::Arguments& args) {
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> HeapProfilerStop(const v8::Arguments& args) {
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> HeapProfilerDump(const v8::Arguments& args) {
- return v8::Undefined();
- }
-#endif
-};
-
-} // namespace
-
-v8::Extension* HeapProfilerExtension::Get() {
- return new HeapProfilerWrapper;
-}
-
-} // namespace extensions_v8
diff --git a/webkit/extensions/v8/heap_profiler_extension.h b/webkit/extensions/v8/heap_profiler_extension.h
deleted file mode 100644
index 6e28b20..0000000
--- a/webkit/extensions/v8/heap_profiler_extension.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_EXTENSIONS_V8_HEAP_PROFILER_EXTENSION_H_
-#define WEBKIT_EXTENSIONS_V8_HEAP_PROFILER_EXTENSION_H_
-#pragma once
-
-#include "webkit/extensions/webkit_extensions_export.h"
-
-namespace v8 {
-class Extension;
-}
-
-namespace extensions_v8 {
-
-// HeapProfilerExtension is a V8 extension to expose a JS function for
-// dumping native heap profiles. This should only be used for debugging.
-class HeapProfilerExtension {
- public:
- WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get();
-};
-
-} // namespace extensions_v8
-
-#endif // WEBKIT_EXTENSIONS_V8_HEAP_PROFILER_EXTENSION_H_
diff --git a/webkit/extensions/v8/playback_extension.cc b/webkit/extensions/v8/playback_extension.cc
deleted file mode 100644
index c106c84..0000000
--- a/webkit/extensions/v8/playback_extension.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/extensions/v8/playback_extension.h"
-
-#include "v8/include/v8.h"
-
-const char kPlaybackExtensionName[] = "v8/PlaybackMode";
-
-namespace extensions_v8 {
-
-v8::Extension* PlaybackExtension::Get() {
- v8::Extension* extension = new v8::Extension(
- kPlaybackExtensionName,
- "(function () {"
- " var orig_date = Date;"
- " var x = 0;"
- " var time_seed = 1204251968254;"
- " Math.random = function() {"
- " x += .1;"
- " return (x % 1);"
- " };"
- " Date = function() {"
- " if (this instanceof Date) {"
- " switch (arguments.length) {"
- " case 0: return new orig_date(time_seed += 50);"
- " case 1: return new orig_date(arguments[0]);"
- " default: return new orig_date(arguments[0], arguments[1],"
- " arguments.length >= 3 ? arguments[2] : 1,"
- " arguments.length >= 4 ? arguments[3] : 0,"
- " arguments.length >= 5 ? arguments[4] : 0,"
- " arguments.length >= 6 ? arguments[5] : 0,"
- " arguments.length >= 7 ? arguments[6] : 0);"
- " }"
- " }"
- " return new Date().toString();"
- " };"
- " Date.__proto__ = orig_date;"
- " Date.prototype.constructor = Date;"
- " orig_date.now = function() {"
- " return new Date().getTime();"
- " };"
- "})()");
- return extension;
-}
-
-} // namespace extensions_v8
diff --git a/webkit/extensions/v8/playback_extension.h b/webkit/extensions/v8/playback_extension.h
deleted file mode 100644
index c425ea0..0000000
--- a/webkit/extensions/v8/playback_extension.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_EXTENSIONS_V8_PLAYBACK_EXTENSION_H_
-#define WEBKIT_EXTENSIONS_V8_PLAYBACK_EXTENSION_H_
-#pragma once
-
-#include "webkit/extensions/webkit_extensions_export.h"
-
-namespace v8 {
-class Extension;
-}
-
-namespace extensions_v8 {
-
-// Inject code which overrides a few common JS functions for implementing
-// randomness. In order to implement effective record & playback of
-// websites, it is important that the URLs not change. Many popular web
-// based apps use randomness in URLs to unique-ify urls for proxies.
-// Unfortunately, this breaks playback.
-// To work around this, we take the two most common client-side randomness
-// generators and make them constant. They really need to be constant
-// (rather than a constant seed followed by constant change)
-// because the playback mode wants flexibility in how it plays them back
-// and cannot always guarantee that requests for randomness are played back
-// in exactly the same order in which they were recorded.
-class PlaybackExtension {
- public:
- WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get();
-};
-
-} // namespace extensions_v8
-
-#endif // WEBKIT_EXTENSIONS_V8_PLAYBACK_EXTENSION_H_
diff --git a/webkit/extensions/v8/profiler_extension.cc b/webkit/extensions/v8/profiler_extension.cc
deleted file mode 100644
index 3ffc205..0000000
--- a/webkit/extensions/v8/profiler_extension.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/extensions/v8/profiler_extension.h"
-
-#include "build/build_config.h"
-#include "v8/include/v8.h"
-
-#if defined(USE_TCMALLOC) && defined(OS_POSIX) && !defined(OS_MACOSX)
-#include "third_party/tcmalloc/chromium/src/gperftools/profiler.h"
-#endif
-
-const char kProfilerExtensionName[] = "v8/Profiler";
-
-namespace extensions_v8 {
-
-class ProfilerWrapper : public v8::Extension {
- public:
- ProfilerWrapper() :
- v8::Extension(kProfilerExtensionName,
- "if (typeof(chromium) == 'undefined') {"
- " chromium = {};"
- "}"
- "chromium.Profiler = function() {"
- " native function ProfilerStart();"
- " native function ProfilerStop();"
- " native function ProfilerFlush();"
- " native function ProfilerClearData();"
- " native function ProfilerSetThreadName();"
- " this.start = function() {"
- " ProfilerStart();"
- " };"
- " this.stop = function() {"
- " ProfilerStop();"
- " };"
- " this.clear = function() {"
- " ProfilerClearData();"
- " };"
- " this.flush = function() {"
- " ProfilerFlush();"
- " };"
- " this.setThreadName = function(name) {"
- " ProfilerSetThreadName(name);"
- " };"
- "};") {}
-
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
- v8::Handle<v8::String> name) {
- if (name->Equals(v8::String::New("ProfilerStart")))
- return v8::FunctionTemplate::New(ProfilerStart);
- else if (name->Equals(v8::String::New("ProfilerStop")))
- return v8::FunctionTemplate::New(ProfilerStop);
- else if (name->Equals(v8::String::New("ProfilerClearData")))
- return v8::FunctionTemplate::New(ProfilerClearData);
- else if (name->Equals(v8::String::New("ProfilerFlush")))
- return v8::FunctionTemplate::New(ProfilerFlush);
- else if (name->Equals(v8::String::New("ProfilerSetThreadName")))
- return v8::FunctionTemplate::New(ProfilerSetThreadName);
-
- return v8::Handle<v8::FunctionTemplate>();
- }
-
- static v8::Handle<v8::Value> ProfilerStart(const v8::Arguments& args) {
-#if defined(USE_TCMALLOC) && defined(OS_POSIX) && !defined(OS_MACOSX)
- ::ProfilerStart("chrome-profile");
-#endif
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> ProfilerStop(const v8::Arguments& args) {
-#if defined(USE_TCMALLOC) && defined(OS_POSIX) && !defined(OS_MACOSX)
- ::ProfilerStop();
-#endif
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> ProfilerClearData(const v8::Arguments& args) {
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> ProfilerFlush(const v8::Arguments& args) {
-#if defined(USE_TCMALLOC) && defined(OS_POSIX) && !defined(OS_MACOSX)
- ::ProfilerFlush();
-#endif
- return v8::Undefined();
- }
-
- static v8::Handle<v8::Value> ProfilerSetThreadName(
- const v8::Arguments& args) {
- if (args.Length() >= 1 && args[0]->IsString()) {
- v8::Local<v8::String> inputString = args[0]->ToString();
- char nameBuffer[256];
- inputString->WriteAscii(nameBuffer, 0, sizeof(nameBuffer)-1);
- }
- return v8::Undefined();
- }
-};
-
-v8::Extension* ProfilerExtension::Get() {
- return new ProfilerWrapper();
-}
-
-} // namespace extensions_v8
diff --git a/webkit/extensions/v8/profiler_extension.h b/webkit/extensions/v8/profiler_extension.h
deleted file mode 100644
index 8098cb7..0000000
--- a/webkit/extensions/v8/profiler_extension.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_EXTENSIONS_V8_PROFILER_EXTENSION_H_
-#define WEBKIT_EXTENSIONS_V8_PROFILER_EXTENSION_H_
-#pragma once
-
-#include "webkit/extensions/webkit_extensions_export.h"
-
-namespace v8 {
-class Extension;
-}
-
-namespace extensions_v8 {
-
-// Profiler is an extension to allow javascript access to the API for
-// an external profiler program (such as Quantify). The "External" part of the
-// name is to distinguish it from the built-in V8 Profiler.
-class ProfilerExtension {
- public:
- WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get();
-};
-
-} // namespace extensions_v8
-
-#endif // WEBKIT_EXTENSIONS_V8_PROFILER_EXTENSION_H_
diff --git a/webkit/extensions/webkit_extensions_export.h b/webkit/extensions/webkit_extensions_export.h
deleted file mode 100644
index f1fff8e..0000000
--- a/webkit/extensions/webkit_extensions_export.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_
-#define WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_
-#pragma once
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(WEBKIT_EXTENSIONS_IMPLEMENTATION)
-#define WEBKIT_EXTENSIONS_EXPORT __declspec(dllexport)
-#else
-#define WEBKIT_EXTENSIONS_EXPORT __declspec(dllimport)
-#endif // defined(WEBKIT_EXTENSIONS_IMPLEMENTATION)
-
-#else // defined(WIN32)
-#define WEBKIT_EXTENSIONS_EXPORT __attribute__((visibility("default")))
-#endif
-
-#else // defined(COMPONENT_BUILD)
-#define WEBKIT_EXTENSIONS_EXPORT
-#endif
-
-#endif // WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 89bc7bd..a3d6ed5 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -455,19 +455,6 @@
'window_open_disposition.cc',
'worker_task_runner.cc',
'worker_task_runner.h',
-
- # These files used to be built in the webcore target, but moved here
- # since part of glue.
- '../extensions/v8/gc_extension.cc',
- '../extensions/v8/gc_extension.h',
- '../extensions/v8/heap_profiler_extension.cc',
- '../extensions/v8/heap_profiler_extension.h',
- '../extensions/v8/playback_extension.cc',
- '../extensions/v8/playback_extension.h',
- '../extensions/v8/profiler_extension.cc',
- '../extensions/v8/profiler_extension.h',
- '../extensions/webkit_extensions_export.h',
-
],
# When glue is a dependency, it needs to be a hard dependency.
# Dependents may rely on files generated by this target or one of its
diff --git a/webkit/extensions/v8/gc_extension.cc b/webkit/support/gc_extension.cc
index d8aa9f7..44c3e11 100644
--- a/webkit/extensions/v8/gc_extension.cc
+++ b/webkit/support/gc_extension.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/extensions/v8/gc_extension.h"
+#include "webkit/support/gc_extension.h"
#include "v8/include/v8.h"
diff --git a/webkit/extensions/v8/gc_extension.h b/webkit/support/gc_extension.h
index ea5003b..ef3f2bd 100644
--- a/webkit/extensions/v8/gc_extension.h
+++ b/webkit/support/gc_extension.h
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_EXTENSIONS_V8_GC_EXTENSION_H_
-#define WEBKIT_EXTENSIONS_V8_GC_EXTENSION_H_
+#ifndef WEBKIT_SUPPORT_GC_EXTENSION_H_
+#define WEBKIT_SUPPORT_GC_EXTENSION_H_
#pragma once
-#include "webkit/extensions/webkit_extensions_export.h"
-
namespace v8 {
class Extension;
}
@@ -18,9 +16,9 @@ namespace extensions_v8 {
// garbage collection. This should only be used for debugging.
class GCExtension {
public:
- WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get();
+ static v8::Extension* Get();
};
} // namespace extensions_v8
-#endif // WEBKIT_EXTENSIONS_V8_GC_EXTENSION_H_
+#endif // WEBKIT_SUPPORT_GC_EXTENSION_H_
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index 0b11a80..6bcc225 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -35,7 +35,6 @@
#include "v8/include/v8.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/database/vfs_backend.h"
-#include "webkit/extensions/v8/gc_extension.h"
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webclipboard_impl.h"
#include "webkit/glue/webkit_glue.h"
@@ -44,6 +43,7 @@
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/support/simple_database_system.h"
+#include "webkit/support/gc_extension.h"
#include "webkit/support/test_webmessageportchannel.h"
#include "webkit/support/webkit_support.h"
#include "webkit/support/weburl_loader_mock_factory.h"
diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi
index f42840f..64f3be1 100644
--- a/webkit/support/webkit_support.gypi
+++ b/webkit/support/webkit_support.gypi
@@ -40,6 +40,8 @@
'sources': [
'drt_application_mac.h',
'drt_application_mac.mm',
+ 'gc_extension.cc',
+ 'gc_extension.h',
'platform_support.h',
'platform_support_android.cc',
'platform_support_linux.cc',
diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc
index 13ab6b21..5fdf02c 100644
--- a/webkit/tools/test_shell/node_leak_test.cc
+++ b/webkit/tools/test_shell/node_leak_test.cc
@@ -48,11 +48,7 @@ class NodeLeakTest : public TestShellTest {
TestShell::SetFileTestTimeout(timeout_ms);
}
- // Optionally use playback mode (for instance if running automated tests).
- net::HttpCache::Mode mode =
- parsed_command_line.HasSwitch(test_shell::kPlaybackMode) ?
- net::HttpCache::PLAYBACK : net::HttpCache::NORMAL;
- SimpleResourceLoaderBridge::Init(cache_path, mode, false);
+ SimpleResourceLoaderBridge::Init(cache_path, net::HttpCache::NORMAL, false);
TestShellTest::SetUp();
}
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();
diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc
index ab5941f..eafdfa4 100644
--- a/webkit/tools/test_shell/test_shell_switches.cc
+++ b/webkit/tools/test_shell/test_shell_switches.cc
@@ -43,15 +43,6 @@ const char kMultipleLoads[] = "multiple-loads";
// in the corresponding load.
const char kJavaScriptFlags[] = "js-flags";
-// Run the http cache in record mode.
-const char kRecordMode[] = "record-mode";
-
-// Run the http cache in playback mode.
-const char kPlaybackMode[] = "playback-mode";
-
-// Don't record/playback events when using record & playback.
-const char kNoEvents[] = "no-events";
-
// Dump stats table on exit.
const char kDumpStatsTable[] = "stats";
@@ -73,12 +64,6 @@ const char kCheckLayoutTestSystemDeps[] = "check-layout-test-sys-deps";
// to happen even if in layout test mode.
const char kGDB[] = "gdb";
-// Make functions of the Profiler class available in javascript
-const char kProfiler[] = "profiler";
-
-// Make functions of the HeapProfiler class available in javascript
-const char kHeapProfiler[] = "heap-profiler";
-
const char kAllowExternalPages[] = "allow-external-pages";
const char kEnableAccel2DCanvas[] = "enable-accelerated-2d-canvas";
diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h
index a7255f1..f45296a 100644
--- a/webkit/tools/test_shell/test_shell_switches.h
+++ b/webkit/tools/test_shell/test_shell_switches.h
@@ -20,17 +20,12 @@ extern const char kStartupDialog[];
extern const char kGPFaultErrorBox[];
extern const char kJavaScriptFlags[];
extern const char kMultipleLoads[];
-extern const char kRecordMode[];
-extern const char kPlaybackMode[];
-extern const char kNoEvents[];
extern const char kDumpStatsTable[];
extern const char kCacheDir[];
extern const char kEnableFileCookies[];
extern const char kAllowScriptsToCloseWindows[];
extern const char kCheckLayoutTestSystemDeps[];
extern const char kGDB[];
-extern const char kProfiler[];
-extern const char kHeapProfiler[];
extern const char kAllowExternalPages[];
extern const char kEnableAccel2DCanvas[];
extern const char kEnableAccelCompositing[];