summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 18:39:04 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 18:39:04 +0000
commit6e23edbce20d371e9d7f34746471b47ca0651cc0 (patch)
treeb8c6c07436ceecc1dbf97f79bfd23cfed2b19a01
parenta3bc6b8f3cf50e0db39953d367f3161aa082f32e (diff)
downloadchromium_src-6e23edbce20d371e9d7f34746471b47ca0651cc0.zip
chromium_src-6e23edbce20d371e9d7f34746471b47ca0651cc0.tar.gz
chromium_src-6e23edbce20d371e9d7f34746471b47ca0651cc0.tar.bz2
Remove remaining references to test_shell_tests now that the bots have been updated.
BUG=126514 R=jochen@chromium.org Review URL: https://codereview.chromium.org/14841004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198146 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/all.gyp1
-rwxr-xr-xtools/code_coverage/coverage.py9
-rwxr-xr-xtools/heapcheck/chrome_tests.py5
-rw-r--r--tools/heapcheck/test_shell_tests.gtest-heapcheck.txt25
-rwxr-xr-xtools/valgrind/chrome_tests.py5
-rw-r--r--tools/valgrind/gtest_exclude/test_shell_tests.gtest.txt5
-rw-r--r--tools/valgrind/gtest_exclude/test_shell_tests.gtest_mac.txt5
-rw-r--r--tools/valgrind/memcheck/suppressions_mac.txt10
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc9
-rw-r--r--webkit/tools/test_shell/test_shell.cc9
-rw-r--r--webkit/tools/test_shell/test_shell.gypi7
-rw-r--r--webkit/tools/test_shell/test_shell.h56
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc36
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm94
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc24
-rw-r--r--webkit/tools/test_shell/test_shell_switches.cc8
-rw-r--r--webkit/tools/test_shell/test_shell_switches.h2
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc69
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc20
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h11
20 files changed, 1 insertions, 409 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 5545db0..3839a4a 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -681,7 +681,6 @@
'type': 'none',
'dependencies': [
'../webkit/webkit.gyp:test_shell',
- '../webkit/webkit.gyp:test_shell_tests',
'../webkit/webkit.gyp:pull_in_webkit_unit_tests',
'../webkit/webkit.gyp:pull_in_DumpRenderTree',
],
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index 6e524ea..a1496d7 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -36,20 +36,16 @@ windows_binaries = [#'chrome.exe',
#'chrome.dll',
'unit_tests.exe',
'automated_ui_tests.exe',
- 'ui_tests.exe',
'installer_util_unittests.exe',
'ipc_tests.exe',
'memory_test.exe',
'page_cycler_tests.exe',
'perf_tests.exe',
- 'plugin_tests.exe',
'reliability_tests.exe',
'security_tests.dll',
'startup_tests.exe',
'tab_switching_test.exe',
- 'test_shell_tests.exe',
- 'test_shell.exe',
- 'activex_test_control.dll']
+ 'test_shell.exe']
# The list of [tests, args] that will be run.
# Failing tests have been commented out.
@@ -57,15 +53,12 @@ windows_binaries = [#'chrome.exe',
windows_tests = [
['unit_tests.exe', ''],
# ['automated_ui_tests.exe', ''],
- ['ui_tests.exe', '--no-sandbox'],
['installer_util_unittests.exe', ''],
['ipc_tests.exe', ''],
['page_cycler_tests.exe', '--gtest_filter=*File --no-sandbox'],
- ['plugin_tests.exe', '--no-sandbox'],
['reliability_tests.exe', '--no-sandbox'],
['startup_tests.exe', '--no-sandbox'],
['tab_switching_test.exe', '--no-sandbox'],
- ['test_shell_tests.exe', '']
]
diff --git a/tools/heapcheck/chrome_tests.py b/tools/heapcheck/chrome_tests.py
index d8dee34..a7849b5 100755
--- a/tools/heapcheck/chrome_tests.py
+++ b/tools/heapcheck/chrome_tests.py
@@ -101,7 +101,6 @@ class ChromeTests(object):
"sql": self.TestSql, "sql_unittests": self.TestSql,
"startup": self.TestStartup, "startup_tests": self.TestStartup,
"sync": self.TestSync, "sync_unit_tests": self.TestSync,
- "test_shell": self.TestTestShell, "test_shell_tests": self.TestTestShell,
"ui_unit": self.TestUIUnit, "ui_unittests": self.TestUIUnit,
"unit": self.TestUnit, "unit_tests": self.TestUnit,
"views": self.TestViews, "views_unittests": self.TestViews,
@@ -308,9 +307,6 @@ class ChromeTests(object):
logging.info("export STARTUP_TESTS_NUMCYCLES=1");
return self.SimpleTest("chrome", "startup_tests")
- def TestTestShell(self):
- return self.SimpleTest("webkit", "test_shell_tests")
-
def TestUIUnit(self):
return self.SimpleTest("chrome", "ui_unittests")
@@ -341,7 +337,6 @@ class ChromeTests(object):
# Now build script_cmd, the run_webkits_tests.py commandline
# Store each chunk in its own directory so that we can find the data later
chunk_dir = os.path.join("layout", "chunk_%05d" % chunk_num)
- test_shell = os.path.join(self._options.build_dir, "test_shell")
out_dir = os.path.join(path_utils.ScriptDir(), "latest")
out_dir = os.path.join(out_dir, chunk_dir)
if os.path.exists(out_dir):
diff --git a/tools/heapcheck/test_shell_tests.gtest-heapcheck.txt b/tools/heapcheck/test_shell_tests.gtest-heapcheck.txt
deleted file mode 100644
index e463c89..0000000
--- a/tools/heapcheck/test_shell_tests.gtest-heapcheck.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Fails on Chrome OS, http://crbug.com/93022
-WebDOMEventListenerTest.SameListenerMultipleEvents
-
-# Fails on Chrome OS, crbug.com/97857
-BufferedResourceLoaderTest.BufferWindow_SetVeryLarge
-DomSerializerTests.SerializeDocumentWithDownloadedIFrame
-DomSerializerTests.SerializeHTMLDOMWithAddingMOTW
-DomSerializerTests.SerializeHTMLDOMWithBaseTag
-DomSerializerTests.SerializeHTMLDOMWithDocType
-DomSerializerTests.SerializeHTMLDOMWithMultipleMetaCharsetInOriginalDoc
-DomSerializerTests.SerializeHTMLDOMWithNoMetaCharsetInOriginalDoc
-DomSerializerTests.SerializeHTMLDOMWithNonStandardEntities
-DomSerializerTests.SerializeHTMLDOMWithoutDocType
-DomSerializerTests.SerializeXMLDocWithBuiltInEntities
-FileAccessPermissionsTest.FileAccessChecks
-FileSystemPathManagerTest.GetRootPathFileURI
-FileSystemPathManagerTest.GetRootPathFileURIWithAllowFlag
-FileSystemPathManagerTest.GetRootPathGetWithoutCreate
-FileSystemPathManagerTest.GetRootPathInIncognito
-IFrameRedirectTest.Test
-ListenerLeakTest.HiddenReferences
-WebDOMEventListenerTest.AttributeMutationEvent
-WebDOMEventListenerTest.NodeAddedRemovedMutationEvent
-WebDOMEventListenerTest.RemoveEventListener
-WebDOMEventListenerTest.TextNodeModifiedMutationEvent
diff --git a/tools/valgrind/chrome_tests.py b/tools/valgrind/chrome_tests.py
index 548093a..1ea10ea 100755
--- a/tools/valgrind/chrome_tests.py
+++ b/tools/valgrind/chrome_tests.py
@@ -323,9 +323,6 @@ class ChromeTests:
def TestLinuxSandbox(self):
return self.SimpleTest("sandbox", "sandbox_linux_unittests")
- def TestTestShell(self):
- return self.SimpleTest("webkit", "test_shell_tests")
-
def TestUnit(self):
# http://crbug.com/51716
# Disabling all unit tests
@@ -409,7 +406,6 @@ class ChromeTests:
# Now build script_cmd, the run_webkits_tests.py commandline
# Store each chunk in its own directory so that we can find the data later
chunk_dir = os.path.join("layout", "chunk_%05d" % chunk_num)
- test_shell = os.path.join(self._options.build_dir, "test_shell")
out_dir = os.path.join(path_utils.ScriptDir(), "latest")
out_dir = os.path.join(out_dir, chunk_dir)
if os.path.exists(out_dir):
@@ -541,7 +537,6 @@ class ChromeTests:
"sync": TestSync, "sync_unit_tests": TestSync,
"sync_integration_tests": TestSyncIntegration,
"sync_integration": TestSyncIntegration,
- "test_shell": TestTestShell, "test_shell_tests": TestTestShell,
"ui_unit": TestUIUnit, "ui_unittests": TestUIUnit,
"unit": TestUnit, "unit_tests": TestUnit,
"views": TestViews, "views_unittests": TestViews,
diff --git a/tools/valgrind/gtest_exclude/test_shell_tests.gtest.txt b/tools/valgrind/gtest_exclude/test_shell_tests.gtest.txt
deleted file mode 100644
index d0373cb..0000000
--- a/tools/valgrind/gtest_exclude/test_shell_tests.gtest.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Way too slow under Valgrind at the moment; http://crbug.com/9177
-BMPImageDecoderTest.ChunkedDecodingSlow
-BMPImageDecoderTest.DecodingSlow
-# hangs; see http://crbug.com/22134
-WebFrameTest.GetFullHtmlOfPage
diff --git a/tools/valgrind/gtest_exclude/test_shell_tests.gtest_mac.txt b/tools/valgrind/gtest_exclude/test_shell_tests.gtest_mac.txt
deleted file mode 100644
index 1eba9e0..0000000
--- a/tools/valgrind/gtest_exclude/test_shell_tests.gtest_mac.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# "impossible happened" http://crbug.com/51716
-ResourceFetcherTests.ResourceFetcherTimeout
-ResourceFetcherTests.ResourceFetcherDeletedInCallback
-PluginTest.DeleteFrameDuringEvent
-PluginTest.ForceReload
diff --git a/tools/valgrind/memcheck/suppressions_mac.txt b/tools/valgrind/memcheck/suppressions_mac.txt
index 4947d18..55e8dfc 100644
--- a/tools/valgrind/memcheck/suppressions_mac.txt
+++ b/tools/valgrind/memcheck/suppressions_mac.txt
@@ -29,16 +29,6 @@
...
}
{
- # Mac test_shell_tests. See http://crbug.com/11134
- # Doesn't happen on bots, but happens like crazy on the smo
- # test machine 'caliban'. Don't delete just because it
- # doesn't happen on the bots.
- bug_11134
- Memcheck:Uninitialized
- fun:vCMMVectorConvert8BitRGBToRGB
- fun:_ZNK15CMMConvRGBToRGB7ConvertER8CMM8BitsP14CMMRuntimeInfomm
-}
-{
# Mac system library bug? See http://crbug.com/11327
bug_11327
Memcheck:Uninitialized
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
deleted file mode 100644
index 61711da..0000000
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ /dev/null
@@ -1,9 +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.
-
-// TODO(jam): remove this target when all the bots are updated.
-
-int main(int argc, char** argv) {
- return 0;
-}
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 40c7118..192c6b5 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -114,10 +114,6 @@ WindowList* TestShell::window_list_;
WebPreferences* TestShell::web_prefs_ = NULL;
bool TestShell::layout_test_mode_ = false;
bool TestShell::allow_external_pages_ = false;
-int TestShell::file_test_timeout_ms_ = kDefaultFileTestTimeoutMillisecs;
-bool TestShell::test_is_preparing_ = false;
-bool TestShell::test_is_pending_ = false;
-int TestShell::load_count_ = 1;
std::vector<std::string> TestShell::js_flags_;
bool TestShell::accelerated_2d_canvas_enabled_ = false;
bool TestShell::accelerated_compositing_enabled_ = false;
@@ -402,11 +398,6 @@ bool TestShell::RemoveWindowFromList(gfx::NativeWindow window) {
return false;
}
-void TestShell::TestTimedOut() {
- puts("#TEST_TIMED_OUT\n");
- TestFinished();
-}
-
void TestShell::Show(WebNavigationPolicy policy) {
delegate_->show(policy);
}
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index 03769b6..d8b744b 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -354,13 +354,6 @@
}],
],
},
- {
- 'target_name': 'test_shell_tests',
- 'type': 'executable',
- 'sources': [
- 'run_all_tests.cc',
- ],
- },
],
}],
['OS!="android" and OS!="ios"', {
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index c48126f..d6db56c 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -113,16 +113,6 @@ public:
void ShowDevTools();
void CloseDevTools();
- // Called to signal test completion.
- void TestFinished();
-
- // Called when a test hits the timeout, but does not cause a hang. We can
- // avoid killing TestShell in this case and still dump the test results.
- void TestTimedOut();
-
- // Called to block the calling thread until TestFinished is called.
- void WaitTestFinished();
-
void Show(WebKit::WebNavigationPolicy policy);
// We use this to avoid relying on Windows focus during layout test mode.
@@ -209,35 +199,12 @@ public:
// this by substituting "tmp" with the path to the LayoutTests parent dir.
static std::string RewriteLocalUrl(const std::string& url);
- // Set the timeout for running a test.
- static void SetFileTestTimeout(int timeout_ms) {
- file_test_timeout_ms_ = timeout_ms;
- }
-
- // Get the timeout for running a test.
- static int GetLayoutTestTimeout() { return file_test_timeout_ms_; }
-
- // Get the timeout killing an unresponsive TestShell.
- // Make it a bit longer than the regular timeout to avoid killing the
- // TestShell process unless we really need to.
- static int GetLayoutTestTimeoutForWatchDog() {
- return (load_count_ * file_test_timeout_ms_) + 1000;
- }
-
// Set the JavaScript flags to use. This is a vector as when multiple loads
// are specified each load can have different flags passed.
static void SetJavaScriptFlags(std::vector<std::string> js_flags) {
js_flags_ = js_flags;
}
- // Set the number of times to load each URL.
- static void SetMultipleLoad(int load_count) {
- load_count_ = load_count;
- }
-
- // Get the number of times to load each URL.
- static int GetLoadCount() { return load_count_; }
-
// Get the JavaScript flags for a specific load
static std::string GetJSFlagsForLoad(size_t load) {
if (load >= js_flags_.size())
@@ -245,12 +212,6 @@ public:
return js_flags_[load];
}
-#if defined(OS_WIN)
- // Access to the finished event. Used by the static WatchDog
- // thread.
- HANDLE finished_event() { return finished_event_; }
-#endif
-
// Have the shell print the StatsTable to stdout on teardown.
void DumpStatsTableOnExit() { dump_stats_table_on_exit_ = true; }
@@ -343,9 +304,6 @@ private:
// produce images of the rendered page)
static bool allow_external_pages_;
- // Default timeout in ms for file page loads when in layout test mode.
- static int file_test_timeout_ms_;
-
scoped_ptr<TestNavigationController> navigation_controller_;
scoped_ptr<TestNotificationPresenter> notification_presenter_;
@@ -361,15 +319,6 @@ private:
const TestParams* test_params_;
- // True while a test is preparing to run
- static bool test_is_preparing_;
-
- // True while a test is running
- static bool test_is_pending_;
-
- // Number of times to load each URL.
- static int load_count_;
-
// JavaScript flags. Each element in the vector contains a set of flags as
// a string (e.g. "--xxx --yyy"). Each flag set is used for separate loads
// of each URL.
@@ -394,11 +343,6 @@ private:
// The preferences for the test shell.
static WebPreferences* web_prefs_;
-#if defined(OS_WIN)
- // Used by the watchdog to know when it's finished.
- HANDLE finished_event_;
-#endif
-
// Dump the stats table counters on exit.
bool dump_stats_table_on_exit_;
};
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index b949312..fad591c 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -367,14 +367,6 @@ bool TestShell::Initialize(const GURL& starting_url) {
return true;
}
-void TestShell::TestFinished() {
- if(!test_is_pending_)
- return;
-
- test_is_pending_ = false;
- MessageLoop::current()->Quit();
-}
-
void TestShell::SizeTo(int width, int height) {
GtkWidget* widget = m_webViewHost->view_handle();
@@ -400,34 +392,6 @@ void TestShell::SizeTo(int width, int height) {
m_webViewHost->Resize(gfx::Size(width, height));
}
-static void AlarmHandler(int signatl) {
- // If the alarm alarmed, kill the process since we have a really bad hang.
- puts("\n#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- TestShell::ShutdownTestShell();
- exit(0);
-}
-
-void TestShell::WaitTestFinished() {
- DCHECK(!test_is_pending_) << "cannot be used recursively";
-
- test_is_pending_ = true;
-
- // Install an alarm signal handler that will kill us if we time out.
- signal(SIGALRM, AlarmHandler);
- alarm(GetLayoutTestTimeoutForWatchDog() / 1000);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (test_is_pending_)
- MessageLoop::current()->Run();
-
- // Remove the alarm.
- alarm(0);
- signal(SIGALRM, SIG_DFL);
-}
-
void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
GtkWidget* widget = GTK_WIDGET(host->view_handle());
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index d5757bd..26ffce6 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -357,100 +357,6 @@ bool TestShell::Initialize(const GURL& starting_url) {
return true;
}
-void TestShell::TestFinished() {
- if (!test_is_pending_)
- return; // reached when running under test_shell_tests
-
- test_is_pending_ = false;
- MessageLoop::current()->Quit();
-}
-
-// A class to be the target/selector of the "watchdog" thread that ensures
-// pages timeout if they take too long and tells the test harness via stdout.
-@interface WatchDogTarget : NSObject {
- @private
- NSTimeInterval timeout_;
-}
-// |timeout| is in seconds
-- (id)initWithTimeout:(NSTimeInterval)timeout;
-// serves as the "run" method of a NSThread.
-- (void)run:(id)sender;
-@end
-
-@implementation WatchDogTarget
-
-- (id)initWithTimeout:(NSTimeInterval)timeout {
- if ((self = [super init])) {
- timeout_ = timeout;
- }
- return self;
-}
-
-- (void)run:(id)ignore {
- base::mac::ScopedNSAutoreleasePool scoped_pool;
-
- // Check for debugger, just bail if so. We don't want the timeouts hitting
- // when we're trying to track down an issue.
- if (base::debug::BeingDebugged())
- return;
-
- NSThread* currentThread = [NSThread currentThread];
-
- // Wait to be cancelled. If we are that means the test finished. If it hasn't,
- // then we need to tell the layout script we timed out and start again.
- NSDate* limitDate = [NSDate dateWithTimeIntervalSinceNow:timeout_];
- while ([(NSDate*)[NSDate date] compare:limitDate] == NSOrderedAscending &&
- ![currentThread isCancelled]) {
- // sleep for a small increment then check again
- NSDate* incrementDate = [NSDate dateWithTimeIntervalSinceNow:1.0];
- [NSThread sleepUntilDate:incrementDate];
- }
- if (![currentThread isCancelled]) {
- // Print a warning to be caught by the layout-test script.
- // Note: the layout test driver may or may not recognize
- // this as a timeout.
- puts("#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- abort();
- }
-}
-
-@end
-
-void TestShell::WaitTestFinished() {
- DCHECK(!test_is_pending_) << "cannot be used recursively";
-
- test_is_pending_ = true;
-
- // Create a watchdog thread which just sets a timer and
- // kills the process if it times out. This catches really
- // bad hangs where the shell isn't coming back to the
- // message loop. If the watchdog is what catches a
- // timeout, it can't do anything except terminate the test
- // shell, which is unfortunate.
- // Windows multiplies by 2.5, but that causes us to run for far, far too
- // long. We use the passed value and let the scripts flag override
- // the value as needed.
- NSTimeInterval timeout_seconds = GetLayoutTestTimeoutForWatchDog() / 1000;
- WatchDogTarget* watchdog = [[[WatchDogTarget alloc]
- initWithTimeout:timeout_seconds] autorelease];
- NSThread* thread = [[NSThread alloc] initWithTarget:watchdog
- selector:@selector(run:)
- object:nil];
- [thread start];
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (test_is_pending_)
- MessageLoop::current()->Run();
-
- // Tell the watchdog that we're finished. No point waiting to re-join, it'll
- // die on its own.
- [thread cancel];
- [thread release];
-}
-
void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
if (enable) {
[[host->view_handle() window] makeKeyAndOrderFront:nil];
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 763d949..9792716 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -125,21 +125,6 @@ int main(int argc, char* argv[]) {
if (parsed_command_line.HasSwitch(test_shell::kEnableAccelCompositing))
TestShell::SetAcceleratedCompositingEnabled(true);
- if (parsed_command_line.HasSwitch(test_shell::kMultipleLoads)) {
- const std::string multiple_loads_str =
- parsed_command_line.GetSwitchValueASCII(test_shell::kMultipleLoads);
- int load_count;
- base::StringToInt(multiple_loads_str, &load_count);
- if (load_count <= 0) {
- #ifndef NDEBUG
- load_count = 2;
- #else
- load_count = 5;
- #endif
- }
- TestShell::SetMultipleLoad(load_count);
- }
-
bool layout_test_mode = false;
TestShell::InitLogging(suppress_error_dialogs,
layout_test_mode,
@@ -198,15 +183,6 @@ int main(int argc, char* argv[]) {
test_shell_webkit_init.SetThemeEngine(&engine);
#endif
- if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) {
- const std::string timeout_str = parsed_command_line.GetSwitchValueASCII(
- test_shell::kTestShellTimeOut);
- int timeout_ms;
- base::StringToInt(timeout_str, &timeout_ms);
- if (timeout_ms > 0)
- TestShell::SetFileTestTimeout(timeout_ms);
- }
-
// Unless specifically requested otherwise, default to OSMesa for GL.
if (!parsed_command_line.HasSwitch(switches::kUseGL))
gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc
index eafdfa4..3dd2140 100644
--- a/webkit/tools/test_shell/test_shell_switches.cc
+++ b/webkit/tools/test_shell/test_shell_switches.cc
@@ -24,20 +24,12 @@ const char kClassicTheme[] = "classic-theme";
// enabled. This is the default unless --layout-tests is specified.
const char kUxTheme[] = "ux-theme";
-// Optional command line switch that specifies timeout time for page load when
-// running file tests in layout test mode, in ms.
-const char kTestShellTimeOut[] = "time-out-ms";
-
const char kStartupDialog[] = "testshell-startup-dialog";
// Enable the Windows dialogs for GP faults in the test shell. This allows makes
// it possible to attach a crashed test shell to a debugger.
const char kGPFaultErrorBox[] = "gp-fault-error-box";
-// Make the test shell load the test URL multiple times. The output dump will
-// only be made from the default last run.
-const char kMultipleLoads[] = "multiple-loads";
-
// JavaScript flags passed to engine. If multiple loads has been specified this
// can be a list separated by commas. Each set of flags are passed to the engine
// in the corresponding load.
diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h
index f45296a..b8843d1 100644
--- a/webkit/tools/test_shell/test_shell_switches.h
+++ b/webkit/tools/test_shell/test_shell_switches.h
@@ -15,11 +15,9 @@ extern const char kGenericTheme[];
extern const char kClassicTheme[];
extern const char kUxTheme[];
extern const char kNoErrorDialogs[];
-extern const char kTestShellTimeOut[];
extern const char kStartupDialog[];
extern const char kGPFaultErrorBox[];
extern const char kJavaScriptFlags[];
-extern const char kMultipleLoads[];
extern const char kDumpStatsTable[];
extern const char kCacheDir[];
extern const char kEnableFileCookies[];
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 6ab9644..a11f39e 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -367,75 +367,6 @@ bool TestShell::Initialize(const GURL& starting_url) {
return true;
}
-void TestShell::TestFinished() {
- if (!test_is_pending_)
- return; // reached when running under test_shell_tests
-
- test_is_pending_ = false;
-
- UINT_PTR timer_id = reinterpret_cast<UINT_PTR>(this);
- KillTimer(mainWnd(), timer_id);
-
- MessageLoop::current()->Quit();
-}
-
-// Thread main to run for the thread which just tests for timeout.
-unsigned int __stdcall WatchDogThread(void *arg) {
- // If we're debugging a layout test, don't timeout.
- if (::IsDebuggerPresent())
- return 0;
-
- TestShell* shell = static_cast<TestShell*>(arg);
- DWORD timeout = static_cast<DWORD>(shell->GetLayoutTestTimeoutForWatchDog());
- DWORD rv = WaitForSingleObject(shell->finished_event(), timeout);
- if (rv == WAIT_TIMEOUT) {
- // Print a warning to be caught by the layout-test script.
- // Note: the layout test driver may or may not recognize
- // this as a timeout.
- puts("#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- TerminateProcess(GetCurrentProcess(), 0);
- }
- // Finished normally.
- return 0;
-}
-
-void TestShell::WaitTestFinished() {
- DCHECK(!test_is_pending_) << "cannot be used recursively";
-
- test_is_pending_ = true;
-
- // Create a watchdog thread which just sets a timer and
- // kills the process if it times out. This catches really
- // bad hangs where the shell isn't coming back to the
- // message loop. If the watchdog is what catches a
- // timeout, it can't do anything except terminate the test
- // shell, which is unfortunate.
- finished_event_ = CreateEvent(NULL, TRUE, FALSE, NULL);
- DCHECK(finished_event_ != NULL);
-
- HANDLE thread_handle = reinterpret_cast<HANDLE>(_beginthreadex(
- NULL,
- 0,
- &WatchDogThread,
- this,
- 0,
- 0));
- DCHECK(thread_handle != NULL);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (test_is_pending_)
- MessageLoop::current()->Run();
-
- // Tell the watchdog that we are finished.
- SetEvent(finished_event_);
-
- // Wait to join the watchdog thread. (up to 1s, then quit)
- WaitForSingleObject(thread_handle, 1000);
-}
-
void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
if (!enable && ::GetFocus() == host->view_handle())
::SetFocus(NULL);
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 766ecc0..afba3a7 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -633,10 +633,6 @@ void TestWebViewDelegate::didCreateDataSource(
}
void TestWebViewDelegate::didStartProvisionalLoad(WebFrame* frame) {
- if (!top_loading_frame_) {
- top_loading_frame_ = frame;
- }
-
UpdateAddressBar(frame->view());
}
@@ -647,8 +643,6 @@ void TestWebViewDelegate::didReceiveServerRedirectForProvisionalLoad(
void TestWebViewDelegate::didFailProvisionalLoad(
WebFrame* frame, const WebURLError& error) {
- LocationChangeDone(frame);
-
// Don't display an error page if we're running layout tests, because
// DumpRenderTree doesn't.
if (shell_->layout_test_mode())
@@ -705,15 +699,9 @@ void TestWebViewDelegate::didFinishDocumentLoad(WebFrame* frame) {
void TestWebViewDelegate::didHandleOnloadEvents(WebFrame* frame) {
}
-void TestWebViewDelegate::didFailLoad(
- WebFrame* frame, const WebURLError& error) {
- LocationChangeDone(frame);
-}
-
void TestWebViewDelegate::didFinishLoad(WebFrame* frame) {
TRACE_EVENT_END_ETW("frame.load", this, frame->document().url().spec());
UpdateAddressBar(frame->view());
- LocationChangeDone(frame);
}
void TestWebViewDelegate::didNavigateWithinPage(
@@ -833,7 +821,6 @@ TestWebViewDelegate::TestWebViewDelegate(TestShell* shell)
policy_delegate_is_permissive_(false),
policy_delegate_should_notify_done_(false),
shell_(shell),
- top_loading_frame_(NULL),
page_id_(-1),
last_page_id_updated_(-1),
using_fake_rect_(false),
@@ -894,13 +881,6 @@ void TestWebViewDelegate::UpdateAddressBar(WebView* webView) {
SetAddressBarURL(data_source->request().url());
}
-void TestWebViewDelegate::LocationChangeDone(WebFrame* frame) {
- if (frame == top_loading_frame_) {
- top_loading_frame_ = NULL;
- shell_->TestFinished();
- }
-}
-
WebWidgetHost* TestWebViewDelegate::GetWidgetHost() {
if (this == shell_->delegate())
return shell_->webViewHost();
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index c981f2a..334e2a3 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -207,8 +207,6 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
WebKit::WebTextDirection direction);
virtual void didFinishDocumentLoad(WebKit::WebFrame*);
virtual void didHandleOnloadEvents(WebKit::WebFrame*);
- virtual void didFailLoad(
- WebKit::WebFrame*, const WebKit::WebURLError&);
virtual void didFinishLoad(WebKit::WebFrame*);
virtual void didNavigateWithinPage(
WebKit::WebFrame*, bool is_new_navigation);
@@ -259,7 +257,6 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
void Reset();
// Additional accessors
- WebKit::WebFrame* top_loading_frame() { return top_loading_frame_; }
#if defined(OS_WIN)
IDropTarget* drop_delegate() { return drop_delegate_.get(); }
#endif
@@ -341,11 +338,6 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// call this function when we really want a message to pop up.
void ShowJavaScriptAlert(const base::string16& message);
- // In the Mac code, this is called to trigger the end of a test after the
- // page has finished loading. From here, we can generate the dump for the
- // test.
- void LocationChangeDone(WebKit::WebFrame*);
-
// Tests that require moving or resizing the main window (via resizeTo() or
// moveTo()) pass in Chrome even though Chrome disregards move requests for
// non-popup windows (see TabContents::RequestMove()). These functions allow
@@ -381,9 +373,6 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// Non-owning pointer. The delegate is owned by the host.
TestShell* shell_;
- // This is non-NULL IFF a load is in progress.
- WebKit::WebFrame* top_loading_frame_;
-
// For tracking session history. See RenderView.
int page_id_;
int last_page_id_updated_;