RESOLVED FIXED 106411
IndexedDB: Update expected results for IndexedDB layout tests
https://bugs.webkit.org/show_bug.cgi?id=106411
Summary IndexedDB: Update expected results for IndexedDB layout tests
Michael Pruett
Reported 2013-01-08 20:40:57 PST
A few layout tests in storage/indexeddb have different output on JSC than on V8. The V8 versions of these tests should be moved to platform/chromium/storage/indexeddb and the JSC output should be installed in storage/indexeddb.
Attachments
Patch (21.45 KB, patch)
2013-01-08 20:46 PST, Michael Pruett
no flags
Patch (10.78 KB, patch)
2013-01-09 12:36 PST, Michael Pruett
no flags
Michael Pruett
Comment 1 2013-01-08 20:46:02 PST
Benjamin Poulain
Comment 2 2013-01-08 23:24:23 PST
It is a reasonable change but it is very unfortunate. Do you know what causes the difference between V8 and JSC? Could we update the test or the test harness to make sure the results are the same?
Michael Pruett
Comment 3 2013-01-09 09:24:30 PST
(In reply to comment #2) > It is a reasonable change but it is very unfortunate. > > Do you know what causes the difference between V8 and JSC? > Could we update the test or the test harness to make sure the results are the same? Yes the differences in the expected results in these four test cases are caused by differences in error messages between V8 and JSC. The error message regarding serializing cyclic structures in JSC is "JSON.stringify cannot serialize cyclic structures." (Source/JavaScriptCore/runtime/JSONObject.cpp line 412) while the comparable error message in V8 is "Converting circular structure to JSON" (v8/src/messages.js line 116). V8 prepends the string "Uncaught " (v8/src/messages.js line 55) to uncaught exceptions whereas JSC does not.
Joshua Bell
Comment 4 2013-01-09 09:40:56 PST
> The error message regarding serializing cyclic structures in JSC is "JSON.stringify cannot serialize cyclic structures." (Source/JavaScriptCore/runtime/JSONObject.cpp line 412) while the comparable error message in V8 is "Converting circular structure to JSON" (v8/src/messages.js line 116). We could alter these tests to catch and verify the exception name and code w/o showing the message. > V8 prepends the string "Uncaught " (v8/src/messages.js line 55) to uncaught exceptions whereas JSC does not. Unfortunately, we really need to keep these exceptions uncaught as that's what's being tested. (And for the record, catching with using window.onerror doesn't count as being "caught", but also does not prevent the message, so that's not helpful.) Other thoughts?
Michael Pruett
Comment 5 2013-01-09 10:13:31 PST
The error messages relating to serializing cyclic structures are rather incidental to the functionality being tested: shouldThrow("JSON.stringify(cyclic_array)"); These lines could be removed without affecting coverage of IndexedDB in the slightest.
Joshua Bell
Comment 6 2013-01-09 10:28:10 PST
(In reply to comment #5) > The error messages relating to serializing cyclic structures are rather incidental to the functionality being tested: > > shouldThrow("JSON.stringify(cyclic_array)"); > > These lines could be removed without affecting coverage of IndexedDB in the slightest. Agreed.
Michael Pruett
Comment 7 2013-01-09 12:36:38 PST
Created attachment 181971 [details] Patch I've removed expected results for storage/indexeddb/key-type-array.html from this change since that test has been updated in bug 106472. It's not ideal for these three IndexedDB layout tests to have slightly different results on JSC and V8, but eliminating these differences might be more trouble than it's worth.
Joshua Bell
Comment 8 2013-01-10 13:29:27 PST
(In reply to comment #7) > It's not ideal for these three IndexedDB layout tests to have slightly different results on JSC and V8, but eliminating these differences might be more trouble than it's worth. Unless anyone has any better ideas, I'm okay with this approach (i.e. different expectations files). (Apologies in advance for when us chromium-port folks commit the wrong thing if no ews bots catch it.)
Tony Chang
Comment 9 2013-01-10 15:32:26 PST
FWIW, I think there are quite a few fast/js tests that have different results for Chromium because of V8 error messages being different.
Benjamin Poulain
Comment 10 2013-01-10 15:36:11 PST
(In reply to comment #9) > FWIW, I think there are quite a few fast/js tests that have different results for Chromium because of V8 error messages being different. Yes indeed. I don't have any problem with landing this.
WebKit Review Bot
Comment 11 2013-01-10 16:03:06 PST
Comment on attachment 181971 [details] Patch Clearing flags on attachment: 181971 Committed r139384: <http://trac.webkit.org/changeset/139384>
WebKit Review Bot
Comment 12 2013-01-10 16:03:10 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.