Bug 11106

Summary: Some XMLHttpRequest URI resolving tests fail
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: annevk, emacemac7, jchaffraix
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://tc.labs.opera.com/apis/XMLHttpRequest/open/
Attachments:
Description Flags
Change URI resolution to use the ScriptExecutionContext instead of the DOMWindow
none
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper none

Description Alexey Proskuryakov 2006-10-01 03:33:49 PDT
The bug URL points to URI resolving tests written for the XHR spec; WebKit fails some of them.
Comment 1 Julien Chaffraix 2008-12-22 11:04:57 PST
Created attachment 26207 [details]
Change URI resolution to use the ScriptExecutionContext instead of the DOMWindow
Comment 2 Darin Adler 2008-12-22 12:42:44 PST
Comment on attachment 26207 [details]
Change URI resolution to use the ScriptExecutionContext instead of the DOMWindow

> +        // The Document can use its encoding to resolve the URI so use its specialized method.
> +        // FIXME: Once the encoding information have been moved to ScriptExecutionContext,
> +        // this code should be simplified.

Why not put a virtual completeURL function into ScriptExecutionContext now, even if it doesn't handle encoding correctly yet? I don't see the point in adding this if statement.
Comment 3 Julien Chaffraix 2008-12-22 14:40:24 PST
Created attachment 26213 [details]
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper

After some discussion with Alexey, the layout test wrapper is not necessary and was removed.

To address Darin's comment, I have added a non-virtual completeURL method to ScriptExecutionContext that wraps the call virtualCompleteURL (in the same way it was done for ScriptExecutionContext::url()).
Comment 4 Darin Adler 2008-12-22 15:26:05 PST
Comment on attachment 26213 [details]
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper

r=me
Comment 5 Alexey Proskuryakov 2008-12-23 00:43:04 PST
As promised on IRC, I verified that IE7 passes these tests (and Julien tested with Firefox). Of the subsequent tests that are not included in this patch, IE7 fails 016, 024, 030 and 033.
Comment 6 Julien Chaffraix 2008-12-23 11:04:39 PST
Comment on attachment 26213 [details]
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper

Landed patch in r39453.
Comment 7 Julien Chaffraix 2008-12-23 11:38:51 PST
Comment on attachment 26213 [details]
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper

Clearing review flag per Alexey request.
Comment 8 Julien Chaffraix 2008-12-23 15:20:48 PST
Here are the results of the remaining tests:

Tests that we fail:

- 015
- 016
- 024
- 030 (throw NETWORK_ERR)
- 031
- 033

Test that Firefox fails:
- 015
- 016 (throw NS_ERROR_FAILURE)
- 019
- 020
- 022
- 024
- 030 (throw NS_ERROR_FAILURE)
- 031
- 033 (throw NS_ERROR_FAILURE in the iframe)

Opera:
- 015
- 016 (throw INVALID_STATE_ERR)
- 021
- 023
- 024
- 025
- 030 (throw security violation)
- 031
- 032
- 033
Comment 9 Julien Chaffraix 2008-12-23 15:31:45 PST
To follow the standard and match IE, we thus have to fix 015 and 031.
Comment 10 Anne van Kesteren 2023-05-12 22:56:42 PDT
These tests have been obsoleted by WPT.