vmtest/src/test/java/org/apidesign/bck2brwsr/tck/BrwsrCheckTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 22 Jan 2013 11:59:25 +0100
changeset 518 5df0a239ebeb
child 526 a0d8b5ab79a2
permissions -rw-r--r--
@BrwsrTest to execute tests directly in browser
jaroslav@518
     1
/**
jaroslav@518
     2
 * Back 2 Browser Bytecode Translator
jaroslav@518
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@518
     4
 *
jaroslav@518
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@518
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@518
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@518
     8
 *
jaroslav@518
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@518
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@518
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@518
    12
 * GNU General Public License for more details.
jaroslav@518
    13
 *
jaroslav@518
    14
 * You should have received a copy of the GNU General Public License
jaroslav@518
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@518
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@518
    17
 */
jaroslav@518
    18
package org.apidesign.bck2brwsr.tck;
jaroslav@518
    19
jaroslav@518
    20
import org.apidesign.bck2brwsr.core.JavaScriptBody;
jaroslav@518
    21
import org.apidesign.bck2brwsr.vmtest.BrwsrTest;
jaroslav@518
    22
import org.apidesign.bck2brwsr.vmtest.VMTest;
jaroslav@518
    23
import org.testng.annotations.Factory;
jaroslav@518
    24
jaroslav@518
    25
/**
jaroslav@518
    26
 *
jaroslav@518
    27
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@518
    28
 */
jaroslav@518
    29
public class BrwsrCheckTest {
jaroslav@518
    30
    
jaroslav@518
    31
    @BrwsrTest public void assertWindowObjectIsDefined() {
jaroslav@518
    32
        assert window() != null : "No window object found!";
jaroslav@518
    33
    }
jaroslav@518
    34
    
jaroslav@518
    35
    @Factory
jaroslav@518
    36
    public static Object[] create() {
jaroslav@518
    37
        return VMTest.create(BrwsrCheckTest.class);
jaroslav@518
    38
    }
jaroslav@518
    39
jaroslav@518
    40
    @JavaScriptBody(args = {}, body = "return window;")
jaroslav@518
    41
    private static native Object window();
jaroslav@518
    42
    
jaroslav@518
    43
}