diff options
author | hush <hush@chromium.org> | 2015-12-02 18:47:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-03 02:48:23 +0000 |
commit | dab2bb8dfb9b2109caea4d5e26444d3407169abb (patch) | |
tree | 3300734fc54af5b74df54ba63c571952a437f9d2 /android_webview/java | |
parent | 0d93c1a79b3c4cc3b633e9f6e1fbae6cf1611f64 (diff) | |
download | chromium_src-dab2bb8dfb9b2109caea4d5e26444d3407169abb.zip chromium_src-dab2bb8dfb9b2109caea4d5e26444d3407169abb.tar.gz chromium_src-dab2bb8dfb9b2109caea4d5e26444d3407169abb.tar.bz2 |
Android WebView: Blink Page visibility API tests.
Android WebView's view visibility will no longer affect page visibility.
Update the test to reflect that.
BUG=
Review URL: https://codereview.chromium.org/1493873003
Cr-Commit-Position: refs/heads/master@{#362873}
Diffstat (limited to 'android_webview/java')
-rw-r--r-- | android_webview/java/src/org/chromium/android_webview/AwContents.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java index ca80b7e..ebebc65 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java @@ -2408,6 +2408,18 @@ public class AwContents implements SmartClipProvider, } /** + * Returns true if the page is visible according to DOM page visibility API. + * See http://www.w3.org/TR/page-visibility/ + * This method is only called by tests and will return the supposed CVC + * visibility without waiting a pending mUpdateVisibilityRunnable to run. + */ + @VisibleForTesting + public boolean isPageVisible() { + if (isDestroyed(NO_WARN)) return mIsContentViewCoreVisible; + return nativeIsVisible(mNativeAwContents); + } + + /** * Key for opaque state in bundle. Note this is only public for tests. */ public static final String SAVE_RESTORE_STATE_KEY = "WEBVIEW_CHROMIUM_STATE"; |