summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj2
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc28
-rw-r--r--webkit/tools/test_shell/test_shell_test.cc3
3 files changed, 9 insertions, 24 deletions
diff --git a/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj b/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
index 655d179..23b6790 100644
--- a/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
+++ b/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
@@ -88,6 +88,7 @@
AB19AC150F1BBBD000673E20 /* test_shell_main.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB19AC140F1BBBD000673E20 /* test_shell_main.cc */; };
AB19AC290F1BD6C900673E20 /* test_shell_platform_delegate_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB19AC280F1BD6C900673E20 /* test_shell_platform_delegate_mac.mm */; };
AB19AD380F1D0AF200673E20 /* test_shell_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABA9CAE90DBC521D00CB1EFB /* test_shell_mac.mm */; };
+ AB5FD3C90F2E2457000EE9AF /* test_shell_platform_delegate_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB19AC280F1BD6C900673E20 /* test_shell_platform_delegate_mac.mm */; };
E43A79AA0F1CE23800ABD5D1 /* textAreaResizeCorner.png in Resources */ = {isa = PBXBuildFile; fileRef = E43A79A90F1CE23800ABD5D1 /* textAreaResizeCorner.png */; };
E44662070ECCD652000B9316 /* test_webview_delegate.cc in Sources */ = {isa = PBXBuildFile; fileRef = E44662060ECCD652000B9316 /* test_webview_delegate.cc */; };
E450637E0E4100740025A81A /* test_shell_request_context.cc in Sources */ = {isa = PBXBuildFile; fileRef = E450637D0E4100740025A81A /* test_shell_request_context.cc */; };
@@ -1927,6 +1928,7 @@
E45067BD0EF0163D003BE099 /* test_navigation_controller.cc in Sources */,
E45067C00EF01650003BE099 /* test_shell.cc in Sources */,
E45067C20EF01668003BE099 /* test_shell_mac.mm in Sources */,
+ AB5FD3C90F2E2457000EE9AF /* test_shell_platform_delegate_mac.mm in Sources */,
E45067BE0EF01644003BE099 /* test_shell_request_context.cc in Sources */,
E45067BF0EF01648003BE099 /* test_shell_switches.cc in Sources */,
E4506A490EF02288003BE099 /* test_shell_test.cc in Sources */,
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
index 9d5cfb7..579338b 100644
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ b/webkit/tools/test_shell/run_all_tests.cc
@@ -10,8 +10,6 @@
#if defined(OS_WIN)
#include <windows.h>
#include <commctrl.h>
-#elif defined(OS_LINUX)
-#include <gtk/gtk.h>
#endif
#include "base/at_exit.h"
@@ -23,13 +21,10 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell.h"
+#include "webkit/tools/test_shell/test_shell_platform_delegate.h"
#include "webkit/tools/test_shell/test_shell_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_MACOSX)
-#include "WebSystemInterface.h"
-#endif
-
const char* TestShellTest::kJavascriptDelayExitScript =
"<script>"
"window.layoutTestController.waitUntilDone();"
@@ -40,21 +35,16 @@ const char* TestShellTest::kJavascriptDelayExitScript =
"</script>";
int main(int argc, char* argv[]) {
-#if defined(OS_MACOSX)
- InitWebCoreSystemInterface();
-#endif
-
base::ScopedNSAutoreleasePool autorelease_pool;
base::EnableTerminationOnHeapCorruption();
// Some unittests may use base::Singleton<>, thus we need to instanciate
// the AtExitManager or else we will leak objects.
base::AtExitManager at_exit_manager;
-#if defined(OS_LINUX)
- gtk_init(&argc, &argv);
-#endif
-
+ TestShellPlatformDelegate::PreflightArgs(&argc, &argv);
CommandLine::Init(argc, argv);
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
+ TestShellPlatformDelegate platform(parsed_command_line);
// Suppress error dialogs and do not show GP fault error box on Windows.
TestShell::InitLogging(true, false, false);
@@ -80,13 +70,8 @@ int main(int argc, char* argv[]) {
// Load ICU data tables
icu_util::Initialize();
-#if defined(OS_WIN)
- INITCOMMONCONTROLSEX InitCtrlEx;
-
- InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
- InitCtrlEx.dwICC = ICC_STANDARD_CLASSES;
- InitCommonControlsEx(&InitCtrlEx);
-#endif
+ platform.InitializeGUI();
+ platform.SelectUnifiedTheme();
// Run the actual tests
testing::InitGoogleTest(&argc, argv);
@@ -97,3 +82,4 @@ int main(int argc, char* argv[]) {
return result;
}
+
diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc
index 31aee4e..4b5a37e 100644
--- a/webkit/tools/test_shell/test_shell_test.cc
+++ b/webkit/tools/test_shell/test_shell_test.cc
@@ -18,9 +18,6 @@ std::wstring TestShellTest::GetTestURL(std::wstring test_case_path,
void TestShellTest::SetUp() {
// Make a test shell for use by the test.
-#if defined(OS_WIN)
- TestShell::RegisterWindowClass();
-#endif
CreateEmptyWindow();
test_shell_->Show(test_shell_->webView(), NEW_WINDOW);