Upstream version 8.36.169.0
[platform/framework/web/crosswalk.git] / src / xwalk / test / android / core / javatests / src / org / xwalk / core / xwview / test / NavigateTest.java
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Copyright (c) 2014 Intel Corporation. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 package org.xwalk.core.xwview.test;
7
8 import android.test.suitebuilder.annotation.SmallTest;
9
10 import org.chromium.base.test.util.Feature;
11
12 /**
13  * Test suite for Navigate().
14  */
15 public class NavigateTest extends XWalkViewTestBase {
16     @Override
17     public void setUp() throws Exception {
18         super.setUp();
19     }
20
21     @SmallTest
22     @Feature({"Navigate"})
23     public void testNavigate() throws Throwable {
24         final String url1 = "about:blank";
25         final String url2 = "file:///android_asset/www/index.html";
26         final String title ="Crosswalk Sample Application";
27         loadUrlSync(url1);
28         loadUrlSync(url2);
29         assertEquals(title, getTitleOnUiThread());
30         goBackSync();
31         assertEquals(url1, getUrlOnUiThread());
32         goForwardSync();
33         assertEquals(url2, getUrlOnUiThread());
34     }
35 }