Loading content/base/public/nsDeprecatedOperationList.h +1 −0 Original line number Diff line number Diff line Loading @@ -48,3 +48,4 @@ DEPRECATED_OPERATION(DOMExceptionCode) DEPRECATED_OPERATION(NoExposedProps) DEPRECATED_OPERATION(MutationEvent) DEPRECATED_OPERATION(MozSlice) DEPRECATED_OPERATION(Onuploadprogress) content/base/src/nsXMLHttpRequest.h +18 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,24 @@ public: // event handler IMPL_EVENT_HANDLER(readystatechange, Readystatechange) JSObject* GetOnuploadprogress(JSContext* /* unused */) { nsIDocument* doc = GetOwner() ? GetOwner()->GetExtantDoc() : NULL; if (doc) { doc->WarnOnceAbout(nsIDocument::eOnuploadprogress); } return GetListenerAsJSObject(mOnUploadProgressListener); } void SetOnuploadprogress(JSContext* aCx, JSObject* aCallback, ErrorResult& aRv) { nsIDocument* doc = GetOwner() ? GetOwner()->GetExtantDoc() : NULL; if (doc) { doc->WarnOnceAbout(nsIDocument::eOnuploadprogress); } aRv = SetJSObjectListener(aCx, NS_LITERAL_STRING("uploadprogress"), mOnUploadProgressListener, aCallback); } // states uint16_t GetReadyState(); Loading content/base/test/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ _TEST_FILES2 = \ test_bug433662.html \ test_bug749367.html \ test_bug753278.html \ test_XHR_onuploadprogress.html \ $(NULL) _CHROME_FILES = \ Loading content/base/test/test_XHR_onuploadprogress.html 0 → 100644 +41 −0 Original line number Diff line number Diff line <!DOCTYPE HTML> <html> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=743666 --> <head> <meta charset="utf-8"> <title>Test for Bug 743666</title> <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> </head> <body> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=743666">Mozilla Bug 743666</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> /** Test for Bug 743666 **/ var called = false; function uploadprogress() { called = true; } var xhr = new XMLHttpRequest(); xhr.onuploadprogress = uploadprogress; var event = document.createEvent("ProgressEvent"); event.initProgressEvent("uploadprogress", false, false, false, false, 0); xhr.dispatchEvent(event); ok(called, "XMLHttpRequest.onuploadprogress sets uploadprogress event listener"); </script> </pre> </body> </html> dom/bindings/Bindings.conf +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ DOMInterfaces = { 'multipart', 'channel', 'upload', 'status' ], 'getterOnly': [ 'responseType', 'timeout', 'onreadystatechange' 'responseType', 'timeout', 'onreadystatechange', 'onuploadprogress' ] }, # XXXbz need a JSContext for send() and sendAsBinary because of Loading Loading
content/base/public/nsDeprecatedOperationList.h +1 −0 Original line number Diff line number Diff line Loading @@ -48,3 +48,4 @@ DEPRECATED_OPERATION(DOMExceptionCode) DEPRECATED_OPERATION(NoExposedProps) DEPRECATED_OPERATION(MutationEvent) DEPRECATED_OPERATION(MozSlice) DEPRECATED_OPERATION(Onuploadprogress)
content/base/src/nsXMLHttpRequest.h +18 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,24 @@ public: // event handler IMPL_EVENT_HANDLER(readystatechange, Readystatechange) JSObject* GetOnuploadprogress(JSContext* /* unused */) { nsIDocument* doc = GetOwner() ? GetOwner()->GetExtantDoc() : NULL; if (doc) { doc->WarnOnceAbout(nsIDocument::eOnuploadprogress); } return GetListenerAsJSObject(mOnUploadProgressListener); } void SetOnuploadprogress(JSContext* aCx, JSObject* aCallback, ErrorResult& aRv) { nsIDocument* doc = GetOwner() ? GetOwner()->GetExtantDoc() : NULL; if (doc) { doc->WarnOnceAbout(nsIDocument::eOnuploadprogress); } aRv = SetJSObjectListener(aCx, NS_LITERAL_STRING("uploadprogress"), mOnUploadProgressListener, aCallback); } // states uint16_t GetReadyState(); Loading
content/base/test/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ _TEST_FILES2 = \ test_bug433662.html \ test_bug749367.html \ test_bug753278.html \ test_XHR_onuploadprogress.html \ $(NULL) _CHROME_FILES = \ Loading
content/base/test/test_XHR_onuploadprogress.html 0 → 100644 +41 −0 Original line number Diff line number Diff line <!DOCTYPE HTML> <html> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=743666 --> <head> <meta charset="utf-8"> <title>Test for Bug 743666</title> <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> </head> <body> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=743666">Mozilla Bug 743666</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> /** Test for Bug 743666 **/ var called = false; function uploadprogress() { called = true; } var xhr = new XMLHttpRequest(); xhr.onuploadprogress = uploadprogress; var event = document.createEvent("ProgressEvent"); event.initProgressEvent("uploadprogress", false, false, false, false, 0); xhr.dispatchEvent(event); ok(called, "XMLHttpRequest.onuploadprogress sets uploadprogress event listener"); </script> </pre> </body> </html>
dom/bindings/Bindings.conf +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ DOMInterfaces = { 'multipart', 'channel', 'upload', 'status' ], 'getterOnly': [ 'responseType', 'timeout', 'onreadystatechange' 'responseType', 'timeout', 'onreadystatechange', 'onuploadprogress' ] }, # XXXbz need a JSContext for send() and sendAsBinary because of Loading