RESOLVED FIXED 52763
generated unexpected_results.html from unexpected_results.json
https://bugs.webkit.org/show_bug.cgi?id=52763
Summary generated unexpected_results.html from unexpected_results.json
Ojan Vafai
Reported 2011-01-19 16:14:09 PST
generated unexpected_results.html from unexpected_results.json
Attachments
Patch (6.63 KB, patch)
2011-01-19 16:17 PST, Ojan Vafai
no flags
screenshot (42.45 KB, image/png)
2011-01-19 16:18 PST, Ojan Vafai
no flags
Patch (5.86 KB, patch)
2011-04-13 16:42 PDT, Ojan Vafai
eric: review+
Ojan Vafai
Comment 1 2011-01-19 16:17:29 PST
Ojan Vafai
Comment 2 2011-01-19 16:18:31 PST
Created attachment 79514 [details] screenshot
Eric Seidel (no email)
Comment 3 2011-01-20 03:07:19 PST
Comment on attachment 79513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79513&action=review > Tools/ChangeLog:15 > + Unfortunately, we can't just have unexpected_results.html use unexpected_results.json > + because Chrome doesn't allow XHR to local files. This seems lame.
Ojan Vafai
Comment 4 2011-01-20 09:56:33 PST
(In reply to comment #3) > (From update of attachment 79513 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79513&action=review > > > Tools/ChangeLog:15 > > + Unfortunately, we can't just have unexpected_results.html use unexpected_results.json > > + because Chrome doesn't allow XHR to local files. > > This seems lame. I agree. Blame abarth. He seems to think security is important or something like that. :)
Mihai Parparita
Comment 5 2011-01-20 19:03:56 PST
(In reply to comment #3) > Tools/ChangeLog:15 > + Unfortunately, we can't just have unexpected_results.html use unexpected_results.json > + because Chrome doesn't allow XHR to local files. One way around this is to use a local HTTP server, the way the rebaseline server does. In fact, is there a reason why we wouldn't want to share the UI code between that and the (unexpected_)results.html display? Should NRWT just launch the server on failures?
Eric Seidel (no email)
Comment 6 2011-01-21 02:56:16 PST
Entertainingly enough, KSVG/KDOM used a server for displaying the results.html, so that they could have effectively "rebasline" links which would set the new resutlts as the expected results. :)
Ojan Vafai
Comment 7 2011-01-25 17:31:19 PST
(In reply to comment #5) > (In reply to comment #3) > > Tools/ChangeLog:15 > > + Unfortunately, we can't just have unexpected_results.html use unexpected_results.json > > + because Chrome doesn't allow XHR to local files. > > One way around this is to use a local HTTP server, the way the rebaseline server does. > > In fact, is there a reason why we wouldn't want to share the UI code between that and the (unexpected_)results.html display? Should NRWT just launch the server on failures? It probably makes sense for them to share UI code. I don't like needing to run a local http server though. For one thing, it's just more complicated than is worthwhile for what this is. Inlining doesn't seem like that big of a deal to me. The other, more important thing, is that this page should work on the bots. I guess we could make that work. If you're loading it from a file URL we do something different than an http URL? In either case, I'll remove the review flag for now. I don't have time to finish this in the next week or two. So feel free to take this over if you feel motivated.
Ojan Vafai
Comment 8 2011-04-13 14:40:55 PDT
Comment on attachment 79513 [details] Patch remarking for review as per discussion on #webkit
Eric Seidel (no email)
Comment 9 2011-04-13 14:44:56 PDT
Comment on attachment 79513 [details] Patch abarth points out that our *.json files are JSONP files. We don't need to XHR Them. WE just include them via a script tag afte defining an ADD_RESULTS function: http://en.wikipedia.org/wiki/JSONP The python code here isn't needed.
Ojan Vafai
Comment 10 2011-04-13 16:42:28 PDT
Mihai Parparita
Comment 11 2011-04-13 16:59:36 PDT
Comment on attachment 89492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89492&action=review > Tools/Scripts/webkitpy/layout_tests/layout_package/json_results.html:53 > +var test_base_path = 'http://trac.webkit.org/export/76053/trunk/LayoutTests/'; Pretty sure you don't want to pin this at r76053.
Eric Seidel (no email)
Comment 12 2011-04-13 17:00:22 PDT
Comment on attachment 89492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89492&action=review I think this is a great first step. I look forward to further iteration. I think you should fix the hard-coded layout test results path though. :) > Tools/Scripts/webkitpy/layout_tests/layout_package/json_results.html:53 > +var test_base_path = 'http://trac.webkit.org/export/76053/trunk/LayoutTests/'; There is a symlink for you in the results directory iirc. There is an option in old-run-webkit-tests to generate a results.html with remote links.
Ojan Vafai
Comment 13 2011-04-13 18:13:50 PDT
Dirk Pranke
Comment 14 2011-04-13 19:14:20 PDT
Dirk Pranke
Comment 15 2011-04-13 19:24:29 PDT
FYI ... this patch broke the python unit tests (test-webkitpy). The results.html file doesn't exist if the filesystem object you're using is a mock filesystem. I added a check for existence, but it's unclear what the right thing to do is if the file doesn't exist. Fortunately, this shouldn't happen in practice.
Note You need to log in before you can comment on or make changes to this bug.