зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3d7da5a9c91d (bug 1352559)
This commit is contained in:
Родитель
849284daf4
Коммит
cdc9bccf24
|
@ -84,6 +84,7 @@ skip-if = !crashreporter || e10s
|
|||
skip-if = !crashreporter || e10s
|
||||
[test_defaultValue.html]
|
||||
[test_enumerate.html]
|
||||
[test_fullpage.html]
|
||||
[test_GCrace.html]
|
||||
[test_hanging.html]
|
||||
skip-if = !crashreporter || e10s
|
||||
|
@ -123,9 +124,12 @@ skip-if = true # Bug 596491
|
|||
skip-if = true # Bug 1267432
|
||||
[test_pluginstream_geturlnotify.html]
|
||||
skip-if = true # Bug 1267432
|
||||
[test_pluginstream_newstream.html]
|
||||
[test_pluginstream_post.html]
|
||||
[test_pluginstream_poststream.html]
|
||||
[test_pluginstream_referer.html]
|
||||
[test_pluginstream_seek.html]
|
||||
[test_pluginstream_seek_close.html]
|
||||
[test_pluginstream_src.html]
|
||||
[test_pluginstream_src_dynamic.html]
|
||||
[test_pluginstream_src_referer.html]
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<head>
|
||||
<title>Full-page seekable stream</title>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css">
|
||||
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function frameLoaded() {
|
||||
var testframe = document.getElementById('testframe');
|
||||
var content = testframe.contentDocument.body.innerHTML;
|
||||
if (!content.length)
|
||||
return;
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
req.open('GET', 'loremipsum.xtest', false);
|
||||
req.overrideMimeType('text/plain; charset=x-user-defined');
|
||||
req.send(null);
|
||||
is(req.status, 200, "bad XMLHttpRequest");
|
||||
is(content, req.responseText.replace(/\r\n/g, "\n"),
|
||||
"content doesn't match");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe src="loremipsum.xtest" streamtype="seek"></iframe>
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
|
@ -0,0 +1,32 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>NPAPI NPN_NewStream NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- A stream is sent to the browser via NPP_NewStream, NP_NORMAL.
|
||||
- When NPP_DestroyStream is called, the plugin sends the stream
|
||||
- content back to the browser by calling NPN_NewStream and
|
||||
- NPN_Write. The stream content should be displayed in the specified
|
||||
- frame.
|
||||
-->
|
||||
<embed src="loremipsum.txt" streammode="normal"
|
||||
newstream="true" frame="testframe"
|
||||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<body>
|
||||
<head>
|
||||
<title>NPAPI Seekable NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- Tests a seekable stream. Calls NPN_RequestRead with the specified
|
||||
- range, and verifies that an NPP_Write call is made with the correct
|
||||
- parameters, including the buffer data for the byte range. Once all
|
||||
- calls to NPP_Write have finished, the plugin calls NPN_DestroyStream
|
||||
- and then displays the entire stream's content in a browser frame via
|
||||
- NPN_GetURL.
|
||||
-->
|
||||
<embed src="loremipsum.txt" streammode="seek"
|
||||
frame="testframe" streamchunksize="1024" range="100,100"
|
||||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<body>
|
||||
<head>
|
||||
<title>NPAPI Seekable NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
<script>
|
||||
SimpleTest.expectAssertions(0, 1);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function frameLoaded() {
|
||||
var testframe = document.getElementById('testframe');
|
||||
var content = testframe.contentDocument.body.innerHTML;
|
||||
if (!content.length)
|
||||
return;
|
||||
|
||||
ok(true, "We didn't crash");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- Tests a seekable stream. Calls NPN_RequestRead with the specified
|
||||
- range, and verifies that an NPP_Write call is made with the correct
|
||||
- parameters, including the buffer data for the byte range. Once all
|
||||
- calls to NPP_Write have finished, the plugin calls NPN_DestroyStream
|
||||
- and then displays the entire stream's content in a browser frame via
|
||||
- NPN_GetURL.
|
||||
-->
|
||||
<embed src="neverending.sjs" streammode="seek" closestream
|
||||
frame="testframe" streamchunksize="1024" range="100,100"
|
||||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче