import org.chromium.android_webview.test.util.CommonResources;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.DisabledTest;
-import org.chromium.content.browser.NavigationEntry;
-import org.chromium.content.browser.NavigationHistory;
import org.chromium.content.browser.test.util.HistoryUtils;
import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
+import org.chromium.content_public.browser.NavigationEntry;
+import org.chromium.content_public.browser.NavigationHistory;
import org.chromium.net.test.util.TestWebServer;
import java.util.concurrent.Callable;
@Override
public void setUp() throws Exception {
super.setUp();
+ AwContents.setShouldDownloadFavicons();
mContentsClient = new TestAwContentsClient();
final AwTestContainerView testContainerView =
createAwTestContainerViewOnMainSync(mContentsClient);
mAwContents = testContainerView.getAwContents();
- mWebServer = new TestWebServer(false);
+ mWebServer = TestWebServer.start();
}
@Override
return ThreadUtils.runOnUiThreadBlocking(new Callable<NavigationHistory>() {
@Override
public NavigationHistory call() {
- return awContents.getContentViewCore().getNavigationHistory();
+ return awContents.getNavigationController().getNavigationHistory();
}
});
}
loadUrlSync(mAwContents, onPageFinishedHelper, page1Url);
loadUrlSync(mAwContents, onPageFinishedHelper, page2Url);
- HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getContentViewCore(),
+ HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getWebContents(),
onPageFinishedHelper);
list = getNavigationHistory(mAwContents);
pollOnUiThread(new Callable<Boolean>() {
@Override
public Boolean call() {
- String title = mAwContents.getContentViewCore().getTitle();
+ String title = mAwContents.getTitle();
return LOGIN_RESPONSE_PAGE_TITLE.equals(title);
}
});
pollOnUiThread(new Callable<Boolean>() {
@Override
public Boolean call() {
- String title = mAwContents.getContentViewCore().getTitle();
+ String title = mAwContents.getTitle();
return PAGE_1_TITLE.equals(title);
}
});
// Verify that we can still go back to the login response page despite that
// it is non-cacheable.
- HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getContentViewCore(),
+ HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getWebContents(),
onPageFinishedHelper);
pollOnUiThread(new Callable<Boolean>() {
@Override
public Boolean call() {
- String title = mAwContents.getContentViewCore().getTitle();
+ String title = mAwContents.getTitle();
return LOGIN_RESPONSE_PAGE_TITLE.equals(title);
}
});