Index: webkit/support/webkit_support.cc |
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc |
index 048ef4ea46e0837434dd0091c1f7f50fbdf744a6..1c6d0fb690dac107a28b707b0f8cfb47c46164f4 100644 |
--- a/webkit/support/webkit_support.cc |
+++ b/webkit/support/webkit_support.cc |
@@ -149,7 +149,8 @@ class TestEnvironment { |
#endif |
TestEnvironment(bool unit_test_mode, |
- base::AtExitManager* existing_at_exit_manager) { |
+ base::AtExitManager* existing_at_exit_manager, |
+ WebKit::Platform* shadow_platform_support) { |
if (unit_test_mode) { |
logging::SetLogAssertHandler(UnitTestAssertHandler); |
} else { |
@@ -158,9 +159,10 @@ class TestEnvironment { |
InitLogging(); |
} |
main_message_loop_.reset(new MessageLoopType); |
+ |
// TestWebKitPlatformSupport must be instantiated after MessageLoopType. |
webkit_platform_support_.reset( |
- new TestWebKitPlatformSupport(unit_test_mode)); |
+ new TestWebKitPlatformSupport(unit_test_mode, shadow_platform_support)); |
#if defined(OS_ANDROID) |
media_player_manager_.reset( |
@@ -278,7 +280,8 @@ webkit_support::GraphicsContext3DImplementation |
TestEnvironment* test_environment; |
-void SetUpTestEnvironmentImpl(bool unit_test_mode) { |
+void SetUpTestEnvironmentImpl(bool unit_test_mode, |
+ WebKit::Platform* shadow_platform_support) { |
base::EnableInProcessStackDumping(); |
base::EnableTerminationOnHeapCorruption(); |
@@ -307,7 +310,8 @@ void SetUpTestEnvironmentImpl(bool unit_test_mode) { |
at_exit_manager = new base::AtExitManager; |
#endif |
webkit_support::BeforeInitialize(unit_test_mode); |
- test_environment = new TestEnvironment(unit_test_mode, at_exit_manager); |
+ test_environment = new TestEnvironment(unit_test_mode, at_exit_manager, |
+ shadow_platform_support); |
webkit_support::AfterInitialize(unit_test_mode); |
if (!unit_test_mode) { |
// Load ICU data tables. This has to run after TestEnvironment is created |
@@ -322,12 +326,13 @@ void SetUpTestEnvironmentImpl(bool unit_test_mode) { |
namespace webkit_support { |
-void SetUpTestEnvironment() { |
- SetUpTestEnvironmentImpl(false); |
+void SetUpTestEnvironment(WebKit::Platform* shadow_platform_support) { |
+ SetUpTestEnvironmentImpl(false, shadow_platform_support); |
} |
-void SetUpTestEnvironmentForUnitTests() { |
- SetUpTestEnvironmentImpl(true); |
+void SetUpTestEnvironmentForUnitTests( |
+ WebKit::Platform* shadow_platform_support) { |
+ SetUpTestEnvironmentImpl(true, shadow_platform_support); |
} |
void TearDownTestEnvironment() { |