 Chromium Code Reviews
 Chromium Code Reviews Issue 481803004:
  Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 481803004:
  Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java | 
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java | 
| index 05026112e4fd3d51b0d9bd70d25a3671babea4ee..2be243c87cfd6c81f558cc8ec994ab33262a59e8 100644 | 
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java | 
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java | 
| @@ -10,8 +10,9 @@ import android.test.suitebuilder.annotation.SmallTest; | 
| import org.chromium.android_webview.AwContents; | 
| import org.chromium.android_webview.test.util.CommonResources; | 
| import org.chromium.base.test.util.Feature; | 
| -import org.chromium.content.browser.ContentViewCore; | 
| +import org.chromium.content_public.browser.NavigationController; | 
| import org.chromium.content_public.browser.NavigationHistory; | 
| +import org.chromium.content_public.browser.WebContents; | 
| import org.chromium.net.test.util.TestWebServer; | 
| import java.util.concurrent.Callable; | 
| @@ -25,14 +26,16 @@ public class SaveRestoreStateTest extends AwTestBase { | 
| public final TestAwContentsClient contentsClient; | 
| public final AwTestContainerView testView; | 
| public final AwContents awContents; | 
| - public final ContentViewCore contentViewCore; | 
| + public final WebContents webContents; | 
| 
boliu
2014/09/13 00:38:54
Not needed. Remove this and the import
 
AKVT
2014/09/13 11:30:50
Done. Thanks
 | 
| + public final NavigationController navigationController; | 
| public TestVars(TestAwContentsClient contentsClient, | 
| AwTestContainerView testView) { | 
| this.contentsClient = contentsClient; | 
| this.testView = testView; | 
| this.awContents = testView.getAwContents(); | 
| - this.contentViewCore = this.awContents.getContentViewCore(); | 
| + this.webContents = this.awContents.getWebContents(); | 
| + this.navigationController = this.awContents.getNavigationController(); | 
| } | 
| } | 
| @@ -93,7 +96,7 @@ public class SaveRestoreStateTest extends AwTestBase { | 
| return runTestOnUiThreadAndGetResult(new Callable<NavigationHistory>() { | 
| @Override | 
| public NavigationHistory call() throws Exception { | 
| - return vars.contentViewCore.getNavigationHistory(); | 
| + return vars.navigationController.getNavigationHistory(); | 
| } | 
| }); | 
| } | 
| @@ -136,7 +139,7 @@ public class SaveRestoreStateTest extends AwTestBase { | 
| pollOnUiThread(new Callable<Boolean>() { | 
| @Override | 
| public Boolean call() throws Exception { | 
| - return TITLES[0].equals(restoredVars.contentViewCore.getTitle()) && | 
| + return TITLES[0].equals(restoredVars.awContents.getTitle()) && | 
| TITLES[0].equals(restoredVars.contentsClient.getUpdatedTitle()); | 
| } | 
| }); |