Bug 1352572 - Add negative test for NPN_PostURLNotify(); r?bsmedberg draft
authorLie Ryan <lie.1296@gmail.com>
Tue, 11 Apr 2017 13:27:50 +0000
changeset 569540 ebea78e67e1662f8c5b768abe95bee8b0777ef1e
parent 569539 967597277530b248ef3b4ec4a4f1352c1f3e2b9c
child 569541 83f2670d6767c47fa2c99381fd55384c8ef2f0c2
child 573676 93258555bc2230c9f60ad0f5448a074d2c4a2a81
push id56214
push userbmo:lie.1296@gmail.com
push dateThu, 27 Apr 2017 16:26:57 +0000
reviewersbsmedberg
bugs1352572
milestone55.0a1
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>