- add third_party src.
[platform/framework/web/crosswalk.git] / src / xwalk / test / android / core / javatests / src / org / xwalk / core / xwview / test / ClearHistoryTest.java
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Copyright (c) 2013 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.graphics.Bitmap;
9 import android.test.suitebuilder.annotation.SmallTest;
10
11 import org.chromium.base.test.util.DisabledTest;
12 import org.chromium.base.test.util.Feature;
13 import org.xwalk.core.XWalkClient;
14 import org.xwalk.core.XWalkView;
15
16 /**
17  * Test suite for clearHistory().
18  */
19 public class ClearHistoryTest extends XWalkViewTestBase {
20     @Override
21     public void setUp() throws Exception {
22         super.setUp();
23
24         class TestXWalkClient extends XWalkClient {
25             @Override
26             public void onPageStarted(XWalkView view, String url, Bitmap favicon) {
27                 mTestContentsClient.onPageStarted(url);
28             }
29
30             @Override
31             public void onPageFinished(XWalkView view, String url) {
32                 mTestContentsClient.didFinishLoad(url);
33             }
34         }
35         getXWalkView().setXWalkClient(new TestXWalkClient());
36     }
37
38     // TODO(guangzhen): Since the device issue, it can not access the network,
39     // so disabled this test temporarily. It will be enabled later.
40     // @SmallTest
41     // @Feature({"ClearHistory"})
42     @DisabledTest
43     public void testClearHistory() throws Throwable {
44         /*
45         final String url1 = "http://www.webkit.org/";
46         final String url2 = "http://www.baidu.com/";
47         loadUrlSync(url1);
48         loadUrlSync(url2);
49         clearHistoryOnUiThread();
50         assertFalse(canGoBackOnUiThread());
51         */
52     }
53 }