dom/plugins/test/mochitest/test_pluginstream_src_referer.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:9d0548f9b365
1 <head>
2 <title>Do plugin stream src requests send the Referer header correctly?</title>
3 <script type="application/javascript"
4 src="/tests/SimpleTest/SimpleTest.js"></script>
5 <script type="text/javascript" src="utils.js"></script>
6 <link rel="stylesheet" type="text/css"
7 href="/tests/SimpleTest/test.css" />
8
9 <body>
10 <p id="display"></p>
11
12 <script class="testbody" type="application/javascript">
13 SimpleTest.waitForExplicitFinish();
14 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
15
16 function frameLoaded() {
17 var testframe = document.getElementById('pluginframe');
18 var content = testframe.contentDocument.body.innerHTML;
19 if (!content.length)
20 return;
21
22 is(content, "Referer found: " + window.location);
23 SimpleTest.finish();
24 }
25 </script>
26
27 <iframe name="pluginframe" id="pluginframe" onload="frameLoaded()"></iframe>
28
29 <embed id="plugin" type="application/x-test" src="plugin-stream-referer.sjs" width="200" height="200" frame="pluginframe"></embed>
30

mercurial