Bug 136699 - The overrideMimeType in XMLHttpRequest should throw the exception.
Summary: The overrideMimeType in XMLHttpRequest should throw the exception.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 02:39 PDT by Shivakumar J M
Modified: 2014-09-11 19:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.97 KB, patch)
2014-09-11 00:04 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff
Patch-Updated (4.85 KB, patch)
2014-09-11 02:55 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shivakumar J M 2014-09-10 02:39:45 PDT
XMLHttpRequest::overrideMimeType should throw an "InvalidStateError" exception, if the state is LOADING or DONE. This is as per latest spec: https://dvcs.w3.org/hg/xhr/raw-file/default/xhr-1/Overview.html#the-overridemimetype%28%29-method.
Comment 1 Shivakumar J M 2014-09-10 20:54:39 PDT
Working on Patch and Test case, will submit patch soon.
Comment 2 Shivakumar J M 2014-09-11 00:04:08 PDT
Created attachment 237939 [details]
Patch

Set XMLHttpRequest::overrideMimeType to throw an "InvalidStateError" exception, if the state is LOADING or DONE.
Comment 3 Shivakumar J M 2014-09-11 02:55:24 PDT
Created attachment 237948 [details]
Patch-Updated

Re-based the Patch with minor change to prior patch.
Comment 4 Darin Adler 2014-09-11 18:50:41 PDT
Comment on attachment 237948 [details]
Patch-Updated

View in context: https://bugs.webkit.org/attachment.cgi?id=237948&action=review

> LayoutTests/http/tests/xmlhttprequest/exceptions.html:72
> +    shouldThrow('req.overrideMimeType("text/plain")');

Clearly this tests only DONE, not LOADING. How can we test both?
Comment 5 WebKit Commit Bot 2014-09-11 19:27:16 PDT
Comment on attachment 237948 [details]
Patch-Updated

Clearing flags on attachment: 237948

Committed r173552: <http://trac.webkit.org/changeset/173552>
Comment 6 WebKit Commit Bot 2014-09-11 19:27:22 PDT
All reviewed patches have been landed.  Closing bug.