• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      war/src/main/webapp/css/style.css has various CSS errors as reported by HtmlUnit, such as

      filter: alpha(opacity=40); /* msie */
      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
      

      These clutter log output when running HudsonTestCase/JenkinsRule tests, and might confuse standards-compliant browsers. Perhaps better to split browser-specific hacks into separate CSS files inserted only when the client identifies itself as that browser.

          [JENKINS-14749] Errors in styles.css

          evernat added a comment -

          Forcing usage of a dinosaur like IE8, would need apologies indeed, even on the now officially dead Windows XP.

          evernat added a comment - Forcing usage of a dinosaur like IE8, would need apologies indeed, even on the now officially dead Windows XP.

          Jesse Glick added a comment -

          I think Tom is best placed to work on this at the moment.

          Jesse Glick added a comment - I think Tom is best placed to work on this at the moment.

          Jesse Glick added a comment -

          By the way we are running a very old version of HtmlUnit: 2.6 (2009), patched for Jenkins for reasons I do not know. The current version is 2.14.

          Jesse Glick added a comment - By the way we are running a very old version of HtmlUnit: 2.6 (2009), patched for Jenkins for reasons I do not know. The current version is 2.14.

          Jesse Glick added a comment -

          Also we see this annoying warning for every page load:

          … com.gargoylesoftware.htmlunit.javascript.host.Document jsxFunction_createElement
          SEVERE: Unexpected exception occurred while parsing HTML snippet
          … com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
          SEVERE: runtimeError: message=[Unexpected exception occurred while parsing HTML snippet: input name="x"] sourceName=[http://localhost:…/jenkins/static/…/scripts/prototype.js] line=[1927] lineSource=[null] lineOffset=[0]
          

          caused by:

            var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){
              try {
                var el = document.createElement('<input name="x">');
                return el.tagName.toLowerCase() === 'input' && el.name === 'x';
              }
              catch(err) {
                return false;
              }
            })();
          

          I think http://sourceforge.net/p/htmlunit/bugs/1338/ is discussing this, though I cannot find any BrowserVersionFeatures.GENERATED_153 either in the version of HtmlUnit we run or in the current version; the current code treats this construction as an error if HtmlUnit is simulating Firefox, which we are (see JenkinsRule.WebClient.<init>). http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.html#JS_DOCUMENT_CREATE_ELEMENT_EXTENDED_SYNTAX looks like the current replacement, but from http://sourceforge.net/p/htmlunit/code/HEAD/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java it seems that when using newer versions and simulating FF we would get the same error.

          The real issue is that even though Prototype catches and ignores the error, HtmlUnit logs it as a warning. I will see if I can just suppress this.

          Jesse Glick added a comment - Also we see this annoying warning for every page load: … com.gargoylesoftware.htmlunit.javascript.host.Document jsxFunction_createElement SEVERE: Unexpected exception occurred while parsing HTML snippet … com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError SEVERE: runtimeError: message=[Unexpected exception occurred while parsing HTML snippet: input name="x"] sourceName=[http://localhost:…/jenkins/static/…/scripts/prototype.js] line=[1927] lineSource=[null] lineOffset=[0] caused by: var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){ try { var el = document.createElement( '<input name= "x" >' ); return el.tagName.toLowerCase() === 'input' && el.name === 'x' ; } catch (err) { return false ; } })(); I think http://sourceforge.net/p/htmlunit/bugs/1338/ is discussing this, though I cannot find any BrowserVersionFeatures.GENERATED_153 either in the version of HtmlUnit we run or in the current version; the current code treats this construction as an error if HtmlUnit is simulating Firefox, which we are (see JenkinsRule.WebClient.<init> ). http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.html#JS_DOCUMENT_CREATE_ELEMENT_EXTENDED_SYNTAX looks like the current replacement, but from http://sourceforge.net/p/htmlunit/code/HEAD/tree/trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Document.java it seems that when using newer versions and simulating FF we would get the same error. The real issue is that even though Prototype catches and ignores the error, HtmlUnit logs it as a warning. I will see if I can just suppress this.

          Jesse Glick added a comment -

          I have added a temporary workaround to just suppress the CSS warnings until they can be fixed, so that people running tests will not be confused by them (as has happened recently).

          Jesse Glick added a comment - I have added a temporary workaround to just suppress the CSS warnings until they can be fixed, so that people running tests will not be confused by them (as has happened recently).

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins/759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2
          Log:
          JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins/759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2 Log: JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins/84d49ceef2d68eebc9854800693d385c104752ba
          Log:
          JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins/84d49ceef2d68eebc9854800693d385c104752ba Log: JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3524
          JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed. (Revision 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2)
          JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX. (Revision 84d49ceef2d68eebc9854800693d385c104752ba)

          Result = SUCCESS
          Jesse Glick : 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2
          Files :

          • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java

          Jesse Glick : 84d49ceef2d68eebc9854800693d385c104752ba
          Files :

          • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3524 JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed. (Revision 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2) JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX. (Revision 84d49ceef2d68eebc9854800693d385c104752ba) Result = SUCCESS Jesse Glick : 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2 Files : test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java Jesse Glick : 84d49ceef2d68eebc9854800693d385c104752ba Files : test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins-test-harness/5579220ac86c41a8851ebf7215a9fa629785a56f
          Log:
          JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed.
          Originally-Committed-As: 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/5579220ac86c41a8851ebf7215a9fa629785a56f Log: JENKINS-14749 Temporarily work around CSS errors by just suppressing the warnings until they can be fixed. Originally-Committed-As: 759c8a52ce4dfb40c8834e3ccab27940eb0b5ed2

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins-test-harness/f99c9c00543dacd23b681f311654c442ac6de2bd
          Log:
          JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX.
          Originally-Committed-As: 84d49ceef2d68eebc9854800693d385c104752ba

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/f99c9c00543dacd23b681f311654c442ac6de2bd Log: JENKINS-14749 Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX. Originally-Committed-As: 84d49ceef2d68eebc9854800693d385c104752ba

            basil Basil Crow
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: