bd00acc9f401f53989ef25945fc69b5656f66e2f
[platform/framework/web/crosswalk.git] / src / xwalk / test / android / core / javatests / src / org / xwalk / core / xwview / test / OnUpdateTitleTest.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 import android.util.Log;
11 import org.chromium.base.test.util.Feature;
12 import org.xwalk.core.XWalkView;
13 import org.xwalk.core.internal.XWalkClient;
14 import org.xwalk.core.internal.XWalkWebChromeClient;
15
16 /**
17  * Test suite for onUpdateTitle().
18  */
19 public class OnUpdateTitleTest extends XWalkViewTestBase {
20     @Override
21     public void setUp() throws Exception {
22         super.setUp();
23
24         setXWalkClient(new XWalkViewTestBase.TestXWalkClient());
25         setXWalkWebChromeClient(new XWalkViewTestBase.TestXWalkWebChromeClient());
26     }
27
28     @SmallTest
29     @Feature({"OnUpdateTitle"})
30     public void testOnUpdateTitle() throws Throwable {
31         final String name = "index.html";
32         final String expected_title = "Crosswalk Sample Application";
33
34         loadAssetFile(name);
35         assertEquals(expected_title, getTitleOnUiThread());
36     }
37 }