Skip to content

Commit 04b21fa

Browse files
author
bors-servo
committed
Auto merge of servo#7510 - servo:update-wpt, r=Ms2ger
Update web-platform-tests to revision cf8340b5fae7b820788ffc31f8cc6b6b04978002 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7510) <!-- Reviewable:end -->
2 parents a547ae6 + 538f8f0 commit 04b21fa

File tree

41 files changed

+270
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+270
-295
lines changed

tests/wpt/metadata/MANIFEST.json

Lines changed: 106 additions & 245 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[preserve-ua-header-on-redirect.htm]
2+
type: testharness
3+
[XMLHttpRequest: User-Agent header is preserved on redirect 1]
4+
expected: FAIL
5+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[setrequestheader-header-allowed.htm]
2+
type: testharness
3+
[XMLHttpRequest: setRequestHeader() - headers that are allowed (User-Agent)]
4+
expected: FAIL
5+

tests/wpt/metadata/html/browsers/the-window-object/window-properties.html.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,4 @@
377377

378378
[Window replaceable attribute: devicePixelRatio]
379379
expected: FAIL
380+

tests/wpt/metadata/html/dom/documents/dom-tree-accessors/Document.currentScript.html.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[Document.currentScript.sub.html]
2+
type: testharness
3+
expected: TIMEOUT
4+
[Script script-window-error]
5+
expected: FAIL
6+
7+
[Script script-svg]
8+
expected: NOTRUN
9+
10+
[Script iframe-src]
11+
expected: NOTRUN
12+
13+
[Script cross-origin]
14+
expected: NOTRUN
15+
16+
[Script document-write]
17+
expected: NOTRUN
18+
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
[document.forms.html]
22
type: testharness
3-
[document.forms]
4-
expected: FAIL
5-
63
[document.forms iteration]
74
expected: FAIL
85

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[001-a.html]
2+
type: reftest
3+
expected: FAIL
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[001-q.html]
2+
type: reftest
3+
expected: FAIL
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[001-s.html]
2+
type: reftest
3+
expected: FAIL
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[001-x.xhtml]
2+
type: reftest
3+
expected: FAIL

tests/wpt/metadata/mozilla-sync

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a1cd27e6a3b961129fd4710513cc29e4f7c9cc67
1+
dbf549ea32d23cf96b7f49e3333c068aaf050bc3

tests/wpt/web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect.htm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@
2222
client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_name=user-agent"))
2323
client.send(null)
2424
})
25+
26+
var test2 = async_test()
27+
test2.step(function() {
28+
var client = new XMLHttpRequest()
29+
client.onreadystatechange = function() {
30+
test2.step(function() {
31+
if(client.readyState == 4) {
32+
assert_equals(client.responseText, 'user-agent: TEST\n')
33+
test2.done()
34+
}
35+
})
36+
}
37+
client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_name=user-agent"))
38+
client.setRequestHeader("User-Agent", "TEST")
39+
client.send(null)
40+
})
2541
</script>
2642
</body>
2743
</html>

tests/wpt/web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
}
2222
request("Authorization")
2323
request("Pragma")
24+
request("User-Agent")
2425
request("Content-Transfer-Encoding")
2526
request("Content-Type")
2627
request("Overwrite")

tests/wpt/web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>XMLHttpRequest: setRequestHeader() - headers that are forbidden</title>
55
<script src="/resources/testharness.js"></script>
66
<script src="/resources/testharnessreport.js"></script>
7-
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method" data-tested-assertations="/following::ol/li[5]" />
7+
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method" data-tested-assertations="/following::ol/li[5]" />
88

99
</head>
1010
<body>
@@ -29,7 +29,6 @@
2929
client.setRequestHeader("Trailer", "TEST")
3030
client.setRequestHeader("Transfer-Encoding", "TEST")
3131
client.setRequestHeader("Upgrade", "TEST")
32-
client.setRequestHeader("User-Agent", "TEST")
3332
client.setRequestHeader("Via", "TEST")
3433
client.setRequestHeader("Proxy-", "TEST")
3534
client.setRequestHeader("Proxy-Authorization", "TEST")

