| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.android_webview.test; | 5 package org.chromium.android_webview.test; |
| 6 | 6 |
| 7 import android.os.Bundle; | 7 import android.os.Bundle; |
| 8 import android.test.suitebuilder.annotation.SmallTest; | 8 import android.test.suitebuilder.annotation.SmallTest; |
| 9 | 9 |
| 10 import org.chromium.android_webview.AwContents; | 10 import org.chromium.android_webview.AwContents; |
| 11 import org.chromium.android_webview.test.util.CommonResources; | 11 import org.chromium.android_webview.test.util.CommonResources; |
| 12 import org.chromium.base.test.util.Feature; | 12 import org.chromium.base.test.util.Feature; |
| 13 import org.chromium.content.browser.ContentViewCore; | 13 import org.chromium.content.browser.ContentViewCore; |
| 14 import org.chromium.content.browser.NavigationHistory; | 14 import org.chromium.content_public.browser.NavigationHistory; |
| 15 import org.chromium.net.test.util.TestWebServer; | 15 import org.chromium.net.test.util.TestWebServer; |
| 16 | 16 |
| 17 import java.util.concurrent.Callable; | 17 import java.util.concurrent.Callable; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Tests for the {@link android.webkit.WebView#saveState} and | 20 * Tests for the {@link android.webkit.WebView#saveState} and |
| 21 * {@link android.webkit.WebView#restoreState} APIs. | 21 * {@link android.webkit.WebView#restoreState} APIs. |
| 22 */ | 22 */ |
| 23 public class SaveRestoreStateTest extends AwTestBase { | 23 public class SaveRestoreStateTest extends AwTestBase { |
| 24 private static class TestVars { | 24 private static class TestVars { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 final Bundle state = new Bundle(); | 171 final Bundle state = new Bundle(); |
| 172 boolean result = runTestOnUiThreadAndGetResult(new Callable<Boolean>() { | 172 boolean result = runTestOnUiThreadAndGetResult(new Callable<Boolean>() { |
| 173 @Override | 173 @Override |
| 174 public Boolean call() throws Exception { | 174 public Boolean call() throws Exception { |
| 175 return mVars.awContents.restoreState(state); | 175 return mVars.awContents.restoreState(state); |
| 176 } | 176 } |
| 177 }); | 177 }); |
| 178 assertFalse(result); | 178 assertFalse(result); |
| 179 } | 179 } |
| 180 } | 180 } |
| OLD | NEW |