Bug 1352572 - Add negative test for NPN_PostURLNotify(); r=bsmedberg
authorLie Ryan <lie.1296@gmail.com>
Tue, 11 Apr 2017 13:27:50 +0000
changeset 357225 ab66ad2abaa04612e81dd001b922b820d520abe7
parent 357224 97b04324897ed9699a2601d530e6cad429f62c5f
child 357226 102c0159724cf8351742df1bb7d30c2172426d25
push id31788
push userkwierso@gmail.com
push dateTue, 09 May 2017 20:48:49 +0000
treeherdermozilla-central@2b6f6881a24a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1352572
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352572 - Add negative test for NPN_PostURLNotify(); r=bsmedberg Note that this test never actually fails short of passing file parameter to NPN_PostURLNotify actually causing the browser to crash. It can't distinguish between the case when file is working or not. MozReview-Commit-ID: 1G590ZWpHsE
dom/plugins/test/mochitest/test_streamNotify.html
--- a/dom/plugins/test/mochitest/test_streamNotify.html
+++ b/dom/plugins/test/mochitest/test_streamNotify.html
@@ -80,12 +80,21 @@
                     }, null, true), "streamTest GET data: URI");
 
     ok(!p.streamTest("data:malformed?", false, null, null,
                      function(r, t) {
                        todo(false, "Shouldn't get callback for invalid data: URI");
                      }, null, true), "streamTest GET bad data: URI");
 
     ok(!p.postFileToURLTest("post.sjs"), "postFileToURLTest POST a file");
+
+    ok(!p.streamTest("post.sjs", true, "non-existent-file",
+                     function(r, t) {
+                       ok(false, "Shouldn't get write callback from file post");
+                     }, function(r, t) {
+                       ok(false, "Shouldn't get notify callback from file post");
+                     }, function(r, t) {
+                       ok(false, "Shouldn't get redirect callback from file post");
+                     }, true, true), "streamTest POST a file");
   }
   </script>
 
   <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>