tests/wpt/web-platform-tests/content-security-policy/blink-contrib-2/scripthash-allowed.sub.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
</script>
1313
<!-- enforcing policy:
14-
script-src 'self' 'sha256-IFmozo9WnnsMXVl_Ka8XzJ3Nd8yzS2zA2ME0mwtd-Ck=' 'sha256-jSpTmJKcrnHttKdYM_wCCDJoQY5tdSxNf7zd2prwFfI=' 'sha256-qbgA2XjB2EZKjn_UmK7v_K77t-fvfxA89QT_K9qPNyE=' 'sha256-K-7X5Ip3msvRvyQzf6fkrWZziuhaUIee1aLnlP5nX10='; connect-src 'self'; connect-src 'self';
14+
script-src 'self' 'sha256-IFmozo9WnnsMXVl/Ka8XzJ3Nd8yzS2zA2ME0mwtd+Ck=' 'sha256-jSpTmJKcrnHttKdYM/wCCDJoQY5tdSxNf7zd2prwFfI=' 'sha256-qbgA2XjB2EZKjn/UmK7v/K77t+fvfxA89QT/K9qPNyE=' 'sha256-K+7X5Ip3msvRvyQzf6fkrWZziuhaUIee1aLnlP5nX10='; connect-src 'self';
1515
-->
1616
<script>
1717
alert_assert('PASS (1/4)');

tests/wpt/web-platform-tests/content-security-policy/blink-contrib-2/scripthash-allowed.sub.html.sub.headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Cache-Control: no-store, no-cache, must-revalidate
33
Cache-Control: post-check=0, pre-check=0, false
44
Pragma: no-cache
55
Set-Cookie: scripthash-allowed={{$id:uuid()}}; Path=/content-security-policy/blink-contrib-2
6-
Content-Security-Policy: script-src 'self' 'sha256-IFmozo9WnnsMXVl_Ka8XzJ3Nd8yzS2zA2ME0mwtd-Ck=' 'sha256-jSpTmJKcrnHttKdYM_wCCDJoQY5tdSxNf7zd2prwFfI=' 'sha256-qbgA2XjB2EZKjn_UmK7v_K77t-fvfxA89QT_K9qPNyE=' 'sha256-K-7X5Ip3msvRvyQzf6fkrWZziuhaUIee1aLnlP5nX10='; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}
6+
Content-Security-Policy: script-src 'self' 'sha256-IFmozo9WnnsMXVl/Ka8XzJ3Nd8yzS2zA2ME0mwtd+Ck=' 'sha256-jSpTmJKcrnHttKdYM/wCCDJoQY5tdSxNf7zd2prwFfI=' 'sha256-qbgA2XjB2EZKjn/UmK7v/K77t+fvfxA89QT/K9qPNyE=' 'sha256-K+7X5Ip3msvRvyQzf6fkrWZziuhaUIee1aLnlP5nX10='; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}

tests/wpt/web-platform-tests/content-security-policy/blink-contrib-2/scripthash-unicode-normalization.sub.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
</script>
1313
<!-- enforcing policy:
14-
script-src 'self' 'unsafe-inline' 'sha256-xy4iRAvdlFCq-M5-4yu4B7dy0Kc2FfljmZO4Jkj3Yhw='; connect-src 'self';
14+
script-src 'self' 'unsafe-inline' 'sha256-xy4iRAvdlFCq+M5+4yu4B7dy0Kc2FfljmZO4Jkj3Yhw='; connect-src 'self';
1515
-->
1616
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1717
<!-- The following two scripts contain two separate code points (U+00C5

tests/wpt/web-platform-tests/content-security-policy/blink-contrib-2/scripthash-unicode-normalization.sub.html.sub.headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Cache-Control: no-store, no-cache, must-revalidate
33
Cache-Control: post-check=0, pre-check=0, false
44
Pragma: no-cache
55
Set-Cookie: scripthash-unicode-normalization={{$id:uuid()}}; Path=/content-security-policy/blink-contrib-2
6-
Content-Security-Policy: script-src 'self' 'sha256-xy4iRAvdlFCq-M5-4yu4B7dy0Kc2FfljmZO4Jkj3Yhw='; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}
6+
Content-Security-Policy: script-src 'self' 'sha256-xy4iRAvdlFCq+M5+4yu4B7dy0Kc2FfljmZO4Jkj3Yhw='; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/frame-src-redirect-blocked.sub.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/frame-src-redirect-blocked.sub.html.sub.headers

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/injected-inline-script-allowed.sub.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<script src="../support/logTest.sub.js?logs=[]"></script>
1010
<script src='../support/alertAssert.sub.js?alerts=["Pass 1 of 2","Pass 2 of 2"]'></script>
1111
<!-- enforcing policy:
12-
script-src 'self' 'unsafe-inline' http://127.0.0.1:* 'unsafe-inline'; connect-src 'self';
13-
-->
12+
script-src 'self' 'unsafe-inline'; connect-src 'self';
13+
-->
1414
</head>
1515

