Changeset 173552 in webkit
- Timestamp:
- Sep 11, 2014, 7:27:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/xmlhttprequest/exceptions.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/xml/XMLHttpRequest.cpp (modified) (1 diff)
-
Source/WebCore/xml/XMLHttpRequest.h (modified) (1 diff)
-
Source/WebCore/xml/XMLHttpRequest.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r173548 r173552 1 2014-09-11 Shivakumar JM <shiva.jm@samsung.com> 2 3 The overrideMimeType in XMLHttpRequest should throw the exception. 4 https://bugs.webkit.org/show_bug.cgi?id=136699 5 6 Reviewed by Darin Adler. 7 8 Added test to check for "InvalidStateError" exception for overrideMimeType. 9 10 * http/tests/xmlhttprequest/exceptions-expected.txt: 11 * http/tests/xmlhttprequest/exceptions.html: 12 1 13 2014-09-11 Chris Fleizach <cfleizach@apple.com> 2 14 -
trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt
r165229 r173552 9 9 send() 10 10 PASS: req.send(null) threw exception Error: InvalidStateError: DOM Exception 11. 11 PASS: req.overrideMimeType("text/plain") threw exception Error: InvalidStateError: DOM Exception 11. 11 12 PASS: req.setRequestHeader("Foo", "bar") threw exception Error: InvalidStateError: DOM Exception 11. 12 13 PASS: req.getResponseHeader() threw exception TypeError: Not enough arguments. -
trunk/LayoutTests/http/tests/xmlhttprequest/exceptions.html
r165229 r173552 70 70 71 71 shouldThrow('req.send(null)'); 72 shouldThrow('req.overrideMimeType("text/plain")'); 72 73 shouldThrow('req.setRequestHeader("Foo", "bar")'); 73 74 shouldThrow('req.getResponseHeader()'); -
trunk/Source/WebCore/ChangeLog
r173551 r173552 1 2014-09-11 Shivakumar JM <shiva.jm@samsung.com> 2 3 The overrideMimeType in XMLHttpRequest should throw the exception. 4 https://bugs.webkit.org/show_bug.cgi?id=136699 5 6 Reviewed by Darin Adler. 7 8 No new tests, modifed test http/tests/xmlhttprequest/exceptions.html. 9 10 Set XMLHttpRequest::overrideMimeType to throw an "InvalidStateError" exception, if the state is LOADING or DONE. 11 12 * xml/XMLHttpRequest.cpp: 13 (WebCore::XMLHttpRequest::overrideMimeType): 14 * xml/XMLHttpRequest.h: 15 * xml/XMLHttpRequest.idl: 16 1 17 2014-09-11 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r173507 r173552 907 907 } 908 908 909 void XMLHttpRequest::overrideMimeType(const String& override) 910 { 909 void XMLHttpRequest::overrideMimeType(const String& override, ExceptionCode& ec) 910 { 911 if (m_state == LOADING || m_state == DONE) { 912 ec = INVALID_STATE_ERR; 913 return; 914 } 915 911 916 m_mimeTypeOverride = override; 912 917 } -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r171931 r173552 103 103 void abort(); 104 104 void setRequestHeader(const String& name, const String& value, ExceptionCode&); 105 void overrideMimeType(const String& override );105 void overrideMimeType(const String& override, ExceptionCode&); 106 106 bool doneWithoutErrors() const { return !m_error && m_state == DONE; } 107 107 String getAllResponseHeaders() const; -
trunk/Source/WebCore/xml/XMLHttpRequest.idl
r171824 r173552 92 92 93 93 // Extension 94 void overrideMimeType(DOMString override);94 [RaisesException] void overrideMimeType(DOMString override); 95 95 96 96 // EventTarget interface
Note:
See TracChangeset
for help on using the changeset viewer.