isSecureContext not defined by HTMLUnit

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • 2.398

      unit tests using JenkinsRule.configRoundtrip are failing in the weekly release but not in the LTS.

      the failure is due to a variable being undefined

      ======= EXCEPTION START ========
      EcmaError: lineNumber=[7] column=[0] lineSource=[          fakeInput.style.border = "none";] name=[ReferenceError] sourceName=[http://localhost:65476/jenkins/adjuncts/de00af4d/lib/layout/copyButton/copyButton.js] message=[ReferenceError: "isSecureContext" is not defined. (http://localhost:65476/jenkins/adjuncts/de00af4d/lib/layout/copyButton/copyButton.js#7)]
      com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "isSecureContext" is not defined. (http://localhost:65476/jenkins/adjuncts/de00af4d/lib/layout/copyButton/copyButton.js#7)
              at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:1001)
              at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:590)
              at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:484)
              at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:349)
              at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:928)
              at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:900)
              at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunction(HtmlPage.java:2618)
              at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunction(HtmlPage.java:2611)
              at com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeEventListeners(EventListenersContainer.java:342)
              at com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeAtTargetListeners(EventListenersContainer.java:379)
              at com.gargoylesoftware.htmlunit.javascript.host.event.EventTarget.fireEvent(EventTarget.java:173)
              at com.gargoylesoftware.htmlunit.html.DomElement.lambda$fireEvent$0(DomElement.java:1496)
              at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:590)
              at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:484)
              at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:349)
              at com.gargoylesoftware.htmlunit.html.DomElement.fireEvent(DomElement.java:1496)
              at com.gargoylesoftware.htmlunit.html.DomElement.doClickFireClickEvent(DomElement.java:1164)
              at com.gargoylesoftware.htmlunit.html.DomElement.click(DomElement.java:1095)
              at com.gargoylesoftware.htmlunit.html.DomElement.click(DomElement.java:1035)
              at com.gargoylesoftware.htmlunit.html.DomElement.click(DomElement.java:921)
              at com.gargoylesoftware.htmlunit.html.DomElement.click(DomElement.java:898)
              at com.gargoylesoftware.htmlunit.html.DomElement.click(DomElement.java:875)
              at com.gargoylesoftware.htmlunit.html.HtmlElementUtil.click(HtmlElementUtil.java:54)
              at com.gargoylesoftware.htmlunit.html.HtmlFormUtil.submit(HtmlFormUtil.java:86)
              at com.gargoylesoftware.htmlunit.html.HtmlFormUtil.submit(HtmlFormUtil.java:54)
              at org.jvnet.hudson.test.JenkinsRule.submit(JenkinsRule.java:1681)
              at org.jvnet.hudson.test.JenkinsRule.configRoundtrip(JenkinsRule.java:1349)
      

      Whilst MDN says this is required and supported across the board it does not seem to be supported by HTMLUnit. this causes tests that want to test roundtrips to fail when updating to the latest weekly release and using the most recent jenkins-test-harness

      most likely cause is https://github.com/jenkinsci/jenkins/pull/7665

            Assignee:
            Unassigned
            Reporter:
            James Nord
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: