Skip to content

Commit 77f59d6

Browse files
Fix config schema tests (#1752)
* Conditional matching config validation * Make a unit test to ensure the test configs are valid * Make all test configs valid * Fix lint errors * Update config * Fix windows path lookup
1 parent a21d385 commit 77f59d6

File tree

18 files changed

+376
-49
lines changed

18 files changed

+376
-49
lines changed

injected/integration-test/test-pages/api-manipulation/config/apis.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2+
"readme": "This config is used to test the api manipulation feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"apiManipulation": {
57
"state": "enabled",
8+
"exceptions": [],
69
"settings": {
710
"apiChanges": {
811
"Navigator.prototype.hardwareConcurrency": {

injected/integration-test/test-pages/autofill-password-import/config/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test the autofill password import feature.",
3+
"version": 1,
24
"features": {
35
"autofillPasswordImport": {
46
"state": "enabled",

injected/integration-test/test-pages/breakage-reporting/config/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test the breakage reporting feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"breakageReporting": {

injected/integration-test/test-pages/duckplayer-native/config/native.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test the duckplayer native feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"duckPlayerNative": {

injected/integration-test/test-pages/harmful-apis/config/apis.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2+
"readme": "This config is used to test the harmful APIs feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"windowsPermissionUsage": {
5-
"state": "disabled"
7+
"state": "disabled",
8+
"exceptions": []
69
},
710
"harmfulApis": {
811
"state": "enabled",

injected/integration-test/test-pages/infra/config/conditional-matching-experiments.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
2+
"version": 1,
3+
"readme": "This config is used to test the conditional matching of experiments using the API manipulation feature.",
24
"features": {
35
"contentScopeExperiments": {
46
"exceptions": [],
57
"state": "enabled",
68
"features": {
79
"bloops": {
810
"state": "enabled",
9-
"rollout": {},
11+
"rollout": {
12+
"steps": [
13+
{
14+
"percent": 100
15+
}
16+
]
17+
},
1018
"cohorts": [
1119
{
1220
"name": "control",
@@ -20,7 +28,13 @@
2028
},
2129
"test": {
2230
"state": "enabled",
23-
"rollout": {},
31+
"rollout": {
32+
"steps": [
33+
{
34+
"percent": 100
35+
}
36+
]
37+
},
2438
"cohorts": [
2539
{
2640
"name": "control",
@@ -78,8 +92,9 @@
7892
]
7993
}
8094
]
81-
}
82-
},
83-
"exceptions": []
84-
}
95+
},
96+
"exceptions": []
97+
}
98+
},
99+
"unprotectedTemporary": []
85100
}

injected/integration-test/test-pages/infra/config/conditional-matching.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2+
"readme": "This config is used to test the conditional matching of experiments using the API manipulation feature.",
3+
"version": 1,
24
"features": {
35
"apiManipulation": {
46
"state": "enabled",
7+
"exceptions": [],
58
"settings": {
69
"apiChanges": {
710
"Navigator.prototype.hardwareConcurrency": {

injected/integration-test/test-pages/message-bridge/config/message-bridge-disabled.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test disabling the message bridge feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"favicon": {

injected/integration-test/test-pages/message-bridge/config/message-bridge-enabled.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test the message bridge feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"navigatorInterface": {

injected/integration-test/test-pages/permissions/config/permissions.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"readme": "This config is used to test the windows permissions feature.",
3+
"version": 1,
24
"unprotectedTemporary": [],
35
"features": {
46
"windowsPermissionUsage": {

0 commit comments

Comments
 (0)