| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/testharness-helper.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/testharness-helper.js b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/testharness-helper.js
|
| index 3c296800f8f0aed1adeaab34fce5f04d13f3470b..d475d05115a59d0d4630894227e7c0a1ae4304ce 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/testharness-helper.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/testharness-helper.js
|
| @@ -19,6 +19,15 @@ function waitUntilCSPEventForURL(test, url) {
|
| });
|
| }
|
|
|
| +function waitUntilCSPEventForEval(test, line) {
|
| + return new Promise((resolve, reject) => {
|
| + self.addEventListener("securitypolicyviolation", test.step_func(e => {
|
| + if (e.blockedURI == "eval" && e.lineNumber == line)
|
| + resolve(e);
|
| + }));
|
| + });
|
| +}
|
| +
|
| function waitUntilEvent(obj, name) {
|
| return new Promise((resolve, reject) => {
|
| obj.addEventListener(name, resolve);
|
|
|