Title: [104191] trunk/Tools
- Revision
- 104191
- Author
- [email protected]
- Date
- 2012-01-05 11:55:40 -0800 (Thu, 05 Jan 2012)
Log Message
Teach NRWT to use run-safari to open results.html on Apple's Windows port
NRWT was trying to use User.open_url, which doesn't work on Cygwin. But run-safari is
better, since we always want to open results.html using the user's build of WebKit, not
whatever their default browser is.
Fixes <http://webkit.org/b/75629> <rdar://problem/10648621> NRWT fails to open results.html
for Apple's Windows port
Reviewed by Eric Seidel.
* Scripts/webkitpy/layout_tests/port/win.py:
(WinPort.show_results_html_file): Changed to use run_safari, like MacPort does. Also removed
an obsolete comment.
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
(WinPortTest.test_show_results_html_file): Updated expected results.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (104190 => 104191)
--- trunk/Tools/ChangeLog 2012-01-05 19:55:31 UTC (rev 104190)
+++ trunk/Tools/ChangeLog 2012-01-05 19:55:40 UTC (rev 104191)
@@ -1,5 +1,25 @@
2012-01-05 Adam Roben <[email protected]>
+ Teach NRWT to use run-safari to open results.html on Apple's Windows port
+
+ NRWT was trying to use User.open_url, which doesn't work on Cygwin. But run-safari is
+ better, since we always want to open results.html using the user's build of WebKit, not
+ whatever their default browser is.
+
+ Fixes <http://webkit.org/b/75629> <rdar://problem/10648621> NRWT fails to open results.html
+ for Apple's Windows port
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort.show_results_html_file): Changed to use run_safari, like MacPort does. Also removed
+ an obsolete comment.
+
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_show_results_html_file): Updated expected results.
+
+2012-01-05 Adam Roben <[email protected]>
+
Prepend Safari.exe's path to the command-line passed to CreateProcess
Safari expects the first argument in the command-line to be the path to Safari.exe itself.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py (104190 => 104191)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-01-05 19:55:31 UTC (rev 104190)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win.py 2012-01-05 19:55:40 UTC (rev 104191)
@@ -31,6 +31,7 @@
import sys
from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.system.path import cygpath
from webkitpy.layout_tests.port.apple import ApplePort
@@ -107,9 +108,8 @@
def operating_system(self):
return 'win'
- # This port may need to override setup_environ_for_server
- # to match behavior of setPathForRunningWebKitApp from ORWT.
- # $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
+ def show_results_html_file(self, results_filename):
+ self._run_script('run-safari', [cygpath(results_filename)])
# FIXME: webkitperl/httpd.pm installs /usr/lib/apache/libphp4.dll on cycwin automatically
# as part of running old-run-webkit-tests. That's bad design, but we may need some similar hack.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py (104190 => 104191)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2012-01-05 19:55:31 UTC (rev 104190)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py 2012-01-05 19:55:40 UTC (rev 104191)
@@ -46,8 +46,14 @@
def test_show_results_html_file(self):
port = self.make_port()
port._executive = MockExecutive(should_log=True)
- expected_stderr = "MOCK: user.open_url: file://...\n"
- OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
+ capture = OutputCapture()
+ capture.capture_output()
+ port.show_results_html_file('test.html')
+ _, stderr, _ = capture.restore_output()
+ # We can't know for sure what path will be produced by cygpath, but we can assert about
+ # everything else.
+ self.assertTrue(stderr.startswith("MOCK run_command: ['Tools/Scripts/run-safari', '--release', '"))
+ self.assertTrue(stderr.endswith("test.html'], cwd=/mock-checkout\n"))
def test_detect_version(self):
port = self.make_port()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes