[webkit-reviews] review granted: [Bug 28387] Regression test for RegExp bug in v8 : [Attachment 35021] Let's try that again
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 17 23:46:30 PDT 2009
Eric Seidel <eric at webkit.org> has granted Christian Plesner Hansen
<christian.plesner.hansen at gmail.com>'s request for review:
Bug 28387: Regression test for RegExp bug in v8
https://bugs.webkit.org/show_bug.cgi?id=28387
Attachment 35021: Let's try that again
https://bugs.webkit.org/attachment.cgi?id=35021&action=review
------- Additional Comments from Eric Seidel <eric at webkit.org>
So this looks fine.
It could be one step better though.
Notice how the expected results are out of order:
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS re('a') is ['a']
This is because the script in the subframe is executing after the main frame
finishes parsing. Sadly, one ilmitation of the script-test testing framework
is that we don't have a nice clean way to handle tests which need to delay
completion.
I expect you could get around this pretty easily this way:
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
iframe.document.body.innerHTML = "<script>top.doTest(/a/)</script>";
I would expect the script to execute synchronously from the innerHTML.
If not, certainly this should:
iframe.document.write("<script>top.doTest(/a/)</script>");
I'm OK committing this as-is, but I think we could improve it one step further
if you're willing. Either of the above should remove the need for a second
file altogether.
More information about the webkit-reviews
mailing list