1 16 package com.google.gwt.junit; 17 18 import com.google.gwt.core.ext.UnableToCompleteException; 19 import com.google.gwt.dev.shell.BrowserWidget; 20 21 24 class RunStyleLocalHosted extends RunStyle { 25 26 29 protected final JUnitShell shell; 30 31 34 private BrowserWidget browserWindow; 35 36 39 RunStyleLocalHosted(JUnitShell shell) { 40 this.shell = shell; 41 } 42 43 public void maybeLaunchModule(String moduleName, boolean forceLaunch) 44 throws UnableToCompleteException { 45 if (forceLaunch) { 46 launchUrl(moduleName + "/"); 47 } 48 } 49 50 56 protected void launchUrl(String url) throws UnableToCompleteException { 57 if (browserWindow == null) { 58 browserWindow = shell.openNewBrowserWindow(); 59 } 60 browserWindow.go(url); 61 } 62 } 63 | Popular Tags |