1616
<body>

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/injected-inline-script-allowed.sub.html.sub.headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Cache-Control: no-store, no-cache, must-revalidate
33
Cache-Control: post-check=0, pre-check=0, false
44
Pragma: no-cache
55
Set-Cookie: injected-inline-script-allowed={{$id:uuid()}}; Path=/content-security-policy/blink-contrib
6-
Content-Security-Policy: script-src 'self' 'unsafe-inline' http://127.0.0.1:* 'unsafe-inline'; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}
6+
Content-Security-Policy: script-src 'self' 'unsafe-inline'; connect-src 'self'; report-uri /content-security-policy/support/report.py?op=put&reportID={{$id}}

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/injected-inline-script-blocked.sub.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<body>
1515
<script src="resources/inject-script.js"></script>
1616
<div id="log"></div>
17-
<script async defer src="../support/checkReport.sub.js?reportExists=true&amp;reportField=violated-directive&amp;reportValue=script-src%20http://127.0.0.1:*"></script>
17+
<script async defer src="../support/checkReport.sub.js?reportExists=true&amp;reportField=violated-directive&amp;reportValue=script-src%20'self'"></script>
1818
</body>
1919

2020
</html>

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/report-uri-scheme-relative.sub.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/report-uri-scheme-relative.sub.html.sub.headers

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/wpt/web-platform-tests/content-security-policy/blink-contrib/resources/alert-fail.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
document.write("<script>alert_assert('Pass 1 of 2');</script>");
22

33
var s = document.createElement('script');
4-
s.innerText = "alert_assert('Pass 2 of 2');";
4+
s.textContent = "alert_assert('Pass 2 of 2');";
55
document.body.appendChild(s);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
document.write("<style>#test1 { display: none; }</style>");
22

33
var s = document.createElement('style');
4-
s.innerText = "#test2 { display: none; }";
4+
s.textContent = "#test2 { display: none; }";
55
document.body.appendChild(s);

tests/wpt/web-platform-tests/docs/css-naming.md

Lines changed: 9 additions & 0 deletions

tests/wpt/web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.html renamed to tests/wpt/web-platform-tests/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
"xhr-test" : [],
2222
"script-svg" : [],
2323
"script-async" : [],
24-
"script-defer" : []
24+
"script-defer" : [],
25+
"script-async-false" : [],
26+
"iframe-src" : [],
27+
"cross-origin" : [null],
28+
"document-write" : []
2529
};
2630

2731
var expected = {};
@@ -189,3 +193,38 @@
189193
<script id='script-async' async src='data:text/plain,verify("script-async"),finish("script-async")'></script>
190194

