Bug 11106 - Some XMLHttpRequest URI resolving tests fail
Summary: Some XMLHttpRequest URI resolving tests fail
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://tc.labs.opera.com/apis/XMLHttp...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-01 03:33 PDT by Alexey Proskuryakov
Modified: 2010-06-10 16:50 PDT (History)
2 users (show)

See Also:


Attachments
Change URI resolution to use the ScriptExecutionContext instead of the DOMWindow (22.07 KB, patch)
2008-12-22 11:04 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Updated with Darin & Alexey's comment - Removed FIXME + removed layout test wrapper (29.10 KB, patch)
2008-12-22 14:40 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.