Index: webkit/support/webkit_support.cc |
=================================================================== |
--- webkit/support/webkit_support.cc (revision 177172) |
+++ webkit/support/webkit_support.cc (working copy) |
@@ -171,6 +171,9 @@ |
new TestWebKitPlatformSupport(unit_test_mode, |
shadow_platform_delegate)); |
+ // TODO(darin): Uncomment this once DRT calls ResetTestEnvironment(). |
+ //WebKit::setIDBFactory(webkit_platform_support_->idbFactory()); |
+ |
#if defined(OS_ANDROID) |
// Make sure we have enough decoding resources for layout tests. |
// The current maximum number of media elements in a layout test is 8. |
@@ -185,6 +188,13 @@ |
SimpleResourceLoaderBridge::Shutdown(); |
} |
+ void Reset() { |
+#if defined(OS_ANDROID) |
+ media_player_manager_->ReleaseMediaResources(); |
+#endif |
+ WebKit::setIDBFactory(webkit_platform_support_->idbFactory()); |
+ } |
+ |
TestWebKitPlatformSupport* webkit_platform_support() const { |
return webkit_platform_support_.get(); |
} |
@@ -374,6 +384,10 @@ |
logging::CloseLogFile(); |
} |
+void ResetTestEnvironment() { |
+ test_environment->Reset(); |
+} |
+ |
WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport() { |
DCHECK(test_environment); |
return test_environment->webkit_platform_support(); |