jaroslav@623: /** jaroslav@623: * Back 2 Browser Bytecode Translator jaroslav@623: * Copyright (C) 2012 Jaroslav Tulach jaroslav@623: * jaroslav@623: * This program is free software: you can redistribute it and/or modify jaroslav@623: * it under the terms of the GNU General Public License as published by jaroslav@623: * the Free Software Foundation, version 2 of the License. jaroslav@623: * jaroslav@623: * This program is distributed in the hope that it will be useful, jaroslav@623: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@623: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@623: * GNU General Public License for more details. jaroslav@623: * jaroslav@623: * You should have received a copy of the GNU General Public License jaroslav@623: * along with this program. Look for COPYING file in the top folder. jaroslav@623: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@623: */ jaroslav@623: package org.apidesign.bck2brwsr.vmtest; jaroslav@623: jaroslav@623: import java.lang.annotation.ElementType; jaroslav@623: import java.lang.annotation.Retention; jaroslav@623: import java.lang.annotation.RetentionPolicy; jaroslav@623: import java.lang.annotation.Target; jaroslav@623: jaroslav@623: /** Exposes an HTTP page to the running {@link BrwsrTest}, so it can access jaroslav@623: * under the relative path. jaroslav@623: * jaroslav@623: * @author Jaroslav Tulach jaroslav@623: */ jaroslav@623: @Retention(RetentionPolicy.RUNTIME) jaroslav@623: @Target({ ElementType.METHOD, ElementType.TYPE}) jaroslav@623: public @interface HttpResource { jaroslav@623: /** path on the server that the test can use to access the exposed resource */ jaroslav@623: String path(); jaroslav@623: /** the content of the HttpResource */ jaroslav@623: String content(); jaroslav@626: /** resource relative to the class that should be used instead of content. jaroslav@626: * Leave content equal to empty string. jaroslav@626: */ jaroslav@626: String resource() default ""; jaroslav@623: /** mime type of the resource */ jaroslav@623: String mimeType(); jaroslav@623: }