191195
<script id='script-defer' defer src='data:text/plain,verify("script-defer"),finish("script-defer")'></script>
196+
197+
<!-- Test async = false dynamic script loading -->
198+
<script>
199+
var s = document.createElement("script");
200+
s.id = "script-async-false";
201+
s.src = "data:text/plain,verify('script-async-false');"
202+
s.onload = function() {
203+
finish('script-async-false');
204+
}
205+
s.async = false;
206+
document.body.appendChild(s);
207+
</script>
208+
209+
<!-- Verify in iframe javascript uri scheme -->
210+
<iframe src="javascript:parent.verify('iframe-src'),parent.finish('iframe-src')"
211+
style="visibility:hidden;display:none">
212+
</iframe>
213+
214+
<!-- Testing cross origin script -->
215+
<script>
216+
var s = document.createElement("script");
217+
s.id = "cross-origin";
218+
s.src = "http://{{domains[www1]}}:{{ports[http][1]}}/html/dom/documents/dom-tree-accessors/cross-domain.js"
219+
s.onload = function() {
220+
verify('cross-origin')
221+
finish('cross-origin');
222+
}
223+
document.body.appendChild(s);
224+
225+
</script>
226+
227+
<!-- Testing document.write -->
228+
<script>
229+
document.write('<script id="document-write">verify("document-write"); finish("document-write");</' + 'script>');
230+
</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//test script to check cross-domain script execution as in Document.currentScript.sub.html

tests/wpt/web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@
3434
assert_equals(document.forms.item(1).id, "form2");
3535
assert_equals(document.forms.namedItem("form1").id, "form1");
3636
assert_equals(document.forms.namedItem("form2").id, "form2");
37-
assert_equals(document.forms.item("form1").id, "form1");
38-
assert_equals(document.forms.item("form2").id, "form2");
3937
}, "document.forms")
4038

39+
test(function() {
40+
// The `item` method takes one *numeric* argument. Passing a string to `item`
41+
// results in that string getting converted to 0
42+
assert_equals(document.forms.item("form1").id, "form1");
43+
assert_equals(document.forms.item("form2").id, "form1");
44+
}, "document.forms.item with string arg")
45+
4146
test(function() {
4247
assert_equals(document.forms[""], undefined);
4348
assert_equals(document.forms.namedItem(""), null);
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<meta charset=utf-8>
3+
<title>Test for [[SetPrototypeOf]] with Windows</title>
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<div id="log"></div>
7+
<script>
8+
test(function() {
9+
assert_throws(new TypeError, function() {
10+
Object.setPrototypeOf(window, window);
11+
}, "Setting the prototype should throw");
12+
}, "Setting the prototype of a window to itself via setPrototypeOf");
13+
14+
test(function() {
15+
assert_throws(new TypeError, function() {
16+
window.__proto__ = window;
17+
}, "Setting the prototype should throw");
18+
}, "Setting the prototype of a window to itself via __proto__");
19+
20+
test(function() {
21+
assert_throws(new TypeError, function() {
22+
Object.setPrototypeOf(window, Object.create(window));
23+
}, "Setting the prototype should throw");
24+
}, "Setting the prototype of a window to something that has the window on " +
25+
"its proto chain via setPrototypeOf");
26+
27+
test(function() {
28+
assert_throws(new TypeError, function() {
29+
window.__proto__ = Object.create(window);
30+
}, "Setting the prototype should throw");
31+
}, "Setting the prototype of a window to something that has the window on " +
32+
"its proto chain via __proto__");
33+
</script>

tests/wpt/web-platform-tests/notifications/tag-same-manual.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
notifications = [],
1818
text1 = "This is the body: Room 101",
1919
text2 = "This is the body: Room 202"
20-
createPassFail("If two notifications appear: First one with the"
21-
+ " text \"" + text1 + "\", followed by one with the text \""
22-
+ text2 + "\"",
20+
createPassFail("If a notification with the text \""
21+
+ text2 + "\", replaces the notification with the text \""
22+
+ text1 + "\" in the same position",
2323
t, closeNotifications, notifications)
2424
notification1 = new Notification("New Email Received", {
2525
body: text1,

tests/wpt/web-platform-tests/selection/addRange.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!doctype html>
22
<title>Selection.addRange() tests</title>
33
<div id=log></div>
4+
<meta name="timeout" content="long">
45
<script src=/resources/testharness.js></script>
56
<script src=/resources/testharnessreport.js></script>
67
<script src=common.js></script>

0 commit comments

Comments
 (0)