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;
13 * Test suite for onJavascriptCloseWindow().
15 public class OnJavascriptCloseWindowTest extends XWalkViewTestBase {
16 TestHelperBridge.OnJavascriptCloseWindowHelper mCloseWindowHelper;
19 public void setUp() throws Exception {
22 mCloseWindowHelper = mTestHelperBridge.getOnJavascriptCloseWindowHelper();
26 @Feature({"OnJavascriptCloseWindow"})
27 public void testOnJavascriptCloseWindow() throws Throwable {
28 final String url = "window.close.html";
29 int count = mCloseWindowHelper.getCallCount();
32 mCloseWindowHelper.waitForCallback(count);
33 assertTrue(mCloseWindowHelper.getCalled());