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 java.util.regex.Matcher;
13 import java.util.regex.Pattern;
16 * Test suite for getAPIVersion().
18 public class GetAPIVersionTest extends XWalkViewTestBase {
21 public void setUp() throws Exception {
26 @Feature({"GetAPIVersion"})
27 public void testGetAPIVersion() throws Throwable {
28 String version = getAPIVersionOnUiThread();
29 Pattern pattern = Pattern.compile("^[0-9]+(.[0-9]+)$");
30 Matcher matcher = pattern.matcher(version);
31 assertTrue("The API version is invalid.", matcher.find());