[Webkit-unassigned] [Bug 131704] Simple ES6 feature:String prototype additions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 11 08:34:04 PDT 2014


--- Comment #35 from Diego Pino <dpino at igalia.com>  2014-09-11 08:34:06 PST ---
I fixed the issues from the last patch. The most important changes are:

* More tests added. Test 'undefined', 'null', 'true', 'false' values, numbers too.
* Improved the tests of side effect as suggested by Darin. For the string parameters, it seems valueOf() is not being called, but toString() instead, so I overloaded that method.
* I added a new implementation of equalInner that receives a StringImpl& matchString and casts the parameter to 8bit() or 16bit() accordingly. I added a test case with non-ascii strings (Japanese characters). The test run fine with:

$ bin/jsc standalone-pre.js string-contains.js standalone-post.js

but if I run it as a Layout test:

$ Tools/Scripts/run-webkit-tests --gtk -2 LayoutTests/js/string-contains.html

it messed up the encoding and I got this:

-PASS 'フーバー'.contains('ーバ') is true
-PASS 'フーバー'.contains('クー') is false
+PASS 'フーãƒ<90>ー'.contains('ーãƒ<90>') is true
+PASS 'フーãƒ<90>ー'.contains('クー') is false

So, how should I test non-ascii strings?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list