Upstream version 8.36.169.0
[platform/framework/web/crosswalk.git] / src / xwalk / test / android / core_internal / javatests / src / org / xwalk / core / internal / xwview / test / ExtensionEchoInternalTest.java
1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.xwalk.core.internal.xwview.test;
6
7 import android.test.suitebuilder.annotation.SmallTest;
8 import org.chromium.base.test.util.Feature;
9 import org.xwalk.core.internal.xwview.test.ExtensionEchoInternal;
10
11 /**
12  * Test suite for ExtensionEchoInternal().
13  */
14 public class ExtensionEchoInternalTest extends XWalkViewInternalTestBase {
15     private final static String PASS_STRING = "Pass";
16
17     @Override
18     public void setUp() throws Exception {
19         super.setUp();
20     }
21
22     @SmallTest
23     @Feature({"ExtensionEchoInternal"})
24     public void testAsync() throws Throwable {
25         ExtensionEchoInternal echo = new ExtensionEchoInternal();
26
27         loadAssetFileAndWaitForTitle("echo.html");
28         assertEquals(PASS_STRING, getTitleOnUiThread());
29     }
30
31     @SmallTest
32     @Feature({"ExtensionEchoInternal"})
33     public void testSync() throws Throwable {
34         ExtensionEchoInternal echo = new ExtensionEchoInternal();
35
36         loadAssetFile("echoSync.html");
37         assertEquals(PASS_STRING, getTitleOnUiThread());
38     }
39
40     @SmallTest
41     @Feature({"ExtensionEchoInternal"})
42     public void testMultiFrames() throws Throwable {
43         ExtensionEchoInternal echo = new ExtensionEchoInternal();
44
45         loadAssetFileAndWaitForTitle("framesEcho.html");
46         assertEquals(PASS_STRING, getTitleOnUiThread());
47     }
48 }