Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2245)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java

Issue 263903008: aw: Fix detach and destroy interaction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwSettings.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
index 10ee78072561fe6e1957f838984df18337cdc12f..01a52a33feaeca33668d2e8bbee80c93678b0fc2 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
@@ -136,6 +136,25 @@ public class AwContentsTest extends AwTestBase {
});
}
+ @SmallTest
+ @Feature({"AndroidWebView"})
+ public void testUseAwSettingsAfterDestroy() throws Throwable {
+ AwTestContainerView awTestContainerView =
+ createAwTestContainerViewOnMainSync(mContentsClient);
+ AwSettings awSettings = getAwSettingsOnUiThread(awTestContainerView.getAwContents());
+ loadUrlSync(awTestContainerView.getAwContents(),
+ mContentsClient.getOnPageFinishedHelper(), CommonResources.ABOUT_HTML);
+ destroyAwContentsOnMainSync(awTestContainerView.getAwContents());
+
+ // AwSettings should still be usable even after native side is destroyed.
+ String newFontFamily = "serif";
+ awSettings.setStandardFontFamily(newFontFamily);
+ assertEquals(newFontFamily, awSettings.getStandardFontFamily());
+ boolean newBlockNetworkLoads = !awSettings.getBlockNetworkLoads();
+ awSettings.setBlockNetworkLoads(newBlockNetworkLoads);
+ assertEquals(newBlockNetworkLoads, awSettings.getBlockNetworkLoads());
+ }
+
private int callDocumentHasImagesSync(final AwContents awContents)
throws Throwable, InterruptedException {
// Set up a container to hold the result object and a semaphore to
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwSettings.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698