
org.robolectric.shadows.ShadowCookieManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.webkit.CookieManager;
import android.webkit.RoboCookieManager;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
@Implements(CookieManager.class)
public class ShadowCookieManager {
private static RoboCookieManager cookieManager;
private boolean flushed;
@Resetter
public static void resetCookies() {
cookieManager = null;
}
@Implementation
public static CookieManager getInstance() {
if (cookieManager == null) {
cookieManager = new RoboCookieManager();
}
return cookieManager;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy