Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylenonce-svg-style-basic-blocked-error-event.html

Issue 2020223002: Refactor nonce support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inline
Patch Set: Rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylenonce-svg-style-basic-blocked-error-event.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylenonce-svg-style-basic-blocked-error-event.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylenonce-svg-style-basic-blocked-error-event.html
deleted file mode 100644
index be7912b2bbf725a1c9807f8ec977a001fabc352e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/stylenonce-svg-style-basic-blocked-error-event.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>SVG Style element has error on bad style nonce</title>
- <meta http-equiv="Content-Security-Policy" content="style-src 'nonce-nonceynonce'">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <script>
- function verifyStep1() {
- var color = window.getComputedStyle(document.querySelector('p')).color;
- assert_equals(color, "rgb(0, 128, 0)", "The color of the paragraph is still green after initial svg style.");
- }
-
- function setupStep2() {
- var e = document.getElementById("svgelement");
- var sty = document.createElementNS("http://www.w3.org/2000/svg", "style");
- sty.innerHTML = "p { color: red; }";
- sty.onerror = styleError;
- e.appendChild(sty);
- }
- function verifyStep2() {
- var color = window.getComputedStyle(document.querySelector('p')).color;
- assert_equals(color, "rgb(0, 128, 0)", "The color of the paragraph is still green after inserted svg style.");
- }
-
- function setupStep3() {
- var e = document.getElementById('style1');
- e.innerHTML = "p { color: blue; }";
- }
- function verifyStep3() {
- var color = window.getComputedStyle(document.querySelector('p')).color;
- assert_equals(color, "rgb(0, 128, 0)", "The color of the paragraph is still green after changing svg style.");
- test.done();
- }
-
- var verifySteps = [ verifyStep1, verifyStep2, verifyStep3 ];
- var setupSteps = [ setupStep2, setupStep3 ];
-
- var test = async_test("Test that paragraph remains green and error events received.");
-
- function styleError() {
- test.step(function() {
- verifySteps.shift()();
- var nextSetup = setupSteps.shift();
- if (nextSetup)
- nextSetup();
- });
- }
- </script>
-</head>
-<body>
- <svg id="svgelement" xmlns="http://www.w3.org/2000/svg" width="800" height="100">
- <style nonce="nonceynonce">p { color: green; }</style>
- <style id="style1" nonce="notavalidnonce" onerror="styleError();">p { color: red; }</style>
- <p>A test paragraph</p>
- </svg>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698