import org.xwalk.core.XWalkClient;
import org.xwalk.core.XWalkNavigationHistory;
+import org.xwalk.core.XWalkNavigationItem;
import org.xwalk.core.XWalkResourceClient;
import org.xwalk.core.XWalkSettings;
import org.xwalk.core.XWalkView;
});
}
+ protected int historySizeOnUiThread() throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<Integer>() {
+ @Override
+ public Integer call() {
+ return mXWalkView.getNavigationHistory().size();
+ }
+ });
+ }
+
+ protected boolean hasItemAtOnUiThread(final int index) throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<Boolean>() {
+ @Override
+ public Boolean call() {
+ return mXWalkView.getNavigationHistory().hasItemAt(index);
+ }
+ });
+ }
+
+ protected XWalkNavigationItem getItemAtOnUiThread(final int index) throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<XWalkNavigationItem>() {
+ @Override
+ public XWalkNavigationItem call() {
+ return mXWalkView.getNavigationHistory().getItemAt(index);
+ }
+ });
+ }
+
+ protected XWalkNavigationItem getCurrentItemOnUiThread() throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<XWalkNavigationItem>() {
+ @Override
+ public XWalkNavigationItem call() {
+ return mXWalkView.getNavigationHistory().getCurrentItem();
+ }
+ });
+ }
+
protected String executeJavaScriptAndWaitForResult(final String code) throws Exception {
final TestHelperBridge.OnEvaluateJavaScriptResultHelper helper =
}
});
}
+
+ protected String getAPIVersionOnUiThread() throws Exception {
+ return runTestOnUiThreadAndGetResult(new Callable<String>() {
+ @Override
+ public String call() throws Exception {
+ return mXWalkView.getAPIVersion();
+ }
+ });
+ }
+
+ protected String getXWalkVersionOnUiThread() throws Exception {
+ return runTestOnUiThreadAndGetResult(new Callable<String>() {
+ @Override
+ public String call() throws Exception {
+ return mXWalkView.getXWalkVersion();
+ }
+ });
+ }
}