dom/plugins/test/mochitest/test_bug532208.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_bug532208.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +<head>
     1.5 +<title>Test for correct async delivery of large streams, bug
     1.6 +532208</title>
     1.7 +
     1.8 +<script type="application/javascript"
     1.9 +src="/tests/SimpleTest/SimpleTest.js"></script>
    1.10 +<script type="application/javascript" src="utils.js"></script>
    1.11 +
    1.12 +<body onload="setTimeout(runTests, 2000)">
    1.13 +
    1.14 +<script class="testbody" type="application/javascript">
    1.15 +SimpleTest.waitForExplicitFinish();
    1.16 +setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    1.17 +
    1.18 +function runTests() {
    1.19 +  try {
    1.20 +    document.getElementById('plugin1').getPaintCount();
    1.21 +    ok(true, "Data delivery didn't crash");
    1.22 +  }
    1.23 +  catch (e) {
    1.24 +    ok(false, "Data delivery crashed");
    1.25 +  }
    1.26 +  SimpleTest.finish();
    1.27 +}
    1.28 +</script>
    1.29 +
    1.30 +<embed id="plugin1" type="application/x-test" width="400"
    1.31 +  height="400" src="large-pic.jpg" functiontofail="npp_write_rpc" streammode="normal"></embed>

mercurial