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
--- 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>