diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/tools/apiclient/test | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/tools/apiclient/test')
-rw-r--r-- | testing/web-platform/tests/css/tools/apiclient/test/corners.json | 81 | ||||
-rw-r--r-- | testing/web-platform/tests/css/tools/apiclient/test/extensions.json | 210 |
2 files changed, 291 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/tools/apiclient/test/corners.json b/testing/web-platform/tests/css/tools/apiclient/test/corners.json new file mode 100644 index 0000000000..fd0a5a80f8 --- /dev/null +++ b/testing/web-platform/tests/css/tools/apiclient/test/corners.json @@ -0,0 +1,81 @@ +{
+ "Explode Non-composite" :
+ {
+ "level": 4,
+ "variables": {
+ "token": "12345"
+ },
+ "testcases" : [
+ ["{token}", "12345"],
+ ["{token*}", "12345"],
+ ["{.token}", ".12345"],
+ ["{.token*}", ".12345"],
+ ["{/token}", "/12345"],
+ ["{/token*}", "/12345"],
+ ["{?token}", "?token=12345"],
+ ["{?token*}", "?token=12345"]
+ ]
+ },
+ "Non-string Values" :
+ {
+ "level": 4,
+ "variables": {
+ "positive": true,
+ "negative": false,
+ "zero" : 0,
+ "number" : 42.24,
+ "list" : ["one", 2, true, false, 0],
+ "dict" : { "one": "1", "two": 2, "positive": true, "negative": false, "zero": 0 }
+ },
+ "testcases" : [
+ ["{positive}", "true"],
+ ["{positive*}", "true"],
+ ["{negative}", "false"],
+ ["{negative*}", "false"],
+ ["{zero}", "0"],
+ ["{zero*}", "0"],
+ ["{number}", "42.24"],
+ ["{number*}", "42.24"],
+ ["{.positive}", ".true"],
+ ["{.positive*}", ".true"],
+ ["{.negative}", ".false"],
+ ["{.negative*}", ".false"],
+ ["{.zero}", ".0"],
+ ["{.zero*}", ".0"],
+ ["{.number}", ".42.24"],
+ ["{.number*}", ".42.24"],
+ ["{/positive}", "/true"],
+ ["{/positive*}", "/true"],
+ ["{/negative}", "/false"],
+ ["{/negative*}", "/false"],
+ ["{/zero}", "/0"],
+ ["{/zero*}", "/0"],
+ ["{/number}", "/42.24"],
+ ["{/number*}", "/42.24"],
+ ["{?positive}", "?positive=true"],
+ ["{?positive*}", "?positive=true"],
+ ["{?negative}", "?negative=false"],
+ ["{?negative*}", "?negative=false"],
+ ["{?zero}", "?zero=0"],
+ ["{?zero*}", "?zero=0"],
+ ["{?number}", "?number=42.24"],
+ ["{?number*}", "?number=42.24"],
+ ["{list}", "one,2,true,false,0"],
+ ["{list*}", "one,2,true,false,0"],
+ ["{.list}", ".one,2,true,false,0"],
+ ["{.list*}", ".one.2.true.false.0"],
+ ["{/list}", "/one,2,true,false,0"],
+ ["{/list*}", "/one/2/true/false/0"],
+ ["{?list}", "?list=one,2,true,false,0"],
+ ["{?list*}", "?list=one&list=2&list=true&list=false&list=0"],
+ ["{dict}", "one,1,two,2,positive,true,negative,false,zero,0"],
+ ["{dict*}", "one=1,two=2,positive=true,negative=false,zero=0"],
+ ["{.dict}", ".one,1,two,2,positive,true,negative,false,zero,0"],
+ ["{.dict*}", ".one=1.two=2.positive=true.negative=false.zero=0"],
+ ["{/dict}", "/one,1,two,2,positive,true,negative,false,zero,0"],
+ ["{/dict*}", "/one=1/two=2/positive=true/negative=false/zero=0"],
+ ["{?dict}", "?dict=one,1,two,2,positive,true,negative,false,zero,0"],
+ ["{?dict*}", "?one=1&two=2&positive=true&negative=false&zero=0"]
+ ]
+ }
+}
diff --git a/testing/web-platform/tests/css/tools/apiclient/test/extensions.json b/testing/web-platform/tests/css/tools/apiclient/test/extensions.json new file mode 100644 index 0000000000..0c493620bd --- /dev/null +++ b/testing/web-platform/tests/css/tools/apiclient/test/extensions.json @@ -0,0 +1,210 @@ +{ + "Nested Structures" : + { + "level": 5, + "variables": { + "list" : ["one", "two", "three", "four"], + "dict" : {"semi": ";", "dot": ".", "comma": ","}, + "lists" : [["one", "two"], ["three"], "four"], + "dicts" : {"one": {"semi": ";", "dot": "."}, "two": {"comma": ","}}, + "mixed" : {"list": ["one", ["two", "three"]], "dict": {"one": {"semi": ";", "dot": "."}, "two": {"comma": ","}}}, + "dlist" : [{"semi": ";", "dot": "."}, {"comma": ","}] + }, + "testcases" : [ + ["{list}", "one,two,three,four"], + ["{list*}", "one,two,three,four"], + ["{?list}", "?list=one,two,three,four"], + ["{?list*}", "?list=one&list=two&list=three&list=four"], + ["{lists}", "one,two,three,four"], + ["{lists*}", "one,two,three,four"], + ["{?lists}", "?lists=one,two,three,four"], + ["{?lists*}", "?lists=one&lists=two&lists=three&lists=four"], + ["{dict}", [ + "comma,%2C,dot,.,semi,%3B", + "comma,%2C,semi,%3B,dot,.", + "dot,.,comma,%2C,semi,%3B", + "dot,.,semi,%3B,comma,%2C", + "semi,%3B,comma,%2C,dot,.", + "semi,%3B,dot,.,comma,%2C" + ]], + ["{dict*}", [ + "comma=%2C,dot=.,semi=%3B", + "comma=%2C,semi=%3B,dot=.", + "dot=.,comma=%2C,semi=%3B", + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,comma=%2C,dot=.", + "semi=%3B,dot=.,comma=%2C" + ]], + ["{?dict}", [ + "?dict=comma,%2C,dot,.,semi,%3B", + "?dict=comma,%2C,semi,%3B,dot,.", + "?dict=dot,.,comma,%2C,semi,%3B", + "?dict=dot,.,semi,%3B,comma,%2C", + "?dict=semi,%3B,comma,%2C,dot,.", + "?dict=semi,%3B,dot,.,comma,%2C" + ]], + ["{?dict*}", [ + "?comma=%2C&dot=.&semi=%3B", + "?comma=%2C&semi=%3B&dot=.", + "?dot=.&comma=%2C&semi=%3B", + "?dot=.&semi=%3B&comma=%2C", + "?semi=%3B&comma=%2C&dot=.", + "?semi=%3B&dot=.&comma=%2C" + ]], + ["{dicts}", [ + "two.comma,%2C,one.dot,.,one.semi,%3B", + "two.comma,%2C,one.semi,%3B,one.dot,.", + "one.dot,.,two.comma,%2C,one.semi,%3B", + "one.dot,.,one.semi,%3B,two.comma,%2C", + "one.semi,%3B,two.comma,%2C,one.dot,.", + "one.semi,%3B,one.dot,.,two.comma,%2C" + ]], + ["{dicts*}", [ + "two.comma=%2C,one.dot=.,one.semi=%3B", + "two.comma=%2C,one.semi=%3B,one.dot=.", + "one.dot=.,two.comma=%2C,one.semi=%3B", + "one.dot=.,one.semi=%3B,two.comma=%2C", + "one.semi=%3B,two.comma=%2C,one.dot=.", + "one.semi=%3B,one.dot=.,two.comma=%2C" + ]], + ["{?dicts}", [ + "?dicts=two.comma,%2C,one.dot,.,one.semi,%3B", + "?dicts=two.comma,%2C,one.semi,%3B,one.dot,.", + "?dicts=one.dot,.,two.comma,%2C,one.semi,%3B", + "?dicts=one.dot,.,one.semi,%3B,two.comma,%2C", + "?dicts=one.semi,%3B,two.comma,%2C,one.dot,.", + "?dicts=one.semi,%3B,one.dot,.,two.comma,%2C" + ]], + ["{?dicts*}", [ + "?two.comma=%2C&one.dot=.&one.semi=%3B", + "?two.comma=%2C&one.semi=%3B&one.dot=.", + "?one.dot=.&two.comma=%2C&one.semi=%3B", + "?one.dot=.&one.semi=%3B&two.comma=%2C", + "?one.semi=%3B&two.comma=%2C&one.dot=.", + "?one.semi=%3B&one.dot=.&two.comma=%2C" + ]], + ["{mixed}", [ + "list.one,list.two,list.three,dict.two.comma,%2C,dict.one.dot,.,dict.one.semi,%3B", + "list.one,list.two,list.three,dict.two.comma,%2C,dict.one.semi,%3B,dict.one.dot,.", + "list.one,list.two,list.three,dict.one.dot,.,dict.two.comma,%2C,dict.one.semi,%3B", + "list.one,list.two,list.three,dict.one.dot,.,dict.one.semi,%3B,dict.two.comma,%2C", + "list.one,list.two,list.three,dict.one.semi,%3B,dict.two.comma,%2C,dict.one.dot,.", + "list.one,list.two,list.three,dict.one.semi,%3B,dict.one.dot,.,dict.two.comma,%2C" + ]], + ["{mixed*}", [ + "list.one,list.two,list.three,dict.two.comma=%2C,dict.one.dot=.,dict.one.semi=%3B", + "list.one,list.two,list.three,dict.two.comma=%2C,dict.one.semi=%3B,dict.one.dot=.", + "list.one,list.two,list.three,dict.one.dot=.,dict.two.comma=%2C,dict.one.semi=%3B", + "list.one,list.two,list.three,dict.one.dot=.,dict.one.semi=%3B,dict.two.comma=%2C", + "list.one,list.two,list.three,dict.one.semi=%3B,dict.two.comma=%2C,dict.one.dot=.", + "list.one,list.two,list.three,dict.one.semi=%3B,dict.one.dot=.,dict.two.comma=%2C" + ]], + ["{?mixed}", [ + "?mixed=list.one,list.two,list.three,dict.two.comma,%2C,dict.one.dot,.,dict.one.semi,%3B", + "?mixed=list.one,list.two,list.three,dict.two.comma,%2C,dict.one.semi,%3B,dict.one.dot,.", + "?mixed=list.one,list.two,list.three,dict.one.dot,.,dict.two.comma,%2C,dict.one.semi,%3B", + "?mixed=list.one,list.two,list.three,dict.one.dot,.,dict.one.semi,%3B,dict.two.comma,%2C", + "?mixed=list.one,list.two,list.three,dict.one.semi,%3B,dict.two.comma,%2C,dict.one.dot,.", + "?mixed=list.one,list.two,list.three,dict.one.semi,%3B,dict.one.dot,.,dict.two.comma,%2C" + ]], + ["{?mixed*}", [ + "?list=one&list=two&list=three&dict.two.comma=%2C&dict.one.dot=.&dict.one.semi=%3B", + "?list=one&list=two&list=three&dict.two.comma,%2C&dict.one.semi=%3B&dict.one.dot=.", + "?list=one&list=two&list=three&dict.one.dot=.&dict.two.comma=%2C&dict.one.semi=%3B", + "?list=one&list=two&list=three&dict.one.dot=.&dict.one.semi=%3B&dict.two.comma=%2C", + "?list=one&list=two&list=three&dict.one.semi=%3B&dict.two.comma=%2C&dict.one.dot=.", + "?list=one&list=two&list=three&dict.one.semi=%3B&dict.one.dot=.&dict.two.comma=%2C" + ]], + ["{dlist}", [ + "dot,.,semi,%3B,comma,%2C", + "semi,%3B,dot,.,comma,%2C" + ]], + ["{dlist*}", [ + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,dot=.,comma=%2C" + ]], + ["{?dlist}", [ + "?dlist=dot,.,semi,%3B,comma,%2C", + "?dlist=semi,%3B,dot,.,comma,%2C" + ]], + ["{?dlist*}", [ + "?dlist.dot=.&dlist.semi=%3B&dlist.comma=%2C", + "?dlist.semi=%3B&dlist.dot=.&dlist.comma=%2C" + ]] + ] + }, + "Array Modifier" : + { + "level": 5, + "variables": { + "list" : ["one", "two", "three", "four"], + "dict" : {"semi": ";", "dot": ".", "comma": ","}, + "lists" : [["one", "two"], ["three"], "four"], + "dicts" : {"one": {"semi": ";", "dot": "."}, "two": {"comma": ","}}, + "mixed" : {"list": ["one", ["two", "three"]], "dict": {"one": {"semi": ";", "dot": "."}, "two": {"comma": ","}}}, + "dlist" : [{"semi": ";", "dot": "."}, {"comma": ","}] + }, + "testcases" : [ + ["{list[]}", "one,two,three,four"], + ["{?list[]}", "?list[0]=one&list[1]=two&list[2]=three&list[3]=four"], + ["{lists[]}", "one,two,three,four"], + ["{?lists[]}", "?lists[0][0]=one&lists[0][1]=two&lists[1][0]=three&lists[2]=four"], + ["{dict[]}", [ + "comma=%2C,dot=.,semi=%3B", + "comma=%2C,semi=%3B,dot=.", + "dot=.,comma=%2C,semi=%3B", + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,comma=%2C,dot=.", + "semi=%3B,dot=.,comma=%2C" + ]], + ["{?dict[]}", [ + "?comma=%2C&dot=.&semi=%3B", + "?comma=%2C&semi=%3B&dot=.", + "?dot=.&comma=%2C&semi=%3B", + "?dot=.&semi=%3B&comma=%2C", + "?semi=%3B&comma=%2C&dot=.", + "?semi=%3B&dot=.&comma=%2C" + ]], + ["{dicts[]}", [ + "two[comma]=%2C,one[dot]=.,one[semi]=%3B", + "two[comma]=%2C,one[semi]=%3B,one[dot]=.", + "one[dot]=.,two[comma]=%2C,one[semi]=%3B", + "one[dot]=.,one[semi]=%3B,two[comma]=%2C", + "one[semi]=%3B,two[comma]=%2C,one[dot]=.", + "one[semi]=%3B,one[dot]=.,two[comma]=%2C" + ]], + ["{?dicts[]}", [ + "?two[comma]=%2C&one[dot]=.&one[semi]=%3B", + "?two[comma]=%2C&one[semi]=%3B&one[dot]=.", + "?one[dot]=.&two[comma]=%2C&one[semi]=%3B", + "?one[dot]=.&one[semi]=%3B&two[comma]=%2C", + "?one[semi]=%3B&two[comma]=%2C&one[dot]=.", + "?one[semi]=%3B&one[dot]=.&two[comma]=%2C" + ]], + ["{mixed[]}", [ + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[two][comma]=%2C,dict[one][dot]=.,dict[one][semi]=%3B", + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[two][comma]=%2C,dict[one][semi]=%3B,dict[one][dot]=.", + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[one][dot]=.,dict[two][comma]=%2C,dict[one][semi]=%3B", + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[one][dot]=.,dict[one][semi]=%3B,dict[two][comma]=%2C", + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[one][semi]=%3B,dict[two][comma]=%2C,dict[one][dot]=.", + "list[0]=one,list[1][0]=two,list[1][1]=three,dict[one][semi]=%3B,dict[one][dot]=.,dict[two][comma]=%2C" + ]], + ["{?mixed[]}", [ + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[two][comma]=%2C&dict[one][dot]=.&dict[one][semi]=%3B", + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[two][comma]=%2C&dict[one][semi]=%3B&dict[one][dot]=.", + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[one][dot]=.&dict[two][comma]=%2C&dict[one][semi]=%3B", + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[one][dot]=.&dict[one][semi]=%3B&dict[two][comma]=%2C", + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[one][semi]=%3B&dict[two][comma]=%2C&dict[one][dot]=.", + "?list[0]=one&list[1][0]=two&list[1][1]=three&dict[one][semi]=%3B&dict[one][dot]=.&dict[two][comma]=%2C" + ]], + ["{dlist[]}", [ + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,dot=.,comma=%2C" + ]], + ["{?dlist[]}", [ + "?dlist[0][dot]=.&dlist[0][semi]=%3B&dlist[1][comma]=%2C", + "?dlist[0][semi]=%3B&dlist[0][dot]=.&dlist[1][comma]=%2C" + ]] + ] + } +} |