summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/test_policyuri_regression_from_multipolicy.html
blob: 8838f2fc4587c48ed56f3230f9fc4424a42d758e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 924708</title>
   <!--
   test that a report-only policy that uses policy-uri is not incorrectly
   enforced due to regressions introduced by Bug 836922.
   -->
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe style="width:200px;height:200px;" id='testframe'></iframe>
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();

var testframe = document.getElementById('testframe');
testframe.src = 'file_policyuri_regression_from_multipolicy.html';
testframe.addEventListener('load', function checkInlineScriptExecuted () {
  is(this.contentDocument.getElementById('testdiv').innerHTML,
      'Inline Script Executed',
      'Inline script should execute (it would be blocked by the policy, but the policy is report-only)');
  SimpleTest.finish();
});
</script>
</body>
</html>