mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Update web-platform-tests to revision 56ac936e7ad12aa22ecf12e43d560a8039522677
This commit is contained in:
parent
6757f22bb2
commit
e89aad0a30
78 changed files with 806 additions and 246 deletions
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[box-shadow-table-border-collapse-001.html]
|
||||
expected: FAIL
|
|
@ -2,3 +2,6 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[elementsFromPoint-invalid-cases.html]
|
||||
[The root element is the last element returned for otherwise empty queries within the viewport]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -312,9 +312,6 @@
|
|||
[Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -324,9 +321,15 @@
|
|||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
[separate text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,9 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_4.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.pattern.transform.identity.html]
|
||||
[Canvas test: 2d.pattern.transform.identity]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.pattern.transform.infinity.html]
|
||||
[Canvas test: 2d.pattern.transform.infinity]
|
||||
expected: FAIL
|
||||
|
|
@ -171,6 +171,3 @@
|
|||
[XHTML img usemap="#hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-1.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -24013,6 +24013,50 @@
|
|||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"reftest_mismatch-print.html": [
|
||||
"5fd4a7f52a81cfedf6068809609aae6067f7e176",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/infrastructure/reftest/reftest_match-print-ref.html",
|
||||
"!="
|
||||
]
|
||||
],
|
||||
{
|
||||
"page_ranges": {
|
||||
"/infrastructure/reftest/reftest_match-print-ref.html": [
|
||||
[
|
||||
1,
|
||||
2
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"reftest_mismatch_fail-print.html": [
|
||||
"afec2ef51f31eb37cda3ae58d20b96775094a5bb",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/infrastructure/reftest/reftest_match-print-ref.html",
|
||||
"!="
|
||||
]
|
||||
],
|
||||
{
|
||||
"page_ranges": {
|
||||
"/infrastructure/reftest/reftest_match-print-ref.html": [
|
||||
[
|
||||
1,
|
||||
2
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -122984,6 +123028,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"box-shadow-table-border-collapse-001.html": [
|
||||
"a4413ee97ffa0816294700a60f2f82e37d3762f0",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-backgrounds/reference/box-shadow-table-border-collapse-001-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"child-move-reveals-parent-background.html": [
|
||||
"e369eccd07f3c7c4146b1a419d5b110ff6d0eb7c",
|
||||
[
|
||||
|
@ -289652,6 +289709,10 @@
|
|||
"2bca4c6961b88faaafb8d621ca222faee48256ef",
|
||||
[]
|
||||
],
|
||||
"box-shadow-table-border-collapse-001-ref.html": [
|
||||
"fb2734a7c1a21a76f262703c9b6e3078ff3eae1d",
|
||||
[]
|
||||
],
|
||||
"css-border-radius-ref-001.html": [
|
||||
"b89f2853263b3771fa12bafb04a91a243a15226f",
|
||||
[]
|
||||
|
@ -320051,7 +320112,7 @@
|
|||
[]
|
||||
],
|
||||
"echo-policy.py": [
|
||||
"52a2bf97124f0e6f3ff05fcc693c751f1cd0fca0",
|
||||
"2ad326dac72925cb40cdf55c9773982a9387090a",
|
||||
[]
|
||||
],
|
||||
"experimental-features": {
|
||||
|
@ -320282,7 +320343,7 @@
|
|||
},
|
||||
"support": {
|
||||
"contenttype_setter.py": [
|
||||
"02eff653ccf9c3923cc2e070d249050d77da3e87",
|
||||
"c4b1f8df27c1ef03ecbe7b6e8d4e238d8997248b",
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
@ -320357,7 +320418,7 @@
|
|||
[]
|
||||
],
|
||||
"generate.py": [
|
||||
"811413dbe2dfdcfec2c07bc09bdd7763c71b755a",
|
||||
"a0bca546c75fdba873b5a99d2e593acdda2e5499",
|
||||
[]
|
||||
],
|
||||
"mathml.html": [
|
||||
|
@ -320518,7 +320579,7 @@
|
|||
[]
|
||||
],
|
||||
"encoding.py": [
|
||||
"5f889e8db2a55cdfd23b0083a45a147a9fb87ab2",
|
||||
"281aa0bce49162465f4a011fa50b8bbe831e213b",
|
||||
[]
|
||||
],
|
||||
"getElementsByClassNameFrame.htm": [
|
||||
|
@ -326965,7 +327026,7 @@
|
|||
[]
|
||||
],
|
||||
"spec.yaml": [
|
||||
"be86c7fb6e1cfb780579345b577b990e4076b47a",
|
||||
"d4b1840a69f7f3406f77735350aabcd97fa836d3",
|
||||
[]
|
||||
],
|
||||
"specextract.py": [
|
||||
|
@ -327003,7 +327064,7 @@
|
|||
[]
|
||||
],
|
||||
"fill-and-stroke-styles.yaml": [
|
||||
"1483cadd44229493d89fc5c44a0c0da6e4ad6eb0",
|
||||
"d05ae0911bd8f97c90e16ef2376235f67de3f553",
|
||||
[]
|
||||
],
|
||||
"line-styles.yaml": [
|
||||
|
@ -336387,7 +336448,7 @@
|
|||
},
|
||||
"tools": {
|
||||
"format_json.py": [
|
||||
"2808a37906e0f2191a246ccbf1396a92fc1dd442",
|
||||
"1059ac793aaf2fb5ee875ed9d7e8a02c0040be9e",
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
@ -336416,7 +336477,7 @@
|
|||
]
|
||||
},
|
||||
"static-import.py": [
|
||||
"8d0f5d9f4204384ec9612ddca3ec30cec017d14e",
|
||||
"68583be13c42d88481dd0e9d058bae3ab7eb3995",
|
||||
[]
|
||||
]
|
||||
},
|
||||
|
@ -336637,6 +336698,10 @@
|
|||
"f3dc3362fac41bbe8ded44589e898ef589cb1a89",
|
||||
[]
|
||||
],
|
||||
"reftest_mismatch_fail-print.html.ini": [
|
||||
"4520f4cbb11e8f47b7d01bba004099dd735b7c0c",
|
||||
[]
|
||||
],
|
||||
"reftest_mismatch_fail.html.ini": [
|
||||
"1055337e2d65cb8f21d2ceac62e35ce7bb99a976",
|
||||
[]
|
||||
|
@ -347832,7 +347897,7 @@
|
|||
[]
|
||||
],
|
||||
"item.py": [
|
||||
"5528e0995a8fd97914195d847662595470699058",
|
||||
"e232925ed635c6984bcc8d0200229ffceaa2aa47",
|
||||
[]
|
||||
],
|
||||
"log.py": [
|
||||
|
@ -347844,7 +347909,7 @@
|
|||
[]
|
||||
],
|
||||
"sourcefile.py": [
|
||||
"2a35400afe4d083bebfa181575acb3b503ad89bc",
|
||||
"524eb0bddb255fbb8847aa4b064a105657418e85",
|
||||
[]
|
||||
],
|
||||
"testpaths.py": [
|
||||
|
@ -347869,7 +347934,7 @@
|
|||
[]
|
||||
],
|
||||
"test_sourcefile.py": [
|
||||
"301c624b06d3b268bebba03909d482cad5734024",
|
||||
"b4ba4638708cadf8a65c7a3decc964791a041dec",
|
||||
[]
|
||||
],
|
||||
"test_utils.py": [
|
||||
|
@ -354222,7 +354287,7 @@
|
|||
[]
|
||||
],
|
||||
"firefox.py": [
|
||||
"f36b429897073785a02234c4fdefe76d537aecc5",
|
||||
"8ffe82c662b8b1a2b28c32f967e933d23e9b053d",
|
||||
[]
|
||||
],
|
||||
"firefox_android.py": [
|
||||
|
@ -354290,11 +354355,11 @@
|
|||
[]
|
||||
],
|
||||
"base.py": [
|
||||
"d803141b08d8789231242aeb929f30b02bdeb50c",
|
||||
"82496fcad9c9d46dbf04b81fbf60b2e1dcdd1045",
|
||||
[]
|
||||
],
|
||||
"executorchrome.py": [
|
||||
"9c3aad3f64a6cc16059cf65ab9e0d29a5221b8f1",
|
||||
"3ae318795f0b62468a6a8a991fa07b2a78e2743b",
|
||||
[]
|
||||
],
|
||||
"executoredge.py": [
|
||||
|
@ -354310,7 +354375,7 @@
|
|||
[]
|
||||
],
|
||||
"executormarionette.py": [
|
||||
"006c93fc06d0f7339a3bc1d1ef35f3e9e8fd748c",
|
||||
"05223d374feb7bfeea1321d2ec8fbd99fa9fddb7",
|
||||
[]
|
||||
],
|
||||
"executoropera.py": [
|
||||
|
@ -354322,19 +354387,19 @@
|
|||
[]
|
||||
],
|
||||
"executorselenium.py": [
|
||||
"b12299c1ff1914a1e5ef39779e5e1d95822bd158",
|
||||
"ec7b8fcf189c9486e202b66007476e5dbd621f5c",
|
||||
[]
|
||||
],
|
||||
"executorservo.py": [
|
||||
"54b366485efb0f7683683034a2b2c6dd18a150cd",
|
||||
"efe93abc69c7009e22575fc59753917cadf1ce25",
|
||||
[]
|
||||
],
|
||||
"executorservodriver.py": [
|
||||
"0680c4ed2299035146c2b1e478f4b3fa1c301101",
|
||||
"071b506f9af90f7ea46e28ae8814a83996ed9f4a",
|
||||
[]
|
||||
],
|
||||
"executorwebdriver.py": [
|
||||
"ea26fbcd20dda44f13bb500e10bb059c262bc4da",
|
||||
"2b3d53d7445706ae3ab601c42e2f17496f6868db",
|
||||
[]
|
||||
],
|
||||
"executorwebkit.py": [
|
||||
|
@ -354512,7 +354577,7 @@
|
|||
]
|
||||
},
|
||||
"test_executors.py": [
|
||||
"a00554e478fdc6d4fd0bdc2a7b740e1e468164fb",
|
||||
"3573683de39c974e59f2e81ae746af04b73a3324",
|
||||
[]
|
||||
],
|
||||
"test_expectedtree.py": [
|
||||
|
@ -354661,7 +354726,7 @@
|
|||
[]
|
||||
],
|
||||
"wpttest.py": [
|
||||
"1078912a229bec1bbac0b2f781b9e8ef95b4ee1c",
|
||||
"3750defa6a13de88d4e73f485b51b069db085c4b",
|
||||
[]
|
||||
]
|
||||
},
|
||||
|
@ -428638,7 +428703,7 @@
|
|||
]
|
||||
],
|
||||
"feature-policy-header-policy-disallowed-for-all.https.sub.html": [
|
||||
"9a0f483ce44bc382fe12caaa6670838fa98d4209",
|
||||
"971af0fa070d9ad40fd4f693500c38b8c85af0ef",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -439182,6 +439247,27 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"2d.pattern.transform.identity.html": [
|
||||
"56a44df86bd3564da34c09e445b73ff290f03870",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.pattern.transform.infinity.html": [
|
||||
"d298d70c3505a7b09b7b4a1f802555d30ab4b7e5",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.pattern.transform.invalid.html": [
|
||||
"ebd2801241cee67eda8eacf9d2fa789e60821ec6",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.strokeStyle.default.html": [
|
||||
"91542e2892b47d323ff91ff28edb25721e9014bc",
|
||||
[
|
||||
|
@ -473100,7 +473186,7 @@
|
|||
]
|
||||
],
|
||||
"idlharness.html": [
|
||||
"a3b2d1e1c63726c6ef795954af08d2a9409835f1",
|
||||
"ea6efb27f8f41862830b9470b79bb85a331474b6",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -517895,7 +517981,7 @@
|
|||
]
|
||||
],
|
||||
"no-dezippering.html": [
|
||||
"3f8360417dd9818ffa77b4da286b5d32694b27d2",
|
||||
"ccca103a3bc8583efb101048efb580fe21708ee3",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[box-shadow-table-border-collapse-001.html]
|
||||
expected: FAIL
|
|
@ -2,3 +2,6 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[elementsFromPoint-invalid-cases.html]
|
||||
[The root element is the last element returned for otherwise empty queries within the viewport]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -312,9 +312,6 @@
|
|||
[fetch(): separate response Content-Type: text/plain ]
|
||||
expected: NOTRUN
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -324,9 +321,15 @@
|
|||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,6 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
[separate text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,9 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_4.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.pattern.transform.identity.html]
|
||||
[Canvas test: 2d.pattern.transform.identity]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.pattern.transform.infinity.html]
|
||||
[Canvas test: 2d.pattern.transform.infinity]
|
||||
expected: FAIL
|
||||
|
|
@ -172,6 +172,3 @@
|
|||
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Box-shadow Test: an HTML <table> with 'border-collapse: collapse'</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#shadow-layers">
|
||||
<link rel="match" href="reference/box-shadow-table-border-collapse-001-ref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
|
||||
<!--
|
||||
|
||||
created: 2017
|
||||
modified: May 23rd 2020
|
||||
|
||||
Bug 1050297: Box-shadow of a table disappears when its border-collapse is set to collapse
|
||||
https://connect.microsoft.com/IE/Feedback/Details/1050297
|
||||
|
||||
Sky6t user page at wikipedia
|
||||
https://en.wikipedia.org/wiki/User:Sky6t/sandbox#Tables
|
||||
|
||||
-->
|
||||
|
||||
<meta content="" name="flags">
|
||||
<meta content="This test checks that 'box-shadow' applies to table element with 'border-collapse' set to 'collapse' as long as row borders do not have different border thicknesses. In this test, the left border of both table rows have the same thickness (30px) and the right border of both table rows have the same thickness (30px)." name="assert">
|
||||
|
||||
<style>
|
||||
table
|
||||
{
|
||||
border: red solid 29px;
|
||||
border-collapse: collapse;
|
||||
box-shadow: 20px 20px darkgray;
|
||||
color: orange;
|
||||
font-family: Ahem;
|
||||
font-size: 50px;
|
||||
line-height: 1;
|
||||
table-layout: fixed;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
tr
|
||||
{
|
||||
border-color: blue;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
tr#top-row
|
||||
{
|
||||
|
||||
border-width: 30px 30px 0px;
|
||||
}
|
||||
|
||||
tr#bottom-row
|
||||
{
|
||||
border-width: 0px 30px 30px;
|
||||
}
|
||||
|
||||
td
|
||||
{
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled orange square with a thick blue border and if such square has a gray outer shadow at its bottom and at its right side.
|
||||
|
||||
<table>
|
||||
|
||||
<tr id="top-row"><td>1<td>2
|
||||
|
||||
<tr id="bottom-row"><td>3<td>4
|
||||
|
||||
</table>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Reference Test</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
|
||||
<style>
|
||||
div
|
||||
{
|
||||
background-color: orange;
|
||||
border: blue solid 30px;
|
||||
box-shadow: 20px 20px darkgray;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled orange square with a thick blue border and if such square has a gray outer shadow at its bottom and at its right side.
|
||||
|
||||
<div></div>
|
|
@ -4,25 +4,27 @@
|
|||
# policy.)
|
||||
import json
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
msg = {}
|
||||
headers = [('Content-Type', 'text/html')]
|
||||
headers = [(b'Content-Type', b'text/html')]
|
||||
|
||||
srdp = request.headers.get('Sec-Required-Document-Policy')
|
||||
srdp = request.headers.get(b'Sec-Required-Document-Policy')
|
||||
if srdp:
|
||||
msg['requiredPolicy'] = srdp
|
||||
headers.append(('Document-Policy', srdp))
|
||||
msg[u'requiredPolicy'] = isomorphic_decode(srdp)
|
||||
headers.append((b'Document-Policy', srdp))
|
||||
|
||||
frameId = request.GET.first('id',None)
|
||||
frameId = request.GET.first(b'id',None)
|
||||
if frameId:
|
||||
msg['id'] = frameId
|
||||
msg[u'id'] = isomorphic_decode(frameId)
|
||||
|
||||
content = """<!DOCTYPE html>
|
||||
content = u"""<!DOCTYPE html>
|
||||
<script>
|
||||
top.postMessage(%s, "*");
|
||||
</script>
|
||||
%s
|
||||
""" % (json.dumps(msg), srdp)
|
||||
""" % (json.dumps(msg), isomorphic_decode(srdp) if srdp != None else srdp)
|
||||
|
||||
return (200, 'OK'), headers, content
|
||||
return (200, u'OK'), headers, content
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
def main(request, response):
|
||||
type = request.GET.first("type", None)
|
||||
subtype = request.GET.first("subtype", None)
|
||||
type = request.GET.first(b"type", None)
|
||||
subtype = request.GET.first(b"subtype", None)
|
||||
if type and subtype:
|
||||
response.headers["Content-Type"] = type + "/" + subtype
|
||||
response.headers[b"Content-Type"] = type + b"/" + subtype
|
||||
|
||||
removeContentType = request.GET.first("removeContentType", None)
|
||||
removeContentType = request.GET.first(b"removeContentType", None)
|
||||
if removeContentType:
|
||||
try:
|
||||
del response.headers["Content-Type"]
|
||||
del response.headers[b"Content-Type"]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
content = '<head>'
|
||||
mimeHead = request.GET.first("mime", None);
|
||||
content = b'<head>'
|
||||
mimeHead = request.GET.first(b"mime", None);
|
||||
if mimeHead:
|
||||
content += '<meta http-equiv="Content-Type" content="%s; charset=utf-8"/>' % mimeHead
|
||||
content += "</head>"
|
||||
content += b'<meta http-equiv="Content-Type" content="%s; charset=utf-8"/>' % mimeHead
|
||||
content += b"</head>"
|
||||
|
||||
return content
|
||||
|
|
|
@ -5,25 +5,25 @@ from __future__ import print_function
|
|||
import os
|
||||
import sys
|
||||
|
||||
THIS_NAME = "generate.py"
|
||||
THIS_NAME = u"generate.py"
|
||||
|
||||
# Note: these lists must be kept in sync with the lists in
|
||||
# Document-createElement-namespace.html, and this script must be run whenever
|
||||
# the lists are updated. (We could keep the lists in a shared JSON file, but
|
||||
# seems like too much effort.)
|
||||
FILES = (
|
||||
("empty", ""),
|
||||
("minimal_html", "<!doctype html><title></title>"),
|
||||
(u"empty", u""),
|
||||
(u"minimal_html", u"<!doctype html><title></title>"),
|
||||
|
||||
("xhtml", '<html xmlns="http://www.w3.org/1999/xhtml"></html>'),
|
||||
("svg", '<svg xmlns="http://www.w3.org/2000/svg"></svg>'),
|
||||
("mathml", '<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>'),
|
||||
(u"xhtml", u'<html xmlns="http://www.w3.org/1999/xhtml"></html>'),
|
||||
(u"svg", u'<svg xmlns="http://www.w3.org/2000/svg"></svg>'),
|
||||
(u"mathml", u'<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>'),
|
||||
|
||||
("bare_xhtml", "<html></html>"),
|
||||
("bare_svg", "<svg></svg>"),
|
||||
("bare_mathml", "<math></math>"),
|
||||
(u"bare_xhtml", u"<html></html>"),
|
||||
(u"bare_svg", u"<svg></svg>"),
|
||||
(u"bare_mathml", u"<math></math>"),
|
||||
|
||||
("xhtml_ns_removed", """\
|
||||
(u"xhtml_ns_removed", u"""\
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><script>
|
||||
var newRoot = document.createElementNS(null, "html");
|
||||
|
@ -32,7 +32,7 @@ FILES = (
|
|||
</script></head>
|
||||
</html>
|
||||
"""),
|
||||
("xhtml_ns_changed", """\
|
||||
(u"xhtml_ns_changed", u"""\
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><script>
|
||||
var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc");
|
||||
|
@ -44,36 +44,36 @@ FILES = (
|
|||
)
|
||||
|
||||
EXTENSIONS = (
|
||||
"html",
|
||||
"xhtml",
|
||||
"xml",
|
||||
"svg",
|
||||
u"html",
|
||||
u"xhtml",
|
||||
u"xml",
|
||||
u"svg",
|
||||
# Was not able to get server MIME type working properly :(
|
||||
#"mml",
|
||||
)
|
||||
|
||||
def __main__():
|
||||
if len(sys.argv) > 1:
|
||||
print("No arguments expected, aborting")
|
||||
print(u"No arguments expected, aborting")
|
||||
return
|
||||
|
||||
if not os.access(THIS_NAME, os.F_OK):
|
||||
print("Must be run from the directory of " + THIS_NAME + ", aborting")
|
||||
print(u"Must be run from the directory of " + THIS_NAME + u", aborting")
|
||||
return
|
||||
|
||||
for name in os.listdir("."):
|
||||
for name in os.listdir(u"."):
|
||||
if name == THIS_NAME:
|
||||
continue
|
||||
os.remove(name)
|
||||
|
||||
manifest = open("MANIFEST", "w")
|
||||
manifest = open(u"MANIFEST", u"w")
|
||||
|
||||
for name, contents in FILES:
|
||||
for extension in EXTENSIONS:
|
||||
f = open(name + "." + extension, "w")
|
||||
f = open(name + u"." + extension, u"w")
|
||||
f.write(contents)
|
||||
f.close()
|
||||
manifest.write("support " + name + "." + extension + "\n")
|
||||
manifest.write(u"support " + name + u"." + extension + u"\n")
|
||||
|
||||
manifest.close()
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
from cgi import escape
|
||||
try:
|
||||
from cgi import escape
|
||||
except ImportError:
|
||||
from html import escape
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
label = request.GET.first('label')
|
||||
return """<!doctype html><meta charset="%s">""" % escape(label)
|
||||
label = request.GET.first(b'label')
|
||||
return u"""<!doctype html><meta charset="%s">""" % escape(isomorphic_decode(label))
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
assert_array_equals(
|
||||
document.featurePolicy.getAllowlistForFeature('fullscreen'),
|
||||
[]);
|
||||
assert_false(document.fullscreenEnabled, "fullscreenEnabled should reflect feature policy properly");
|
||||
}, header_policy + ' -- test allowlist is []');
|
||||
|
||||
// Test that fullscreen is disallowed on all subframes.
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.pattern.transform.identity</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/html/canvas/resources/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>2d.pattern.transform.identity</h1>
|
||||
<p class="desc"></p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
|
||||
<ul id="d"></ul>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
pattern.setTransform(new DOMMatrix());
|
||||
|
||||
ctx.fillStyle = '#0f0';
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
|
||||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
|
||||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
|
||||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
|
||||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.pattern.transform.infinity</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/html/canvas/resources/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>2d.pattern.transform.infinity</h1>
|
||||
<p class="desc"></p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
|
||||
<ul id="d"></ul>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
pattern.setTransform({a: Infinity});
|
||||
|
||||
ctx.fillStyle = '#0f0';
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
|
||||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
|
||||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255");
|
||||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");
|
||||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255");
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.pattern.transform.invalid</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/html/canvas/resources/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>2d.pattern.transform.invalid</h1>
|
||||
<p class="desc"></p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<script>
|
||||
var t = async_test("");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
assert_throws_js(TypeError, function() { pattern.setTransform({a: 1, m11: 2}); });
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -269,6 +269,8 @@ assertions:
|
|||
|
||||
- id: 2d.pattern.modify
|
||||
text: "Modifying this image after calling the createPattern() method *must* not affect the pattern<^>."
|
||||
- id: 2d.pattern.transform
|
||||
text: "The setTransform(transform) method, when invoked, must run these steps:"
|
||||
- id: 2d.pattern.missing
|
||||
text: "If the empty string is specified, repeat *must* be assumed<^>."
|
||||
- id: 2d.pattern.unrecognised
|
||||
|
|
|
@ -1284,6 +1284,60 @@
|
|||
@assert pixel 98,48 == 0,255,0,255;
|
||||
expected: green
|
||||
|
||||
- name: 2d.pattern.transform.identity
|
||||
testing:
|
||||
- 2d.pattern.transform
|
||||
code: |
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
pattern.setTransform(new DOMMatrix());
|
||||
|
||||
ctx.fillStyle = '#0f0';
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
|
||||
@assert pixel 1,1 == 0,255,0,255;
|
||||
@assert pixel 98,1 == 0,255,0,255;
|
||||
@assert pixel 1,48 == 0,255,0,255;
|
||||
@assert pixel 98,48 == 0,255,0,255;
|
||||
expected: green
|
||||
|
||||
- name: 2d.pattern.transform.infinity
|
||||
testing:
|
||||
- 2d.pattern.transform
|
||||
code: |
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
pattern.setTransform({a: Infinity});
|
||||
|
||||
ctx.fillStyle = '#0f0';
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
|
||||
@assert pixel 1,1 == 0,255,0,255;
|
||||
@assert pixel 98,1 == 0,255,0,255;
|
||||
@assert pixel 1,48 == 0,255,0,255;
|
||||
@assert pixel 98,48 == 0,255,0,255;
|
||||
expected: green
|
||||
|
||||
- name: 2d.pattern.transform.invalid
|
||||
testing:
|
||||
- 2d.pattern.transform
|
||||
code: |
|
||||
var canvas2 = document.createElement('canvas');
|
||||
canvas2.width = 100;
|
||||
canvas2.height = 50;
|
||||
var pattern = ctx.createPattern(canvas2, 'no-repeat');
|
||||
@assert throws TypeError pattern.setTransform({a: 1, m11: 2});
|
||||
|
||||
- name: 2d.pattern.image.undefined
|
||||
testing:
|
||||
- 2d.pattern.IDL
|
||||
|
|
|
@ -15,10 +15,10 @@ def main():
|
|||
print filename
|
||||
try:
|
||||
spec = json.load(
|
||||
open(filename, 'r'), object_pairs_hook=collections.OrderedDict)
|
||||
with open(filename, 'w') as f:
|
||||
f.write(json.dumps(spec, indent=2, separators=(',', ': ')))
|
||||
f.write('\n')
|
||||
open(filename, u'r'), object_pairs_hook=collections.OrderedDict)
|
||||
with open(filename, u'w') as f:
|
||||
f.write(json.dumps(spec, indent=2, separators=(u',', u': ')))
|
||||
f.write(u'\n')
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
return (
|
||||
(('Content-Type', 'text/javascript'),),
|
||||
'import "{}";\n'.format(request.GET.first('url'))
|
||||
((b'Content-Type', b'text/javascript'),),
|
||||
u'import "{}";\n'.format(isomorphic_decode(request.GET.first(b'url')))
|
||||
)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[reftest_mismatch_fail-print.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,13 @@
|
|||
<title>rel=mismatch that should PASS</title>
|
||||
<link rel=mismatch href=reftest_match-print-ref.html>
|
||||
<meta name="reftest-pages" content="reftest_match-print-ref.html:1-2">
|
||||
<style>
|
||||
* {margin: 0; padding:0}
|
||||
div {page-break-after: always;}
|
||||
</style>
|
||||
<div>
|
||||
page 1
|
||||
</div>
|
||||
<div>
|
||||
page 3
|
||||
</div>
|
|
@ -0,0 +1,13 @@
|
|||
<title>rel=mismatch that should FAIL</title>
|
||||
<link rel=mismatch href=reftest_match-print-ref.html>
|
||||
<meta name="reftest-pages" content="reftest_match-print-ref.html:1-2">
|
||||
<style>
|
||||
* {margin: 0; padding:0}
|
||||
div {page-break-after: always;}
|
||||
</style>
|
||||
<div>
|
||||
page 1
|
||||
</div>
|
||||
<div>
|
||||
page 2
|
||||
</div>
|
|
@ -6,6 +6,7 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
<script src="resources/util.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
|
@ -27,6 +28,10 @@ idl_test(
|
|||
return;
|
||||
}
|
||||
|
||||
// Make sure that the image has initially been laid out, so that the movement
|
||||
// later is counted as a layout shift.
|
||||
await waitForAnimationFrames(2);
|
||||
|
||||
self.layoutShift = await new Promise((resolve, reject) => {
|
||||
const observer = new PerformanceObserver(entryList => {
|
||||
resolve(entryList.getEntries()[0]);
|
||||
|
|
|
@ -21,6 +21,7 @@ if MYPY:
|
|||
from typing import Hashable
|
||||
from .manifest import Manifest
|
||||
Fuzzy = Dict[Optional[Tuple[Text, Text, Text]], List[int]]
|
||||
PageRanges = Dict[Text, List[int]]
|
||||
|
||||
item_types = {} # type: Dict[str, Type[ManifestItem]]
|
||||
|
||||
|
@ -307,6 +308,17 @@ class PrintRefTest(RefTest):
|
|||
|
||||
item_type = "print-reftest"
|
||||
|
||||
@property
|
||||
def page_ranges(self):
|
||||
# type: () -> PageRanges
|
||||
return self._extras.get("page_ranges", {})
|
||||
|
||||
def to_json(self): # type: ignore
|
||||
rv = super(PrintRefTest, self).to_json()
|
||||
if self.page_ranges:
|
||||
rv[-1]["page_ranges"] = self.page_ranges
|
||||
return rv
|
||||
|
||||
|
||||
class ManualTest(URLManifestItem):
|
||||
__slots__ = ()
|
||||
|
|
|
@ -414,7 +414,8 @@ class SourceFile(object):
|
|||
@property
|
||||
def name_is_crashtest(self):
|
||||
# type: () -> bool
|
||||
return self.type_flag == "crash" or "crashtests" in self.dir_path.split(os.path.sep)
|
||||
return (self.markup_type is not None and
|
||||
(self.type_flag == "crash" or "crashtests" in self.dir_path.split(os.path.sep)))
|
||||
|
||||
@property
|
||||
def name_is_tentative(self):
|
||||
|
@ -428,7 +429,8 @@ class SourceFile(object):
|
|||
@property
|
||||
def name_is_print_reftest(self):
|
||||
# type: () -> bool
|
||||
return self.type_flag == "print" or "print" in self.dir_path.split(os.path.sep)
|
||||
return (self.markup_type is not None and
|
||||
(self.type_flag == "print" or "print" in self.dir_path.split(os.path.sep)))
|
||||
|
||||
@property
|
||||
def markup_type(self):
|
||||
|
@ -552,6 +554,29 @@ class SourceFile(object):
|
|||
|
||||
return self.dpi_nodes[0].attrib.get("content", None)
|
||||
|
||||
def parse_ref_keyed_meta(self, node):
|
||||
# type: (ElementTree.Element) -> Tuple[Optional[Tuple[Text, Text, Text]], Text]
|
||||
item = node.attrib.get(u"content", u"") # type: Text
|
||||
|
||||
parts = item.rsplit(u":", 1)
|
||||
if len(parts) == 1:
|
||||
key = None # type: Optional[Tuple[Text, Text, Text]]
|
||||
value = parts[0]
|
||||
else:
|
||||
key_part = urljoin(self.url, parts[0])
|
||||
reftype = None
|
||||
for ref in self.references: # type: Tuple[Text, Text]
|
||||
if ref[0] == key_part:
|
||||
reftype = ref[1]
|
||||
break
|
||||
if reftype not in (u"==", u"!="):
|
||||
raise ValueError("Key %s doesn't correspond to a reference" % key_part)
|
||||
key = (self.url, key_part, reftype)
|
||||
value = parts[1]
|
||||
|
||||
return key, value
|
||||
|
||||
|
||||
@cached_property
|
||||
def fuzzy_nodes(self):
|
||||
# type: () -> List[ElementTree.Element]
|
||||
|
@ -560,6 +585,7 @@ class SourceFile(object):
|
|||
assert self.root is not None
|
||||
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='fuzzy']")
|
||||
|
||||
|
||||
@cached_property
|
||||
def fuzzy(self):
|
||||
# type: () -> Dict[Optional[Tuple[Text, Text, Text]], List[List[int]]]
|
||||
|
@ -573,26 +599,10 @@ class SourceFile(object):
|
|||
args = [u"maxDifference", u"totalPixels"]
|
||||
|
||||
for node in self.fuzzy_nodes:
|
||||
item = node.attrib.get(u"content", u"") # type: Text
|
||||
|
||||
parts = item.rsplit(u":", 1)
|
||||
if len(parts) == 1:
|
||||
key = None # type: Optional[Tuple[Text, Text, Text]]
|
||||
value = parts[0]
|
||||
else:
|
||||
key_part = urljoin(self.url, parts[0])
|
||||
reftype = None
|
||||
for ref in self.references: # type: Tuple[Text, Text]
|
||||
if ref[0] == key_part:
|
||||
reftype = ref[1]
|
||||
break
|
||||
if reftype not in (u"==", u"!="):
|
||||
raise ValueError("Fuzzy key %s doesn't correspond to a references" % key_part)
|
||||
key = (self.url, key_part, reftype)
|
||||
value = parts[1]
|
||||
key, value = self.parse_ref_keyed_meta(node)
|
||||
ranges = value.split(u";")
|
||||
if len(ranges) != 2:
|
||||
raise ValueError("Malformed fuzzy value %s" % item)
|
||||
raise ValueError("Malformed fuzzy value %s" % value)
|
||||
arg_values = {} # type: Dict[Text, List[int]]
|
||||
positional_args = deque() # type: Deque[List[int]]
|
||||
for range_str_value in ranges: # type: Text
|
||||
|
@ -628,6 +638,48 @@ class SourceFile(object):
|
|||
assert len(arg_values) == 0 and len(positional_args) == 0
|
||||
return rv
|
||||
|
||||
@cached_property
|
||||
def page_ranges_nodes(self):
|
||||
# type: () -> List[ElementTree.Element]
|
||||
"""List of ElementTree Elements corresponding to nodes in a test that
|
||||
specify print-reftest """
|
||||
assert self.root is not None
|
||||
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='reftest-pages']")
|
||||
|
||||
@cached_property
|
||||
def page_ranges(self):
|
||||
# type: () -> Dict[Text, List[List[Optional[int]]]]
|
||||
"""List of ElementTree Elements corresponding to nodes in a test that
|
||||
specify print-reftest page ranges"""
|
||||
rv = {} # type: Dict[Text, List[List[Optional[int]]]]
|
||||
for node in self.page_ranges_nodes:
|
||||
key_data, value = self.parse_ref_keyed_meta(node)
|
||||
# Just key by url
|
||||
if key_data is None:
|
||||
key = self.url
|
||||
else:
|
||||
key = key_data[1]
|
||||
if key in rv:
|
||||
raise ValueError("Duplicate page-ranges value")
|
||||
rv[key] = []
|
||||
for range_str in value.split(","):
|
||||
range_str = range_str.strip()
|
||||
if "-" in range_str:
|
||||
range_parts_str = [item.strip() for item in range_str.split("-")]
|
||||
try:
|
||||
range_parts = [int(item) if item else None for item in range_parts_str]
|
||||
except ValueError:
|
||||
raise ValueError("Malformed page-range value %s" % range_str)
|
||||
if any(item == 0 for item in range_parts):
|
||||
raise ValueError("Malformed page-range value %s" % range_str)
|
||||
else:
|
||||
try:
|
||||
range_parts = [int(range_str)]
|
||||
except ValueError:
|
||||
raise ValueError("Malformed page-range value %s" % range_str)
|
||||
rv[key].append(range_parts)
|
||||
return rv
|
||||
|
||||
@cached_property
|
||||
def testharness_nodes(self):
|
||||
# type: () -> List[ElementTree.Element]
|
||||
|
@ -908,6 +960,7 @@ class SourceFile(object):
|
|||
timeout=self.timeout,
|
||||
viewport_size=self.viewport_size,
|
||||
fuzzy=self.fuzzy,
|
||||
page_ranges=self.page_ranges,
|
||||
)]
|
||||
|
||||
elif self.name_is_multi_global:
|
||||
|
|
|
@ -876,6 +876,35 @@ def test_reftest_fuzzy_multi(fuzzy, expected):
|
|||
assert s.fuzzy == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize("page_ranges, expected", [
|
||||
(b"1-2", [[1, 2]]),
|
||||
(b"1-1,3-4", [[1, 1], [3, 4]]),
|
||||
(b"1,3", [[1], [3]]),
|
||||
(b"2-", [[2, None]]),
|
||||
(b"-2", [[None, 2]]),
|
||||
(b"-2,2-", [[None, 2], [2, None]]),
|
||||
(b"1,6-7,8", [[1], [6, 7], [8]])])
|
||||
def test_page_ranges(page_ranges, expected):
|
||||
content = b"""<link rel=match href=ref.html>
|
||||
<meta name=reftest-pages content="%s">
|
||||
""" % page_ranges
|
||||
|
||||
s = create("foo/test-print.html", content)
|
||||
|
||||
assert s.page_ranges == {"/foo/test-print.html": expected}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("page_ranges", [b"a", b"1-a", b"1=2", b"1-2:2-3"])
|
||||
def test_page_ranges_invalid(page_ranges):
|
||||
content = b"""<link rel=match href=ref.html>
|
||||
<meta name=reftest-pages content="%s">
|
||||
""" % page_ranges
|
||||
|
||||
s = create("foo/test-print.html", content)
|
||||
with pytest.raises(ValueError):
|
||||
s.page_ranges
|
||||
|
||||
|
||||
def test_hash():
|
||||
s = SourceFile("/", "foo", "/", contents=b"Hello, World!")
|
||||
assert "b45ef6fec89518d314f546fd6c3025367b721684" == s.hash
|
||||
|
|
|
@ -117,7 +117,7 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
|
|||
capabilities = {}
|
||||
if test_type == "testharness":
|
||||
capabilities["pageLoadStrategy"] = "eager"
|
||||
if test_type == "reftest":
|
||||
if test_type in ("reftest", "print-reftest"):
|
||||
executor_kwargs["reftest_internal"] = kwargs["reftest_internal"]
|
||||
executor_kwargs["reftest_screenshot"] = kwargs["reftest_screenshot"]
|
||||
if test_type == "wdspec":
|
||||
|
@ -592,9 +592,12 @@ class ProfileCreator(object):
|
|||
if self.enable_fission:
|
||||
profile.set_preferences({"fission.autostart": True})
|
||||
|
||||
if self.test_type == "reftest":
|
||||
if self.test_type in ("reftest", "print-reftest"):
|
||||
profile.set_preferences({"layout.interruptible-reflow.enabled": False})
|
||||
|
||||
if self.test_type == "print-reftest":
|
||||
profile.set_preferences({"print.always_print_silent": True})
|
||||
|
||||
# Bug 1262954: winxp + e10s, disable hwaccel
|
||||
if (self.e10s and platform.system() in ("Windows", "Microsoft") and
|
||||
"5.1" in platform.version()):
|
||||
|
|
|
@ -105,8 +105,7 @@ def _ensure_hash_in_reftest_screenshots(extra):
|
|||
def get_pages(ranges_value, total_pages):
|
||||
"""Get a set of page numbers to include in a print reftest.
|
||||
|
||||
:param ranges_value: String containing the range specifier from a meta element
|
||||
e.g. "1-2,4,6-"
|
||||
:param ranges_value: Parsed page ranges as a list e.g. [[1,2], [4], [6,None]]
|
||||
:param total_pages: Integer total number of pages in the paginated output.
|
||||
:retval: Set containing integer page numbers to include in the comparison e.g.
|
||||
for the example ranges value and 10 total pages this would be
|
||||
|
@ -114,36 +113,20 @@ def get_pages(ranges_value, total_pages):
|
|||
if not ranges_value:
|
||||
return set(range(1, total_pages + 1))
|
||||
|
||||
range_parts = [item.strip() for item in ranges_value.split(",")]
|
||||
|
||||
rv = set()
|
||||
for range_part in range_parts:
|
||||
if "-" not in range_part:
|
||||
try:
|
||||
part = int(range_part)
|
||||
except ValueError:
|
||||
raise ValueError("Page ranges must be either <int> or <int> '-' <int> (found %s)" % range_part)
|
||||
if part <= total_pages:
|
||||
rv.add(part)
|
||||
else:
|
||||
parts = [item.strip() for item in range_part.split("-")]
|
||||
if len(parts) != 2:
|
||||
raise ValueError("Page ranges must be either <int> or <int> '-' <int> (found %s)" % range_part)
|
||||
range_limits = []
|
||||
for part in parts:
|
||||
if part:
|
||||
try:
|
||||
range_limits.append(int(part))
|
||||
except ValueError:
|
||||
raise ValueError("Page ranges must be either <int> or <int> '-' <int> (found %s)" % range_part)
|
||||
else:
|
||||
if range_limits:
|
||||
range_limits.append(total_pages)
|
||||
else:
|
||||
range_limits.append(1)
|
||||
if range_limits[0] > total_pages:
|
||||
continue
|
||||
rv |= set(range(range_limits[0], range_limits[1] + 1))
|
||||
|
||||
for range_limits in ranges_value:
|
||||
if len(range_limits) == 1:
|
||||
range_limits = [range_limits[0], range_limits[0]]
|
||||
|
||||
if range_limits[0] is None:
|
||||
range_limits[0] = 1
|
||||
if range_limits[1] is None:
|
||||
range_limits[1] = total_pages
|
||||
|
||||
if range_limits[0] > total_pages:
|
||||
continue
|
||||
rv |= set(range(range_limits[0], range_limits[1] + 1))
|
||||
return rv
|
||||
|
||||
|
||||
|
@ -359,6 +342,7 @@ class TestharnessExecutor(TestExecutor):
|
|||
|
||||
class RefTestExecutor(TestExecutor):
|
||||
convert_result = reftest_result_converter
|
||||
is_print = False
|
||||
|
||||
def __init__(self, logger, browser, server_config, timeout_multiplier=1, screenshot_cache=None,
|
||||
debug_info=None, **kwargs):
|
||||
|
@ -375,6 +359,7 @@ class CrashtestExecutor(TestExecutor):
|
|||
|
||||
class PrintRefTestExecutor(TestExecutor):
|
||||
convert_result = reftest_result_converter
|
||||
is_print = True
|
||||
|
||||
|
||||
class RefTestImplementation(object):
|
||||
|
@ -398,11 +383,11 @@ class RefTestImplementation(object):
|
|||
def logger(self):
|
||||
return self.executor.logger
|
||||
|
||||
def get_hash(self, test, viewport_size, dpi):
|
||||
def get_hash(self, test, viewport_size, dpi, page_ranges):
|
||||
key = (test.url, viewport_size, dpi)
|
||||
|
||||
if key not in self.screenshot_cache:
|
||||
success, data = self.get_screenshot_list(test, viewport_size, dpi)
|
||||
success, data = self.get_screenshot_list(test, viewport_size, dpi, page_ranges)
|
||||
|
||||
if not success:
|
||||
return False, data
|
||||
|
@ -498,8 +483,10 @@ class RefTestImplementation(object):
|
|||
def run_test(self, test):
|
||||
viewport_size = test.viewport_size
|
||||
dpi = test.dpi
|
||||
page_ranges = test.page_ranges
|
||||
self.message = []
|
||||
|
||||
|
||||
# Depth-first search of reference tree, with the goal
|
||||
# of reachings a leaf node with only pass results
|
||||
|
||||
|
@ -514,7 +501,7 @@ class RefTestImplementation(object):
|
|||
fuzzy = self.get_fuzzy(test, nodes, relation)
|
||||
|
||||
for i, node in enumerate(nodes):
|
||||
success, data = self.get_hash(node, viewport_size, dpi)
|
||||
success, data = self.get_hash(node, viewport_size, dpi, page_ranges)
|
||||
if success is False:
|
||||
return {"status": data[0], "message": data[1]}
|
||||
|
||||
|
@ -538,7 +525,7 @@ class RefTestImplementation(object):
|
|||
page_idx = -1
|
||||
for i, (node, screenshot) in enumerate(zip(nodes, screenshots)):
|
||||
if screenshot is None:
|
||||
success, screenshot = self.retake_screenshot(node, viewport_size, dpi)
|
||||
success, screenshot = self.retake_screenshot(node, viewport_size, dpi, page_ranges)
|
||||
if success:
|
||||
screenshots[i] = screenshot
|
||||
|
||||
|
@ -575,8 +562,11 @@ class RefTestImplementation(object):
|
|||
break
|
||||
return value
|
||||
|
||||
def retake_screenshot(self, node, viewport_size, dpi):
|
||||
success, data = self.get_screenshot_list(node, viewport_size, dpi)
|
||||
def retake_screenshot(self, node, viewport_size, dpi, page_ranges):
|
||||
success, data = self.get_screenshot_list(node,
|
||||
viewport_size,
|
||||
dpi,
|
||||
page_ranges)
|
||||
if not success:
|
||||
return False, data
|
||||
|
||||
|
@ -585,8 +575,8 @@ class RefTestImplementation(object):
|
|||
self.screenshot_cache[key] = hash_val, data
|
||||
return True, data
|
||||
|
||||
def get_screenshot_list(self, node, viewport_size, dpi):
|
||||
success, data = self.executor.screenshot(node, viewport_size, dpi)
|
||||
def get_screenshot_list(self, node, viewport_size, dpi, page_ranges):
|
||||
success, data = self.executor.screenshot(node, viewport_size, dpi, page_ranges)
|
||||
if success and not isinstance(data, list):
|
||||
return success, [data]
|
||||
return success, data
|
||||
|
|
|
@ -31,11 +31,6 @@ class ChromeDriverPrintProtocolPart(PrintProtocolPart):
|
|||
self.runner_handle = self.webdriver.window_handle
|
||||
|
||||
def render_as_pdf(self, width, height):
|
||||
page_ranges = self.webdriver.execute_script(
|
||||
"""
|
||||
let elem = document.querySelector("meta[name=reftest-pages]");
|
||||
return elem ? elem.content : null;
|
||||
""")
|
||||
margin = 0.5
|
||||
body = {
|
||||
"cmd": "Page.printToPDF",
|
||||
|
@ -51,8 +46,7 @@ return elem ? elem.content : null;
|
|||
"printBackground": True,
|
||||
}
|
||||
}
|
||||
return (self.webdriver.send_session_command("POST", "goog/cdp/execute", body=body)["data"],
|
||||
page_ranges)
|
||||
return self.webdriver.send_session_command("POST", "goog/cdp/execute", body=body)["data"]
|
||||
|
||||
def pdf_to_png(self, pdf_base64, ranges):
|
||||
handle = self.webdriver.window_handle
|
||||
|
@ -82,7 +76,7 @@ class ChromeDriverPrintRefTestExecutor(WebDriverRefTestExecutor):
|
|||
with open(os.path.join(here, "reftest.js")) as f:
|
||||
self.script = f.read()
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7140
|
||||
assert dpi is None
|
||||
|
||||
|
@ -92,6 +86,7 @@ class ChromeDriverPrintRefTestExecutor(WebDriverRefTestExecutor):
|
|||
self.has_window = True
|
||||
|
||||
self.viewport_size = viewport_size
|
||||
self.page_ranges = page_ranges.get(test.url)
|
||||
timeout = self.timeout_multiplier * test.timeout if self.debug_info is None else None
|
||||
|
||||
test_url = self.test_url(test)
|
||||
|
@ -108,8 +103,8 @@ class ChromeDriverPrintRefTestExecutor(WebDriverRefTestExecutor):
|
|||
|
||||
protocol.base.execute_script(self.wait_script, asynchronous=True)
|
||||
|
||||
pdf, page_ranges = protocol.pdf_print.render_as_pdf(*self.viewport_size)
|
||||
screenshots = protocol.pdf_print.pdf_to_png(pdf, page_ranges)
|
||||
pdf = protocol.pdf_print.render_as_pdf(*self.viewport_size)
|
||||
screenshots = protocol.pdf_print.pdf_to_png(pdf, self.page_ranges)
|
||||
for i, screenshot in enumerate(screenshots):
|
||||
# strip off the data:img/png, part of the url
|
||||
if screenshot.startswith("data:image/png;base64,"):
|
||||
|
|
|
@ -566,12 +566,6 @@ class MarionettePrintProtocolPart(PrintProtocolPart):
|
|||
self.runner_handle = self.marionette.current_window_handle
|
||||
|
||||
def render_as_pdf(self, width, height):
|
||||
page_ranges = self.marionette.execute_script(
|
||||
"""
|
||||
let elem = document.querySelector("meta[name=reftest-pages]");
|
||||
return elem ? elem.content : null;
|
||||
""",
|
||||
new_sandbox=False, sandbox=None)
|
||||
margin = 0.5 * 2.54
|
||||
body = {
|
||||
"page": {
|
||||
|
@ -587,16 +581,16 @@ return elem ? elem.content : null;
|
|||
"shrinkToFit": False,
|
||||
"printBackground": True,
|
||||
}
|
||||
return self.marionette._send_message("WebDriver:Print", body, key="value"), page_ranges
|
||||
return self.marionette._send_message("WebDriver:Print", body, key="value")
|
||||
|
||||
def pdf_to_png(self, pdf_base64, ranges):
|
||||
def pdf_to_png(self, pdf_base64, page_ranges):
|
||||
handle = self.marionette.current_window_handle
|
||||
self.marionette.switch_to_window(self.runner_handle)
|
||||
try:
|
||||
rv = self.marionette.execute_async_script("""
|
||||
let callback = arguments[arguments.length - 1];
|
||||
render('%s').then(result => callback(result))""" % pdf_base64, new_sandbox=False, sandbox=None)
|
||||
page_numbers = get_pages(ranges, len(rv))
|
||||
page_numbers = get_pages(page_ranges, len(rv))
|
||||
rv = [item for i, item in enumerate(rv) if i + 1 in page_numbers]
|
||||
return rv
|
||||
finally:
|
||||
|
@ -842,6 +836,8 @@ class MarionetteTestharnessExecutor(TestharnessExecutor):
|
|||
|
||||
|
||||
class MarionetteRefTestExecutor(RefTestExecutor):
|
||||
is_print = False
|
||||
|
||||
def __init__(self, logger, browser, server_config, timeout_multiplier=1,
|
||||
screenshot_cache=None, close_after_done=True,
|
||||
debug_info=None, reftest_internal=False,
|
||||
|
@ -933,7 +929,7 @@ class MarionetteRefTestExecutor(RefTestExecutor):
|
|||
|
||||
return self.convert_result(test, result)
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7135
|
||||
assert viewport_size is None
|
||||
assert dpi is None
|
||||
|
@ -972,7 +968,7 @@ class InternalRefTestImplementation(RefTestImplementation):
|
|||
return self.executor.logger
|
||||
|
||||
def setup(self, screenshot="unexpected"):
|
||||
data = {"screenshot": screenshot}
|
||||
data = {"screenshot": screenshot, "isPrint": self.executor.is_print}
|
||||
if self.executor.group_metadata is not None:
|
||||
data["urlCount"] = {urljoin(self.executor.server_url(key[0]), key[1]):value
|
||||
for key, value in iteritems(
|
||||
|
@ -995,7 +991,8 @@ class InternalRefTestImplementation(RefTestImplementation):
|
|||
"expected": test.expected(),
|
||||
"timeout": timeout,
|
||||
"width": 800,
|
||||
"height": 600})["value"]
|
||||
"height": 600,
|
||||
"pageRanges": test.page_ranges})["value"]
|
||||
return rv
|
||||
|
||||
def get_references(self, root_test, node):
|
||||
|
@ -1099,10 +1096,13 @@ class MarionetteCrashtestExecutor(CrashtestExecutor):
|
|||
|
||||
|
||||
class MarionettePrintRefTestExecutor(MarionetteRefTestExecutor):
|
||||
is_print = True
|
||||
|
||||
def __init__(self, logger, browser, server_config, timeout_multiplier=1,
|
||||
screenshot_cache=None, close_after_done=True,
|
||||
debug_info=None, reftest_screenshot="unexpected", ccov=False,
|
||||
group_metadata=None, capabilities=None, debug=False, **kwargs):
|
||||
group_metadata=None, capabilities=None, debug=False,
|
||||
reftest_internal=False, **kwargs):
|
||||
"""Marionette-based executor for reftests"""
|
||||
MarionetteRefTestExecutor.__init__(self,
|
||||
logger,
|
||||
|
@ -1113,7 +1113,7 @@ class MarionettePrintRefTestExecutor(MarionetteRefTestExecutor):
|
|||
close_after_done=close_after_done,
|
||||
debug_info=debug_info,
|
||||
reftest_screenshot=reftest_screenshot,
|
||||
reftest_internal=False,
|
||||
reftest_internal=reftest_internal,
|
||||
ccov=ccov,
|
||||
group_metadata=group_metadata,
|
||||
capabilities=capabilities,
|
||||
|
@ -1122,9 +1122,14 @@ class MarionettePrintRefTestExecutor(MarionetteRefTestExecutor):
|
|||
|
||||
def setup(self, runner):
|
||||
super(MarionettePrintRefTestExecutor, self).setup(runner)
|
||||
self.protocol.pdf_print.load_runner()
|
||||
if not isinstance(self.implementation, InternalRefTestImplementation):
|
||||
self.protocol.pdf_print.load_runner()
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def get_implementation(self, reftest_internal):
|
||||
return (InternalRefTestImplementation if reftest_internal
|
||||
else RefTestImplementation)(self)
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7140
|
||||
assert dpi is None
|
||||
|
||||
|
@ -1132,6 +1137,7 @@ class MarionettePrintRefTestExecutor(MarionetteRefTestExecutor):
|
|||
timeout = self.timeout_multiplier * test.timeout if self.debug_info is None else None
|
||||
|
||||
test_url = self.test_url(test)
|
||||
self.page_ranges = page_ranges.get(test.url)
|
||||
|
||||
return ExecuteAsyncScriptRun(self.logger,
|
||||
self._render,
|
||||
|
@ -1145,8 +1151,8 @@ class MarionettePrintRefTestExecutor(MarionetteRefTestExecutor):
|
|||
|
||||
protocol.base.execute_script(self.wait_script, asynchronous=True)
|
||||
|
||||
pdf, page_ranges = protocol.pdf_print.render_as_pdf(*self.viewport_size)
|
||||
screenshots = protocol.pdf_print.pdf_to_png(pdf, page_ranges)
|
||||
pdf = protocol.pdf_print.render_as_pdf(*self.viewport_size)
|
||||
screenshots = protocol.pdf_print.pdf_to_png(pdf, self.page_ranges)
|
||||
for i, screenshot in enumerate(screenshots):
|
||||
# strip off the data:img/png, part of the url
|
||||
if screenshot.startswith("data:image/png;base64,"):
|
||||
|
|
|
@ -413,7 +413,7 @@ class SeleniumRefTestExecutor(RefTestExecutor):
|
|||
|
||||
return self.convert_result(test, result)
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7135
|
||||
assert viewport_size is None
|
||||
assert dpi is None
|
||||
|
|
|
@ -209,7 +209,7 @@ class ServoRefTestExecutor(ProcessTestExecutor):
|
|||
os.rmdir(self.tempdir)
|
||||
ProcessTestExecutor.teardown(self)
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
with TempFilename(self.tempdir) as output_path:
|
||||
extra_args = ["--exit",
|
||||
"--output=%s" % output_path,
|
||||
|
|
|
@ -260,7 +260,7 @@ class ServoWebDriverRefTestExecutor(RefTestExecutor):
|
|||
message += traceback.format_exc()
|
||||
return test.result_cls("INTERNAL-ERROR", message), []
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7135
|
||||
assert viewport_size is None
|
||||
assert dpi is None
|
||||
|
|
|
@ -518,7 +518,7 @@ class WebDriverRefTestExecutor(RefTestExecutor):
|
|||
|
||||
return self.convert_result(test, result)
|
||||
|
||||
def screenshot(self, test, viewport_size, dpi):
|
||||
def screenshot(self, test, viewport_size, dpi, page_ranges):
|
||||
# https://github.com/web-platform-tests/wpt/issues/7135
|
||||
assert viewport_size is None
|
||||
assert dpi is None
|
||||
|
|
|
@ -3,19 +3,13 @@ import pytest
|
|||
from ..executors import base
|
||||
|
||||
@pytest.mark.parametrize("ranges_value, total_pages, expected", [
|
||||
("", 3, {1,2, 3}),
|
||||
("1-2", 3, {1,2}),
|
||||
("1-1,3-4", 5, {1,3,4}),
|
||||
("1,3", 5, {1,3}),
|
||||
("2-", 5, {2,3,4,5}),
|
||||
("-2", 5, {1,2}),
|
||||
("-2,2-", 5, {1,2,3,4,5}),
|
||||
("1,6-7,8", 5, {1})])
|
||||
([], 3, {1, 2, 3}),
|
||||
([[1, 2]], 3, {1, 2}),
|
||||
([[1], [3, 4]], 5, {1, 3, 4}),
|
||||
([[1],[3]], 5, {1, 3}),
|
||||
([[2, None]], 5, {2, 3, 4, 5}),
|
||||
([[None, 2]], 5, {1, 2}),
|
||||
([[None, 2], [2, None]], 5, {1, 2, 3, 4, 5}),
|
||||
([[1], [6, 7], [8]], 5, {1})])
|
||||
def test_get_pages_valid(ranges_value, total_pages, expected):
|
||||
assert base.get_pages(ranges_value, total_pages) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize("ranges_value", ["a", "1-a", "1=2", "1-2:2-3"])
|
||||
def test_get_pages_invalid(ranges_value):
|
||||
with pytest.raises(ValueError):
|
||||
assert base.get_pages(ranges_value, 1)
|
||||
|
|
|
@ -453,7 +453,8 @@ class ReftestTest(Test):
|
|||
test_type = "reftest"
|
||||
|
||||
def __init__(self, tests_root, url, inherit_metadata, test_metadata, references,
|
||||
timeout=None, path=None, viewport_size=None, dpi=None, fuzzy=None, protocol="http", quic=False):
|
||||
timeout=None, path=None, viewport_size=None, dpi=None, fuzzy=None, protocol="http",
|
||||
quic=False):
|
||||
Test.__init__(self, tests_root, url, inherit_metadata, test_metadata, timeout,
|
||||
path, protocol, quic)
|
||||
|
||||
|
@ -466,6 +467,13 @@ class ReftestTest(Test):
|
|||
self.dpi = dpi
|
||||
self._fuzzy = fuzzy or {}
|
||||
|
||||
@classmethod
|
||||
def cls_kwargs(cls, manifest_test):
|
||||
return {"viewport_size": manifest_test.viewport_size,
|
||||
"dpi": manifest_test.dpi,
|
||||
"protocol": server_protocol(manifest_test),
|
||||
"fuzzy": manifest_test.fuzzy}
|
||||
|
||||
@classmethod
|
||||
def from_manifest(cls,
|
||||
manifest_file,
|
||||
|
@ -485,11 +493,8 @@ class ReftestTest(Test):
|
|||
[],
|
||||
timeout=timeout,
|
||||
path=manifest_test.path,
|
||||
viewport_size=manifest_test.viewport_size,
|
||||
dpi=manifest_test.dpi,
|
||||
protocol=server_protocol(manifest_test),
|
||||
fuzzy=manifest_test.fuzzy,
|
||||
quic=quic)
|
||||
quic=quic,
|
||||
**cls.cls_kwargs(manifest_test))
|
||||
|
||||
refs_by_type = defaultdict(list)
|
||||
|
||||
|
@ -592,14 +597,37 @@ class ReftestTest(Test):
|
|||
values[key] = data
|
||||
return values
|
||||
|
||||
@property
|
||||
def page_ranges(self):
|
||||
return {}
|
||||
|
||||
|
||||
class PrintReftestTest(ReftestTest):
|
||||
test_type = "print-reftest"
|
||||
|
||||
def __init__(self, tests_root, url, inherit_metadata, test_metadata, references,
|
||||
timeout=None, path=None, viewport_size=None, dpi=None, fuzzy=None,
|
||||
page_ranges=None, protocol="http", quic=False):
|
||||
super(PrintReftestTest, self).__init__(tests_root, url, inherit_metadata, test_metadata,
|
||||
references, timeout, path, viewport_size, dpi,
|
||||
fuzzy, protocol, quic=quic)
|
||||
self._page_ranges = page_ranges
|
||||
|
||||
@classmethod
|
||||
def cls_kwargs(cls, manifest_test):
|
||||
rv = super(PrintReftestTest, cls).cls_kwargs(manifest_test)
|
||||
rv["page_ranges"] = manifest_test.page_ranges
|
||||
return rv
|
||||
|
||||
def get_viewport_size(self, override):
|
||||
assert override is None
|
||||
return (5*2.54, 3*2.54)
|
||||
|
||||
@property
|
||||
def page_ranges(self):
|
||||
return self._page_ranges
|
||||
|
||||
|
||||
class WdspecTest(Test):
|
||||
result_cls = WdspecResult
|
||||
subtest_result_cls = WdspecSubtestResult
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
audit.define(
|
||||
{label: 'test1', description: 'Test value setter and setValueAtTime'},
|
||||
(task, should) => {
|
||||
testWithAutomation(should, {prefix: '', threshold: 5.9605e-8})
|
||||
testWithAutomation(should, {prefix: '', threshold: 6.5819e-5})
|
||||
.then(() => task.done());
|
||||
});
|
||||
|
||||
|
|
|
@ -164,3 +164,6 @@
|
|||
[WebGL test #41: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,0]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,0]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue