RESOLVED FIXED 21948
Change two layout tests to work with Chrome's 'file' url policy.
https://bugs.webkit.org/show_bug.cgi?id=21948
Summary Change two layout tests to work with Chrome's 'file' url policy.
Feng Qian
Reported 2008-10-29 11:10:09 PDT
The test relies on the fact that file URL scan send XHR requests to any URL. Chrome is going to have a tighter policy that file url can only send XHR requests to file URLs. The test needs some changes to accommodate both Safari and Chrome's policies. Instead of sending an XHR request to http://localhost (which is not existing), the test can send an XHR to the URL itself.
Attachments
changes in the test (1.05 KB, patch)
2008-10-29 11:11 PDT, Feng Qian
ap: review+
patch for another test (517 bytes, patch)
2008-10-29 14:39 PDT, Feng Qian
ap: review+
a merge patch with changelog (2.48 KB, patch)
2008-10-29 17:10 PDT, Feng Qian
ap: review+
Feng Qian
Comment 1 2008-10-29 11:11:16 PDT
Created attachment 24749 [details] changes in the test
Alexey Proskuryakov
Comment 2 2008-10-29 12:00:48 PDT
Comment on attachment 24749 [details] changes in the test r=me I presume the test now works in Firefox, too?
Feng Qian
Comment 3 2008-10-29 13:15:43 PDT
The test is failing in FF for different reasons. Before the change, the test failed because it throws an exception: NS_ERROR_ILLEGAL_VALUE, ex.code is undefined. After the change, the test failed because no exception is thrown. (In reply to comment #2) > (From update of attachment 24749 [details] [edit]) > r=me > > I presume the test now works in Firefox, too? >
Feng Qian
Comment 4 2008-10-29 14:39:39 PDT
Created attachment 24755 [details] patch for another test Another test has a similar issue. It sends XHR request to 'about:blank'. It is allowed in Safari if the source URL is a file URL. Chrome does not allow it. The test is testing something else, so make it send URL to itself.
Alexey Proskuryakov
Comment 5 2008-10-29 14:48:12 PDT
Comment on attachment 24755 [details] patch for another test r=me You may need to make these patches easier to land (correct bug title, add ChangeLogs, possibly merge patches into one) - or to find a committer who is willing to do this for you.
Feng Qian
Comment 6 2008-10-29 17:10:35 PDT
Created attachment 24762 [details] a merge patch with changelog This is a merged patch with changelog, it is easier for commit.
Alexey Proskuryakov
Comment 7 2008-10-29 23:04:08 PDT
Comment on attachment 24762 [details] a merge patch with changelog r=me
Adam Barth
Comment 8 2008-12-17 11:24:43 PST
Will land.
Adam Barth
Comment 9 2008-12-17 13:42:01 PST
LayoutTests/ChangeLog: locally modified LayoutTests/fast/dom/null-document-xmlhttprequest-open.html: locally modified LayoutTests/fast/dom/xmlhttprequest-invalid-values.html: locally modified M LayoutTests/ChangeLog M LayoutTests/fast/dom/null-document-xmlhttprequest-open.html M LayoutTests/fast/dom/xmlhttprequest-invalid-values.html Committed r39365 M LayoutTests/ChangeLog M LayoutTests/fast/dom/xmlhttprequest-invalid-values.html M LayoutTests/fast/dom/null-document-xmlhttprequest-open.html r39365 = d0786620de79c0565e62411bd46561ebdb5df15a (trunk)
Note You need to log in before you can comment on or make changes to this bug.