Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <body> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>NPAPI Seekable NPStream Test</title> |
michael@0 | 4 | <script type="text/javascript" |
michael@0 | 5 | src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <script type="text/javascript" src="utils.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" |
michael@0 | 8 | href="/tests/SimpleTest/test.css" /> |
michael@0 | 9 | <script> |
michael@0 | 10 | SimpleTest.expectAssertions(0, 1); |
michael@0 | 11 | |
michael@0 | 12 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 13 | setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); |
michael@0 | 14 | |
michael@0 | 15 | function frameLoaded() { |
michael@0 | 16 | var testframe = document.getElementById('testframe'); |
michael@0 | 17 | var content = testframe.contentDocument.body.innerHTML; |
michael@0 | 18 | if (!content.length) |
michael@0 | 19 | return; |
michael@0 | 20 | |
michael@0 | 21 | ok(true, "We didn't crash"); |
michael@0 | 22 | SimpleTest.finish(); |
michael@0 | 23 | } |
michael@0 | 24 | </script> |
michael@0 | 25 | </head> |
michael@0 | 26 | <body> |
michael@0 | 27 | <p id="display"></p> |
michael@0 | 28 | |
michael@0 | 29 | <iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe> |
michael@0 | 30 | |
michael@0 | 31 | <!-- |
michael@0 | 32 | - Tests a seekable stream. Calls NPN_RequestRead with the specified |
michael@0 | 33 | - range, and verifies that an NPP_Write call is made with the correct |
michael@0 | 34 | - parameters, including the buffer data for the byte range. Once all |
michael@0 | 35 | - calls to NPP_Write have finished, the plugin calls NPN_DestroyStream |
michael@0 | 36 | - and then displays the entire stream's content in a browser frame via |
michael@0 | 37 | - NPN_GetURL. |
michael@0 | 38 | --> |
michael@0 | 39 | <embed src="neverending.sjs" streammode="seek" closestream |
michael@0 | 40 | frame="testframe" streamchunksize="1024" range="100,100" |
michael@0 | 41 | id="embedtest" style="width: 400px; height: 100px;" |
michael@0 | 42 | type="application/x-test"></embed> |
michael@0 | 43 | |
michael@0 | 44 | </body> |
michael@0 | 45 | </html> |