1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/plugins/test/mochitest/test_pluginstream_src_referer.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +<head> 1.5 + <title>Do plugin stream src requests send the Referer header correctly?</title> 1.6 + <script type="application/javascript" 1.7 + src="/tests/SimpleTest/SimpleTest.js"></script> 1.8 + <script type="text/javascript" src="utils.js"></script> 1.9 + <link rel="stylesheet" type="text/css" 1.10 + href="/tests/SimpleTest/test.css" /> 1.11 + 1.12 +<body> 1.13 + <p id="display"></p> 1.14 + 1.15 + <script class="testbody" type="application/javascript"> 1.16 + SimpleTest.waitForExplicitFinish(); 1.17 + setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); 1.18 + 1.19 + function frameLoaded() { 1.20 + var testframe = document.getElementById('pluginframe'); 1.21 + var content = testframe.contentDocument.body.innerHTML; 1.22 + if (!content.length) 1.23 + return; 1.24 + 1.25 + is(content, "Referer found: " + window.location); 1.26 + SimpleTest.finish(); 1.27 + } 1.28 + </script> 1.29 + 1.30 + <iframe name="pluginframe" id="pluginframe" onload="frameLoaded()"></iframe> 1.31 + 1.32 + <embed id="plugin" type="application/x-test" src="plugin-stream-referer.sjs" width="200" height="200" frame="pluginframe"></embed> 1.33 +