OSDN Git Service

DRT needs to clear cookies between tests.
authorBen Murdoch <benm@google.com>
Thu, 20 Jan 2011 11:21:24 +0000 (11:21 +0000)
committerBen Murdoch <benm@google.com>
Thu, 20 Jan 2011 11:22:10 +0000 (11:22 +0000)
Fixes failure seen in fast/cookies/local-file-can-set-cookies.html

Change-Id: I08b8a0fcf87003fa4621dce08604bf42e70e4635

tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java

index a3466e2..9c4fa97 100644 (file)
@@ -37,6 +37,7 @@ import android.util.Log;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.webkit.ConsoleMessage;
+import android.webkit.CookieManager;
 import android.webkit.GeolocationPermissions;
 import android.webkit.HttpAuthHandler;
 import android.webkit.JsPromptResult;
@@ -827,6 +828,7 @@ public class TestShellActivity extends Activity implements LayoutTestController
         setDefaultWebSettings(mWebView);
         mIsGeolocationPermissionSet = false;
         mPendingGeolocationPermissionCallbacks = null;
+        CookieManager.getInstance().removeAllCookie();
     }
 
     private long[] getDrawWebViewTime(WebView view, int count) {