Skip to content

Karma trusted types #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: trusted-types-tests
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package(default_visibility = ["//visibility:public"])

exports_files([
"LICENSE",
"karma.conf.js",
"karma-js.conf.js",
"browser-providers.conf.js",
"scripts/ci/track-payload-size.sh",
Expand Down
8 changes: 4 additions & 4 deletions dev-infra/browsers/chromium/chromium.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ def define_chromium_repositories():
platform_http_file(
name = "org_chromium_chromium_amd64",
licenses = ["notice"], # BSD 3-clause (maybe more?)
sha256 = "2cfd74ee58c79d8b7aada05c899a930967e2fd8bb0186582cde02c7340863f64",
sha256 = "390be82d423fb23830aaf87260cf88afdde975448ca8f587572b052838bc0ba6",
# 83.0.4103
urls = ["https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/756066/chrome-linux.zip"],
urls = ["https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/782797/chrome-linux.zip"],
)

platform_http_file(
Expand All @@ -36,9 +36,9 @@ def define_chromium_repositories():
platform_http_file(
name = "org_chromium_chromedriver_amd64",
licenses = ["reciprocal"], # BSD 3-clause, ICU, MPL 1.1, libpng (BSD/MIT-like), Academic Free License v. 2.0, BSD 2-clause, MIT
sha256 = "95dded16000b82e31445361da7d251ed707e027a4b61e9a3ec5fbd1cc2f62bb1",
sha256 = "528f4bd8515fff93ad99955a0c4b30133398f4e4fbff54709744bd367ec4f11a",
# 83.0.4103
urls = ["https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/756066/chromedriver_linux64.zip"],
urls = ["https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/782797/chromedriver_linux64.zip"],
)

platform_http_file(
Expand Down
19 changes: 19 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

module.exports = function(config) {
config.set({
customHeaders: [{
match: '.*',
name: 'Content-Security-Policy',
// Lists the names of the trusted type policies that we trust.
value:
`require-trusted-types-for 'script'; trusted-types karma bazel-karma jasmine-core angular angular#only-for-testing angular#jit goog#html; report-uri http://localhost:1337/csp`,
}],
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"jasmine-core": "^3.5.0",
"jquery": "3.0.0",
"js-levenshtein": "^1.1.6",
"karma": "~4.1.0",
"karma": "^4.4.0",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.2.0",
"karma-jasmine": "^2.0.1",
Expand Down
1 change: 1 addition & 0 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def karma_web_test_suite(name, **kwargs):
name = name,
runtime_deps = runtime_deps,
bootstrap = bootstrap,
config_file = "//:karma.conf.js",
deps = deps,
browsers = [
"//dev-infra/browsers/chromium:chromium",
Expand Down
21 changes: 10 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3550,7 +3550,7 @@ braces@^2.3.1, braces@^2.3.2:
split-string "^3.0.2"
to-regex "^3.0.1"

braces@~3.0.2:
braces@^3.0.2, braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
Expand Down Expand Up @@ -4091,7 +4091,7 @@ [email protected]:
optionalDependencies:
fsevents "~2.1.2"

chokidar@^2.0.3, chokidar@^2.1.8:
chokidar@^2.1.8:
version "2.1.8"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"
integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==
Expand Down Expand Up @@ -4948,7 +4948,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647"
integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==

core-js@^2.2.0, core-js@^2.4.0, core-js@^2.4.1:
core-js@^2.4.0, core-js@^2.4.1:
version "2.6.11"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
Expand Down Expand Up @@ -9394,26 +9394,25 @@ karma-sourcemap-loader@^0.3.7:
dependencies:
graceful-fs "^4.1.2"

karma@~4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/karma/-/karma-4.1.0.tgz#d07387c9743a575b40faf73e8a3eb5421c2193e1"
integrity sha512-xckiDqyNi512U4dXGOOSyLKPwek6X/vUizSy2f3geYevbLj+UIdvNwbn7IwfUIL2g1GXEPWt/87qFD1fBbl/Uw==
karma@^4.4.0:
version "4.4.1"
resolved "https://registry.yarnpkg.com/karma/-/karma-4.4.1.tgz#6d9aaab037a31136dc074002620ee11e8c2e32ab"
integrity sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A==
dependencies:
bluebird "^3.3.0"
body-parser "^1.16.1"
braces "^2.3.2"
chokidar "^2.0.3"
braces "^3.0.2"
chokidar "^3.0.0"
colors "^1.1.0"
connect "^3.6.0"
core-js "^2.2.0"
di "^0.0.1"
dom-serialize "^2.2.0"
flatted "^2.0.0"
glob "^7.1.1"
graceful-fs "^4.1.2"
http-proxy "^1.13.0"
isbinaryfile "^3.0.0"
lodash "^4.17.11"
lodash "^4.17.14"
log4js "^4.0.0"
mime "^2.3.1"
minimatch "^3.0.2"
Expand Down