summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/font-src
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/font-src')
-rw-r--r--testing/web-platform/tests/content-security-policy/font-src/font-blacklisted-ref.html6
-rw-r--r--testing/web-platform/tests/content-security-policy/font-src/font-blacklisted.html9
-rw-r--r--testing/web-platform/tests/content-security-policy/font-src/font-whitelisted-ref.html6
-rw-r--r--testing/web-platform/tests/content-security-policy/font-src/font-whitelisted.html9
-rw-r--r--testing/web-platform/tests/content-security-policy/font-src/fonts.css8
5 files changed, 38 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted-ref.html b/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted-ref.html
new file mode 100644
index 000000000..fdfbdd93d
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>csp font-src: blacklisted</title>
+<link href="fonts.css" rel="stylesheet" type="text/css">
+         
+<p>The test passes if the line above are boxes in the test and glyphs in the reference.</p> \ No newline at end of file
diff --git a/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted.html b/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted.html
new file mode 100644
index 000000000..a430a417d
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/font-src/font-blacklisted.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<meta charset=utf-8>
+<meta http-equiv="Content-Security-Policy" content="font-src 'none'">
+<title>csp font-src: blacklisted</title>
+<link rel="mismatch" href="font-blacklisted-ref.html">
+<link rel="help" href="https://www.w3.org/TR/CSP2/#directive-font-src">
+<link href="fonts.css" rel="stylesheet" type="text/css">
+         
+<p>The test passes if the line above are boxes in the test and glyphs in the reference.</p> \ No newline at end of file
diff --git a/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted-ref.html b/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted-ref.html
new file mode 100644
index 000000000..25ad3bd75
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>csp font-src: whitelisted</title>
+<link href="fonts.css" rel="stylesheet" type="text/css">
+         
+<p>The test passes if the line above shows the same glyphs in the reference.</p> \ No newline at end of file
diff --git a/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted.html b/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted.html
new file mode 100644
index 000000000..f3558f766
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/font-src/font-whitelisted.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<meta charset=utf-8>
+<meta http-equiv="Content-Security-Policy" content="font-src 'self'">
+<title>csp font-src: whitelisted</title>
+<link rel="match" href="font-whitelisted-ref.html">
+<link rel="help" href="https://www.w3.org/TR/CSP2/#directive-font-src">
+<link href="fonts.css" rel="stylesheet" type="text/css">
+         
+<p>The test passes if the line above shows the same glyphs in the reference.</p> \ No newline at end of file
diff --git a/testing/web-platform/tests/content-security-policy/font-src/fonts.css b/testing/web-platform/tests/content-security-policy/font-src/fonts.css
new file mode 100644
index 000000000..30dd02cdb
--- /dev/null
+++ b/testing/web-platform/tests/content-security-policy/font-src/fonts.css
@@ -0,0 +1,8 @@
+@font-face {
+ font-family: 'Halflings';
+ src: url('/tools/runner/fonts/glyphicons-halflings-regular.woff') format('woff');
+}
+
+body {
+ font-family: 'Halflings', Fallback, sans-serif;
+} \ No newline at end of file