Package org.robolectric.fakes
Class RoboWebSettings
java.lang.Object
android.webkit.WebSettings
org.robolectric.fakes.RoboWebSettings
Robolectric implementation of
WebSettings
.-
Nested Class Summary
Nested classes/interfaces inherited from class android.webkit.WebSettings
WebSettings.CacheMode, WebSettings.ForceDark, WebSettings.LayoutAlgorithm, WebSettings.PluginState, WebSettings.RenderPriority, WebSettings.TextSize, WebSettings.ZoomDensity
-
Field Summary
Fields inherited from class android.webkit.WebSettings
ENABLE_SIMPLIFIED_DARK_MODE, FORCE_DARK_AUTO, FORCE_DARK_OFF, FORCE_DARK_ON, LOAD_CACHE_ELSE_NETWORK, LOAD_CACHE_ONLY, LOAD_DEFAULT, LOAD_NO_CACHE, LOAD_NORMAL, MENU_ITEM_NONE, MENU_ITEM_PROCESS_TEXT, MENU_ITEM_SHARE, MENU_ITEM_WEB_SEARCH, MIXED_CONTENT_ALWAYS_ALLOW, MIXED_CONTENT_COMPATIBILITY_MODE, MIXED_CONTENT_NEVER_ALLOW
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
boolean
boolean
long
boolean
boolean
boolean
int
boolean
int
int
int
boolean
boolean
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
int
int
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
int
int
boolean
boolean
boolean
void
setAcceptThirdPartyCookies
(boolean acceptThirdPartyCookies) void
setAllowContentAccess
(boolean allow) void
setAllowFileAccess
(boolean allow) void
setAllowFileAccessFromFileURLs
(boolean allow) void
setAllowUniversalAccessFromFileURLs
(boolean allow) void
setAppCacheEnabled
(boolean appCacheEnabled) void
setAppCacheMaxSize
(long appCacheMaxSize) void
setAppCachePath
(String appCachePath) void
setBlockNetworkImage
(boolean flag) void
setBlockNetworkLoads
(boolean flag) void
setBuiltInZoomControls
(boolean enabled) void
setCacheMode
(int mode) void
setCursiveFontFamily
(String cursiveFontFamily) void
setDatabaseEnabled
(boolean flag) void
setDatabasePath
(String path) void
setDefaultFixedFontSize
(int defaultFixedFontSize) void
setDefaultFontSize
(int defaultFontSize) void
setDefaultTextEncodingName
(String defaultTextEncoding) void
void
setDisabledActionModeMenuItems
(int menuItems) void
setDisplayZoomControls
(boolean enabled) void
setDomStorageEnabled
(boolean flag) void
setEnableSmoothTransition
(boolean enableSmoothTransition) void
setFantasyFontFamily
(String fantasyFontFamily) void
setFixedFontFamily
(String fixedFontFamily) void
setForceDark
(int forceDark) void
setGeolocationDatabasePath
(String geolocationDatabasePath) void
setGeolocationEnabled
(boolean geolocationEnabled) void
setJavaScriptCanOpenWindowsAutomatically
(boolean javaScriptCanOpenWindowAutomatically) void
setJavaScriptEnabled
(boolean flag) void
setLayoutAlgorithm
(WebSettings.LayoutAlgorithm algorithm) void
setLightTouchEnabled
(boolean flag) void
setLoadsImagesAutomatically
(boolean loadsImagesAutomatically) void
setLoadWithOverviewMode
(boolean flag) void
setMediaPlaybackRequiresUserGesture
(boolean require) void
setMinimumFontSize
(int minimumFontSize) void
setMinimumLogicalFontSize
(int minimumLogicalFontSize) void
setMixedContentMode
(int mixedContentMode) void
setNavDump
(boolean navDump) void
setNeedInitialFocus
(boolean flag) void
setOffscreenPreRaster
(boolean enabled) void
setPluginsEnabled
(boolean flag) void
void
setRenderPriority
(WebSettings.RenderPriority priority) void
setSafeBrowsingEnabled
(boolean enabled) void
setSansSerifFontFamily
(String sansSerifFontFamily) void
setSaveFormData
(boolean saveFormData) void
setSavePassword
(boolean savePassword) void
setSerifFontFamily
(String serifFontFamily) void
setStandardFontFamily
(String standardFontFamily) void
setSupportMultipleWindows
(boolean support) void
setSupportZoom
(boolean support) void
setTextZoom
(int textZoom) void
setUserAgent
(int userAgent) void
void
setUseWebViewBackgroundForOverscrollBackground
(boolean useWebViewBackgroundForOverscrollBackground) void
setUseWideViewPort
(boolean useWideViewPort) void
boolean
boolean
Methods inherited from class android.webkit.WebSettings
getDefaultUserAgent, getPluginsPath, getTextSize, getUseDoubleTree, isAlgorithmicDarkeningAllowed, setAlgorithmicDarkeningAllowed, setPluginsPath, setTextSize, setUseDoubleTree
-
Constructor Details
-
RoboWebSettings
public RoboWebSettings()
-
-
Method Details
-
getBlockNetworkImage
public boolean getBlockNetworkImage()- Specified by:
getBlockNetworkImage
in classWebSettings
-
setBlockNetworkImage
public void setBlockNetworkImage(boolean flag) - Specified by:
setBlockNetworkImage
in classWebSettings
-
getJavaScriptEnabled
public boolean getJavaScriptEnabled()- Specified by:
getJavaScriptEnabled
in classWebSettings
-
setJavaScriptEnabled
public void setJavaScriptEnabled(boolean flag) - Specified by:
setJavaScriptEnabled
in classWebSettings
-
getLightTouchEnabled
public boolean getLightTouchEnabled()- Specified by:
getLightTouchEnabled
in classWebSettings
-
setLightTouchEnabled
public void setLightTouchEnabled(boolean flag) - Specified by:
setLightTouchEnabled
in classWebSettings
-
getNeedInitialFocus
public boolean getNeedInitialFocus() -
setNeedInitialFocus
public void setNeedInitialFocus(boolean flag) - Specified by:
setNeedInitialFocus
in classWebSettings
-
setRenderPriority
- Specified by:
setRenderPriority
in classWebSettings
-
getRenderPriority
-
getPluginsEnabled
public boolean getPluginsEnabled()- Specified by:
getPluginsEnabled
in classWebSettings
-
setPluginsEnabled
public void setPluginsEnabled(boolean flag) - Specified by:
setPluginsEnabled
in classWebSettings
-
getSupportMultipleWindows
public boolean getSupportMultipleWindows() -
setSupportMultipleWindows
public void setSupportMultipleWindows(boolean support) - Specified by:
setSupportMultipleWindows
in classWebSettings
-
getSupportZoom
public boolean getSupportZoom() -
setSupportZoom
public void setSupportZoom(boolean support) - Specified by:
setSupportZoom
in classWebSettings
-
setCacheMode
public void setCacheMode(int mode) - Specified by:
setCacheMode
in classWebSettings
-
getCacheMode
public int getCacheMode()- Specified by:
getCacheMode
in classWebSettings
-
getUseWideViewPort
public boolean getUseWideViewPort()- Specified by:
getUseWideViewPort
in classWebSettings
-
setUseWideViewPort
public void setUseWideViewPort(boolean useWideViewPort) - Specified by:
setUseWideViewPort
in classWebSettings
-
getSaveFormData
public boolean getSaveFormData()- Specified by:
getSaveFormData
in classWebSettings
-
setSaveFormData
public void setSaveFormData(boolean saveFormData) - Specified by:
setSaveFormData
in classWebSettings
-
setJavaScriptCanOpenWindowsAutomatically
public void setJavaScriptCanOpenWindowsAutomatically(boolean javaScriptCanOpenWindowAutomatically) - Specified by:
setJavaScriptCanOpenWindowsAutomatically
in classWebSettings
-
getJavaScriptCanOpenWindowsAutomatically
public boolean getJavaScriptCanOpenWindowsAutomatically()- Specified by:
getJavaScriptCanOpenWindowsAutomatically
in classWebSettings
-
setLayoutAlgorithm
- Specified by:
setLayoutAlgorithm
in classWebSettings
-
getDefaultTextEncodingName
- Specified by:
getDefaultTextEncodingName
in classWebSettings
-
setDefaultTextEncodingName
- Specified by:
setDefaultTextEncodingName
in classWebSettings
-
getDefaultFontSize
public int getDefaultFontSize()- Specified by:
getDefaultFontSize
in classWebSettings
-
setDefaultFontSize
public void setDefaultFontSize(int defaultFontSize) - Specified by:
setDefaultFontSize
in classWebSettings
-
getLoadsImagesAutomatically
public boolean getLoadsImagesAutomatically()- Specified by:
getLoadsImagesAutomatically
in classWebSettings
-
setLoadsImagesAutomatically
public void setLoadsImagesAutomatically(boolean loadsImagesAutomatically) - Specified by:
setLoadsImagesAutomatically
in classWebSettings
-
getDefaultFixedFontSize
public int getDefaultFixedFontSize()- Specified by:
getDefaultFixedFontSize
in classWebSettings
-
setDefaultFixedFontSize
public void setDefaultFixedFontSize(int defaultFixedFontSize) - Specified by:
setDefaultFixedFontSize
in classWebSettings
-
getMinimumLogicalFontSize
public int getMinimumLogicalFontSize()- Specified by:
getMinimumLogicalFontSize
in classWebSettings
-
setMinimumLogicalFontSize
public void setMinimumLogicalFontSize(int minimumLogicalFontSize) - Specified by:
setMinimumLogicalFontSize
in classWebSettings
-
getMinimumFontSize
public int getMinimumFontSize()- Specified by:
getMinimumFontSize
in classWebSettings
-
setMinimumFontSize
public void setMinimumFontSize(int minimumFontSize) - Specified by:
setMinimumFontSize
in classWebSettings
-
getFantasyFontFamily
- Specified by:
getFantasyFontFamily
in classWebSettings
-
setFantasyFontFamily
- Specified by:
setFantasyFontFamily
in classWebSettings
-
getCursiveFontFamily
- Specified by:
getCursiveFontFamily
in classWebSettings
-
setCursiveFontFamily
- Specified by:
setCursiveFontFamily
in classWebSettings
-
getSerifFontFamily
- Specified by:
getSerifFontFamily
in classWebSettings
-
setSerifFontFamily
- Specified by:
setSerifFontFamily
in classWebSettings
-
getSansSerifFontFamily
- Specified by:
getSansSerifFontFamily
in classWebSettings
-
setSansSerifFontFamily
- Specified by:
setSansSerifFontFamily
in classWebSettings
-
getFixedFontFamily
- Specified by:
getFixedFontFamily
in classWebSettings
-
setFixedFontFamily
- Specified by:
setFixedFontFamily
in classWebSettings
-
getStandardFontFamily
- Specified by:
getStandardFontFamily
in classWebSettings
-
setStandardFontFamily
- Specified by:
setStandardFontFamily
in classWebSettings
-
getLayoutAlgorithm
- Specified by:
getLayoutAlgorithm
in classWebSettings
-
supportMultipleWindows
public boolean supportMultipleWindows()- Specified by:
supportMultipleWindows
in classWebSettings
-
getSavePassword
public boolean getSavePassword()- Specified by:
getSavePassword
in classWebSettings
-
setSavePassword
public void setSavePassword(boolean savePassword) - Specified by:
setSavePassword
in classWebSettings
-
supportZoom
public boolean supportZoom()- Specified by:
supportZoom
in classWebSettings
-
getUserAgent
public int getUserAgent()- Specified by:
getUserAgent
in classWebSettings
-
setUserAgent
public void setUserAgent(int userAgent) - Specified by:
setUserAgent
in classWebSettings
-
getAllowFileAccess
public boolean getAllowFileAccess()- Specified by:
getAllowFileAccess
in classWebSettings
-
setAllowFileAccess
public void setAllowFileAccess(boolean allow) - Specified by:
setAllowFileAccess
in classWebSettings
-
getBuiltInZoomControls
public boolean getBuiltInZoomControls()- Specified by:
getBuiltInZoomControls
in classWebSettings
-
setBuiltInZoomControls
public void setBuiltInZoomControls(boolean enabled) - Specified by:
setBuiltInZoomControls
in classWebSettings
-
setUserAgentString
- Specified by:
setUserAgentString
in classWebSettings
-
getUserAgentString
- Specified by:
getUserAgentString
in classWebSettings
-
getDatabaseEnabled
public boolean getDatabaseEnabled()- Specified by:
getDatabaseEnabled
in classWebSettings
-
setDatabaseEnabled
public void setDatabaseEnabled(boolean flag) - Specified by:
setDatabaseEnabled
in classWebSettings
-
setDatabasePath
- Specified by:
setDatabasePath
in classWebSettings
-
getDatabasePath
- Specified by:
getDatabasePath
in classWebSettings
-
getGeolocationDatabasePath
-
setGeolocationDatabasePath
- Specified by:
setGeolocationDatabasePath
in classWebSettings
-
getGeolocationEnabled
public boolean getGeolocationEnabled() -
setGeolocationEnabled
public void setGeolocationEnabled(boolean geolocationEnabled) - Specified by:
setGeolocationEnabled
in classWebSettings
-
setDefaultZoom
- Specified by:
setDefaultZoom
in classWebSettings
-
getDefaultZoom
- Specified by:
getDefaultZoom
in classWebSettings
-
getDomStorageEnabled
public boolean getDomStorageEnabled()- Specified by:
getDomStorageEnabled
in classWebSettings
-
setDomStorageEnabled
public void setDomStorageEnabled(boolean flag) - Specified by:
setDomStorageEnabled
in classWebSettings
-
getLoadWithOverviewMode
public boolean getLoadWithOverviewMode()- Specified by:
getLoadWithOverviewMode
in classWebSettings
-
setLoadWithOverviewMode
public void setLoadWithOverviewMode(boolean flag) - Specified by:
setLoadWithOverviewMode
in classWebSettings
-
getAppCacheEnabled
public boolean getAppCacheEnabled() -
setAppCacheEnabled
public void setAppCacheEnabled(boolean appCacheEnabled) - Overrides:
setAppCacheEnabled
in classWebSettings
-
setAppCacheMaxSize
public void setAppCacheMaxSize(long appCacheMaxSize) - Overrides:
setAppCacheMaxSize
in classWebSettings
-
getAppCacheMaxSize
public long getAppCacheMaxSize() -
getAppCachePath
-
setAppCachePath
- Overrides:
setAppCachePath
in classWebSettings
-
getBlockNetworkLoads
public boolean getBlockNetworkLoads()- Specified by:
getBlockNetworkLoads
in classWebSettings
-
setBlockNetworkLoads
public void setBlockNetworkLoads(boolean flag) - Specified by:
setBlockNetworkLoads
in classWebSettings
-
getPluginState
- Specified by:
getPluginState
in classWebSettings
-
setPluginState
- Specified by:
setPluginState
in classWebSettings
-
getUseWebViewBackgroundForOverscrollBackground
public boolean getUseWebViewBackgroundForOverscrollBackground()- Specified by:
getUseWebViewBackgroundForOverscrollBackground
in classWebSettings
-
setUseWebViewBackgroundForOverscrollBackground
public void setUseWebViewBackgroundForOverscrollBackground(boolean useWebViewBackgroundForOverscrollBackground) - Specified by:
setUseWebViewBackgroundForOverscrollBackground
in classWebSettings
-
enableSmoothTransition
public boolean enableSmoothTransition()- Specified by:
enableSmoothTransition
in classWebSettings
-
setEnableSmoothTransition
public void setEnableSmoothTransition(boolean enableSmoothTransition) - Specified by:
setEnableSmoothTransition
in classWebSettings
-
setAllowContentAccess
public void setAllowContentAccess(boolean allow) - Specified by:
setAllowContentAccess
in classWebSettings
-
getAllowContentAccess
public boolean getAllowContentAccess()- Specified by:
getAllowContentAccess
in classWebSettings
-
setDisplayZoomControls
public void setDisplayZoomControls(boolean enabled) - Specified by:
setDisplayZoomControls
in classWebSettings
-
getDisplayZoomControls
public boolean getDisplayZoomControls()- Specified by:
getDisplayZoomControls
in classWebSettings
-
getTextZoom
public int getTextZoom()- Specified by:
getTextZoom
in classWebSettings
-
setTextZoom
public void setTextZoom(int textZoom) - Specified by:
setTextZoom
in classWebSettings
-
getAllowFileAccessFromFileURLs
public boolean getAllowFileAccessFromFileURLs()- Specified by:
getAllowFileAccessFromFileURLs
in classWebSettings
-
setAllowFileAccessFromFileURLs
public void setAllowFileAccessFromFileURLs(boolean allow) - Specified by:
setAllowFileAccessFromFileURLs
in classWebSettings
-
getAllowUniversalAccessFromFileURLs
public boolean getAllowUniversalAccessFromFileURLs()- Specified by:
getAllowUniversalAccessFromFileURLs
in classWebSettings
-
setAllowUniversalAccessFromFileURLs
public void setAllowUniversalAccessFromFileURLs(boolean allow) - Specified by:
setAllowUniversalAccessFromFileURLs
in classWebSettings
-
getMediaPlaybackRequiresUserGesture
public boolean getMediaPlaybackRequiresUserGesture()- Specified by:
getMediaPlaybackRequiresUserGesture
in classWebSettings
-
setMediaPlaybackRequiresUserGesture
public void setMediaPlaybackRequiresUserGesture(boolean require) - Specified by:
setMediaPlaybackRequiresUserGesture
in classWebSettings
-
setMixedContentMode
public void setMixedContentMode(int mixedContentMode) - Specified by:
setMixedContentMode
in classWebSettings
-
getMixedContentMode
public int getMixedContentMode()- Specified by:
getMixedContentMode
in classWebSettings
-
setVideoOverlayForEmbeddedEncryptedVideoEnabled
public void setVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean b) - Specified by:
setVideoOverlayForEmbeddedEncryptedVideoEnabled
in classWebSettings
-
getVideoOverlayForEmbeddedEncryptedVideoEnabled
public boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled()- Specified by:
getVideoOverlayForEmbeddedEncryptedVideoEnabled
in classWebSettings
-
getAcceptThirdPartyCookies
public boolean getAcceptThirdPartyCookies()- Specified by:
getAcceptThirdPartyCookies
in classWebSettings
-
setAcceptThirdPartyCookies
public void setAcceptThirdPartyCookies(boolean acceptThirdPartyCookies) - Specified by:
setAcceptThirdPartyCookies
in classWebSettings
-
setOffscreenPreRaster
public void setOffscreenPreRaster(boolean enabled) - Specified by:
setOffscreenPreRaster
in classWebSettings
-
getOffscreenPreRaster
public boolean getOffscreenPreRaster()- Specified by:
getOffscreenPreRaster
in classWebSettings
-
getDisabledActionModeMenuItems
public int getDisabledActionModeMenuItems()- Specified by:
getDisabledActionModeMenuItems
in classWebSettings
-
setDisabledActionModeMenuItems
public void setDisabledActionModeMenuItems(int menuItems) - Specified by:
setDisabledActionModeMenuItems
in classWebSettings
-
getSafeBrowsingEnabled
public boolean getSafeBrowsingEnabled()- Specified by:
getSafeBrowsingEnabled
in classWebSettings
-
setSafeBrowsingEnabled
public void setSafeBrowsingEnabled(boolean enabled) - Specified by:
setSafeBrowsingEnabled
in classWebSettings
-
getForceDark
public int getForceDark()- Overrides:
getForceDark
in classWebSettings
-
setForceDark
public void setForceDark(int forceDark) - Overrides:
setForceDark
in classWebSettings
-