Permalink
Browse files

Merge branch 'lighthouse-1017-patch'

Conflicts:
	framework/pym/play/commands/base.py
  • Loading branch information...
2 parents 6fed60e + d3987c6 commit 6fe29a688b49092fd5f0073866adf105d40a21a4 yjaigu committed Aug 8, 2011
View
1 .gitignore
@@ -16,6 +16,7 @@ framework/src/play/version
framework/tests/test-application/db
framework/play-*.jar
framework/docs
+samples-and-tests/*/test-result/
# IDE and editors
*~
View
6 framework/pym/play/commands/base.py
@@ -232,8 +232,12 @@ def autotest(app, args):
# Run FirePhoque
print "~"
+ headless_browser = ''
+ if app.readConf('headlessBrowser'):
+ headless_browser = app.readConf('headlessBrowser')
+
cp_args = getFirephoqueClasspath(app)
- java_cmd = [app.java_path(), '-classpath', cp_args, '-Dapplication.url=%s://localhost:%s' % (protocol, http_port), 'play.modules.testrunner.FirePhoque']
+ java_cmd = [app.java_path(), '-classpath', cp_args, '-Dapplication.url=%s://localhost:%s' % (protocol, http_port), '-DheadlessBrowser=%s' % (headless_browser), 'play.modules.testrunner.FirePhoque']
try:
subprocess.call(java_cmd, env=os.environ)
except OSError:
View
4,670 modules/testrunner/public/test-runner/selenium/scripts/selenium-browserbot.js
2,335 additions, 2,335 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
17 modules/testrunner/src/play/modules/testrunner/FirePhoque.java
@@ -57,7 +57,22 @@ public static void main(String[] args) throws Exception {
public static void runTestsInHeadlessBrowser(String app, File root, String selenium, List<String> tests, boolean writeToConsole) throws MalformedURLException, InterruptedException {
// Let's tweak WebClient
- WebClient firephoque = new WebClient(BrowserVersion.INTERNET_EXPLORER_8);
+
+ String headlessBrowser = System.getProperty("headlessBrowser", "INTERNET_EXPLORER_8");
+ BrowserVersion browserVersion;
+ if ("FIREFOX_3".equals(headlessBrowser)) {
+ browserVersion = BrowserVersion.FIREFOX_3;
+ } else if ("FIREFOX_3_6".equals(headlessBrowser)) {
+ browserVersion = BrowserVersion.FIREFOX_3_6;
+ } else if ("INTERNET_EXPLORER_6".equals(headlessBrowser)) {
+ browserVersion = BrowserVersion.INTERNET_EXPLORER_6;
+ } else if ("INTERNET_EXPLORER_7".equals(headlessBrowser)) {
+ browserVersion = BrowserVersion.INTERNET_EXPLORER_7;
+ } else {
+ browserVersion = BrowserVersion.INTERNET_EXPLORER_8;
+ }
+
+ WebClient firephoque = new WebClient(browserVersion);
firephoque.setPageCreator(new DefaultPageCreator() {
@Override

0 comments on commit 6fe29a6

Please sign in to comment.