summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/reporting
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/content-security-policy/reporting
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/reporting')
-rw-r--r--testing/web-platform/tests/content-security-policy/reporting/securitypolicyviolation-idl.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/reporting/securitypolicyviolation-idl.html b/testing/web-platform/tests/content-security-policy/reporting/securitypolicyviolation-idl.html
new file mode 100644
index 000000000..225951285
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/reporting/securitypolicyviolation-idl.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>SecurityPolicyViolationEvent IDL Tests</title>
+<link rel="author" title="Louay Bassbouss" href="http://www.fokus.fraunhofer.de">
+<link rel="help" href="http://w3c.github.io/presentation-api/#dfn-controlling-user-agent">
+
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/resources/WebIDLParser.js></script>
+<script src=/resources/idlharness.js></script>
+
+<script id="idl" type="text/plain">
+[Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict)]
+interface SecurityPolicyViolationEvent : Event {
+ readonly attribute DOMString documentURI;
+ readonly attribute DOMString referrer;
+ readonly attribute DOMString blockedURI;
+ readonly attribute DOMString violatedDirective;
+ readonly attribute DOMString effectiveDirective;
+ readonly attribute DOMString originalPolicy;
+ readonly attribute DOMString disposition;
+ readonly attribute DOMString sourceFile;
+ readonly attribute unsigned short statusCode;
+ readonly attribute long lineNumber;
+ readonly attribute long columnNumber;
+};
+
+dictionary SecurityPolicyViolationEventInit : EventInit {
+ DOMString documentURI;
+ DOMString referrer;
+ DOMString blockedURI;
+ DOMString violatedDirective;
+ DOMString effectiveDirective;
+ DOMString originalPolicy;
+ DOMString disposition;
+ DOMString sourceFile;
+ unsigned short statusCode;
+ long lineNumber;
+ long columnNumber;
+};
+</script>
+<script>
+ (function() {
+ var idl_array = new IdlArray();
+ var idls = document.getElementById('idl').textContent;
+ idl_array.add_idls(idls);
+
+ window.event_to_test = new SecurityPolicyViolationEvent({});
+
+ idl_array.add_objects({
+ SecurityPolicyViolationEvent: ['event_to_test']
+ });
+ idl_array.test();
+ })();
+</script>