A <pre> and new lines is not the best element for the Selenium output.
authorPlatonides <platonides@users.mediawiki.org>
Mon, 2 Aug 2010 14:33:18 +0000 (14:33 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Mon, 2 Aug 2010 14:33:18 +0000 (14:33 +0000)
But at least do not use <font>

maintenance/tests/selenium/SeleniumTestHTMLLogger.php

index fb47217..21332cf 100644 (file)
@@ -3,7 +3,7 @@
 class SeleniumTestHTMLLogger {
        public function setHeaders() {
                global $wgOut;
-               $wgOut->addHeadItem( 'selenium', '<style>
+               $wgOut->addHeadItem( 'selenium', '<style type="text/css">
                .selenium pre {
                        overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
                        white-space: pre-wrap; /* css-3 */
@@ -13,6 +13,7 @@ class SeleniumTestHTMLLogger {
                        /* width: 99%; */
                        word-wrap: break-word; /* Internet Explorer 5.5+ */
                }
+               .selenium-success { color: green }
                </style>' );
        }
 
@@ -20,11 +21,11 @@ class SeleniumTestHTMLLogger {
                global $wgOut;
                $out = '';
                if ( $mode == SeleniumTestSuite::RESULT_OK ) {
-                       $out .= '<font color="green">';
+                       $out .= '<span class="selenium-success">';
                }
                $out .= htmlspecialchars( $message );
                if ( $mode == SeleniumTestSuite::RESULT_OK ) {
-                       $out .= '</font>';
+                       $out .= '</span>';
                }
                if ( $mode != SeleniumTestSuite::CONTINUE_LINE ) {
                        $out .= '<br />';