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.
6 package org.xwalk.core.xwview.test;
8 import android.test.suitebuilder.annotation.SmallTest;
10 import org.chromium.base.test.util.Feature;
12 import org.xwalk.core.XWalkNavigationItem;
15 * Test suite for GetCurrentItem().
17 public class GetCurrentItemTest extends XWalkViewTestBase {
19 public void setUp() throws Exception {
22 setXWalkClient(new XWalkViewTestBase.TestXWalkClient());
26 @Feature({"GetCurrentItem"})
27 public void testGetCurrentItem() throws Throwable {
28 final String expectedUrl = "file:///android_asset/www/index.html";
29 final String expectedTitle ="Crosswalk Sample Application";
30 loadUrlSync(expectedUrl);
31 XWalkNavigationItem navigationItem = getCurrentItemOnUiThread();
32 assertEquals(expectedUrl, navigationItem.getUrl());
33 assertEquals(expectedTitle, navigationItem.getTitle());