parseFloat("40em") returns 40 in FF35 but returns NaN with HtmlUnit.
The patch test file as a git patch (including inline):
--- a/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/GlobalFunctionsTest.java +++ b/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/GlobalFunctionsTest.java @@ -48,6 +48,23 @@ public class GlobalFunctionsTest extends WebDriverTestCase {
loadPageWithAlerts(html); }
}
/** * Test for the methods with the same expectations for all browsers.
The patch file for the tests
Attached the patch file for the tests and removing the SetWidth.zip file.
Clearly a Rhino bug. I've submitted a patch for it: https://bugzilla.mozilla.org/show_bug.cgi?id=531436 It should be quickly applied by Rhino folks as it is obvious, then I'll update our Rhino fork.
Now fixed in SVN. Thanks for the tiny example.
Log in to post a comment.
The patch test file as a git patch (including inline):
--- a/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/GlobalFunctionsTest.java
+++ b/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/GlobalFunctionsTest.java
@@ -48,6 +48,23 @@ public class GlobalFunctionsTest extends WebDriverTestCase {
+
}
/**
* Test for the methods with the same expectations for all browsers.
The patch file for the tests
Attached the patch file for the tests and removing the SetWidth.zip file.
Clearly a Rhino bug. I've submitted a patch for it:
https://bugzilla.mozilla.org/show_bug.cgi?id=531436
It should be quickly applied by Rhino folks as it is obvious, then I'll update our Rhino fork.
Now fixed in SVN. Thanks for the tiny example.