Skip to content
Permalink
Browse files

Update web-platform-tests to revision 687b6cba3385c4c2ca85f44fe072961…

…e651621b5
  • Loading branch information...
servo-wpt-sync committed Apr 9, 2019
1 parent cd579f6 commit 1a4444a5579b81f68a4f8aede614593323c90ef2
Showing with 595 additions and 260 deletions.
  1. +159 −61 tests/wpt/metadata/MANIFEST.json
  2. +0 −15 tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini
  3. +2 −14 tests/wpt/metadata/fetch/content-type/response.window.js.ini
  4. +0 −3 tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini
  5. +5 −0 ...oss-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini
  6. +1 −1 ...history/the-history-interface/{traverse_the_history_2.html.ini → traverse_the_history_5.html.ini}
  7. +0 −10 tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini
  8. +2 −0 .../metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini
  9. +0 −1 .../metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini
  10. +10 −0 tests/wpt/metadata/websockets/Secure-Send-binary-65K-arraybuffer.any.js.ini
  11. +30 −12 tests/wpt/web-platform-tests/common/security-features/resources/common.js
  12. +7 −10 tests/wpt/web-platform-tests/common/security-features/subresource/image.py
  13. +3 −3 ...ts/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html
  14. +6 −0 tests/wpt/web-platform-tests/css/css-multicol/multicol-overflow-clip-positioned-ref.html
  15. +12 −0 tests/wpt/web-platform-tests/css/css-multicol/multicol-overflow-clip-positioned.html
  16. +1 −0 tests/wpt/web-platform-tests/css/cssom-view/scrollintoview.html
  17. +4 −4 ...orm-tests/feature-policy/experimental-features/lazyload/lazyload-enabled-image-tentative.sub.html
  18. +9 −9 ...-platform-tests/feature-policy/experimental-features/lazyload/lazyload-enabled-tentative.sub.html
  19. +21 −0 tests/wpt/web-platform-tests/feature-policy/parameters/feature-parameters-inf.html
  20. +1 −0 tests/wpt/web-platform-tests/feature-policy/parameters/feature-parameters-inf.html.headers
  21. +44 −0 tests/wpt/web-platform-tests/feature-policy/parameters/feature-parameters-with-frames.html
  22. +28 −0 tests/wpt/web-platform-tests/feature-policy/parameters/feature-parameters.html
  23. +1 −0 tests/wpt/web-platform-tests/feature-policy/parameters/feature-parameters.html.headers
  24. +50 −0 tests/wpt/web-platform-tests/feature-policy/parameters/resources/feature-parameters-frame.html
  25. BIN tests/wpt/web-platform-tests/feature-policy/parameters/resources/sample-1.png
  26. +13 −0 tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js
  27. +19 −0 tests/wpt/web-platform-tests/portals/portals-create-orphaned.html
  28. +28 −0 tests/wpt/web-platform-tests/portals/resources/portal-create-orphaned.html
  29. +2 −2 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/generate.py
  30. BIN tests/wpt/web-platform-tests/upgrade-insecure-requests/support/pass.png
  31. +0 −1 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/pass.png.headers
  32. +0 −3 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/post-origin-to-parent.html
  33. +21 −32 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/testharness-helper.sub.js
  34. +0 −1 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/worker.js
  35. +0 −1 tests/wpt/web-platform-tests/upgrade-insecure-requests/support/worker.js.headers
  36. +1 −1 ...web-platform-tests/upgrade-insecure-requests/worker-subresource-fetch-redirect-upgrade.https.html
  37. +1 −1 tests/wpt/web-platform-tests/upgrade-insecure-requests/worker-subresource-fetch-upgrade.https.html
  38. +12 −12 tests/wpt/web-platform-tests/webrtc/RTCDataChannel-id.html
  39. +48 −49 tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-createDataChannel.html
  40. +2 −1 tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-ondatachannel.html
  41. +12 −12 tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html
  42. +1 −1 tests/wpt/web-platform-tests/webxr/xrSession_requestAnimationFrame_data_valid.https.html
  43. +9 −0 tests/wpt/web-platform-tests/xhtml/adopt-while-parsing-001-ref.html
  44. +19 −0 tests/wpt/web-platform-tests/xhtml/adopt-while-parsing-001.html
  45. +11 −0 tests/wpt/web-platform-tests/xhtml/adopt-while-parsing.xhtml

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -140,12 +140,6 @@
[Matching font-stretch: '90%' should prefer '50% 80%' over '60% 70%']
expected: FAIL

[Matching font-stretch: '90%' should prefer '110% 140%' over '120% 130%']
expected: FAIL

[Matching font-style: 'normal' should prefer 'normal' over 'oblique 0deg']
expected: FAIL

[Matching font-style: 'normal' should prefer 'oblique 0deg' over 'oblique 10deg 40deg']
expected: FAIL

@@ -176,9 +170,6 @@
[Matching font-style: 'oblique -10deg' should prefer 'oblique -5deg' over 'oblique -1deg 0deg']
expected: FAIL

[Matching font-weight: '399' should prefer '350 399' over '340 360']
expected: FAIL

[Matching font-weight: '500' should prefer '450 460' over '400']
expected: FAIL

@@ -314,9 +305,6 @@
[Matching font-style: 'oblique -20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg']
expected: FAIL

[Matching font-weight: '400' should prefer '450 460' over '500']
expected: FAIL

[Matching font-weight: '399' should prefer '450 460' over '500 501']
expected: FAIL

@@ -332,6 +320,3 @@
[Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%']
expected: FAIL

[Matching font-weight: '400' should prefer '400' over '450 460']
expected: FAIL

@@ -163,7 +163,7 @@
expected: NOTRUN

[<iframe>: combined response Content-Type: text/html;" " text/plain]
expected: TIMEOUT
expected: FAIL

[Request: combined response Content-Type: text/plain;charset=gbk;x=foo text/plain]
expected: NOTRUN
@@ -202,7 +202,7 @@
expected: NOTRUN

[<iframe>: separate response Content-Type: text/html;" " text/plain]
expected: TIMEOUT
expected: FAIL

[fetch(): separate response Content-Type: text/plain */*;charset=gbk]
expected: NOTRUN
@@ -312,15 +312,3 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL

[<iframe>: combined response Content-Type: text/html */*]
expected: FAIL

[<iframe>: separate response Content-Type: text/plain;charset=gbk text/html]
expected: FAIL

[<iframe>: separate response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL

[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL

@@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL

[X-Content-Type-Options%3A%20%2Cnosniff]
expected: FAIL

@@ -0,0 +1,5 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT

@@ -1,4 +1,4 @@
[traverse_the_history_2.html]
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,2 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT
@@ -1,5 +1,4 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

@@ -0,0 +1,10 @@
[Secure-Send-binary-65K-arraybuffer.any.html]

[Secure-Send-binary-65K-arraybuffer.any.worker.html]
expected: TIMEOUT
[Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed]
expected: NOTRUN

[Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received]
expected: NOTRUN

@@ -263,25 +263,43 @@ function extractImageData(img) {
}

function decodeImageData(rgba) {
var rgb = new Uint8ClampedArray(rgba.length);

// RGBA -> RGB.
var rgb_length = 0;
for (var i = 0; i < rgba.length; ++i) {
// Skip alpha component.
if (i % 4 == 3)
continue;
let decodedBytes = new Uint8ClampedArray(rgba.length);
let decodedLength = 0;

for (var i = 0; i + 12 <= rgba.length; i += 12) {
// A single byte is encoded in three pixels. 8 pixel octets (among
// 9 octets = 3 pixels * 3 channels) are used to encode 8 bits,
// the most significant bit first, where `0` and `255` in pixel values
// represent `0` and `1` in bits, respectively.
// This encoding is used to avoid errors due to different color spaces.
const bits = [];
for (let j = 0; j < 3; ++j) {
bits.push(rgba[i + j * 4 + 0]);
bits.push(rgba[i + j * 4 + 1]);
bits.push(rgba[i + j * 4 + 2]);
// rgba[i + j * 4 + 3]: Skip alpha channel.
}
// The last one element is not used.
bits.pop();

// Decode a single byte.
let byte = 0;
for (let j = 0; j < 8; ++j) {
byte <<= 1;
if (bits[j] >= 128)
byte |= 1;
}

// Zero is the string terminator.
if (rgba[i] == 0)
if (byte == 0)
break;

rgb[rgb_length++] = rgba[i];
decodedBytes[decodedLength++] = byte;
}

// Remove trailing nulls from data.
rgb = rgb.subarray(0, rgb_length);
var string_data = (new TextDecoder("ascii")).decode(rgb);
decodedBytes = decodedBytes.subarray(0, decodedLength);
var string_data = (new TextDecoder("ascii")).decode(decodedBytes);

return JSON.parse(string_data);
}
@@ -60,20 +60,17 @@ def save(self, f, type):

def encode_string_as_bmp_image(string_data):
data_bytes = array.array("B", string_data)

num_bytes = len(data_bytes)

# Convert data bytes to color data (RGB).
# Encode data bytes to color data (RGB), one bit per channel.
# This is to avoid errors due to different color spaces used in decoding.
color_data = []
num_components = 3
rgb = [0] * num_components
i = 0
for byte in data_bytes:
component_index = i % num_components
rgb[component_index] = byte
if component_index == (num_components - 1) or i == (num_bytes - 1):
color_data.append(tuple(rgb))
rgb = [0] * num_components
i += 1
p = [int(x) * 255 for x in '{0:08b}'.format(byte)]
color_data.append((p[0], p[1], p[2]))
color_data.append((p[3], p[4], p[5]))
color_data.append((p[6], p[7], 0))

# Render image.
num_pixels = len(color_data)
@@ -10,7 +10,7 @@
if (e.effectiveDirective == effective_directive)
resolve(e);
});
});
});
}
async_test(t => {
@@ -70,15 +70,15 @@
window.addEventListener("message", t.step_func(e => {
if (e.source == i.contentWindow) {
if (e.data == (new URL(url)).origin) {
if (e.data.location == url) {
waitForViolation(window, "frame-src")
.then(t.step_func(e => {
reported = true;
if (loaded)
t.done();
}));
i.contentWindow.location.href = navigate_to;
} else if (e.data == (new URL(upgraded)).origin) {
} else if (e.data.location == upgraded) {
loaded = true;
if (reported)
t.done();
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<div style="columns: 2">
<div style="height: 200px; background: blue"></div>
<div style="height: 200px"></div>
</div>

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<title>CSS Multi-column Layout Test: multicol with overflow-clipped positioned content</title>
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/">
<link rel="match" href="multicol-overflow-clip-positioned-ref.html">
<meta name="assert" content="Overflow clip for positioned content should work under multicol.">
<div style="columns: 2">
<div style="height: 200px; overflow: hidden">
<div style="height: 800px; background: blue; position: relative"></div>
</div>
<div style="height: 200px"></div>
</div>

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<title>CSSOM View - scrollIntoView</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<link rel="author" title="Chris Wu" href="mailto:pwx.frontend@gmail.com">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview">
<link rel="help" href="https://heycam.github.io/webidl/#es-operations">
@@ -26,7 +26,7 @@
<body>
<p>Image inserted further below.</p>
<div id="image-container">
<img id="off" load="eager" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
<img id="off" loading="eager" src="http://{{hosts[alt][www1]}}:{{ports[http][0]}}/feature-policy/experimental-features/resources/lazyload.png"></img>
</div>
<script>
var img = document.querySelector("img");
@@ -35,11 +35,11 @@
target.load_complete = wait_for_load(target).then(() => target.did_load = true );
});
// Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the lazyload attribute
// value 'OFF' works as expected (images load immediately).
// Sanity-check: Verify that when feature-policy 'lazyload' is enabled, the attribute
// loading='eager' works as expected (images load immediately).
promise_test( async(t) => {
await window.load_complete;
assert_true(img.did_load, "Image should have loaded.");
}, "When feature is enabled, load=eager works as expected.");
}, "When feature is enabled, loading=eager works as expected.");
</script>
</body>
@@ -31,12 +31,12 @@
window.scrollTo(0, 0);
// Sanity-check: Make sure load='lazy' works as intended.
// Sanity-check: Make sure loading='lazy' works as intended.
promise_test(async(t) => {
// Add a frame with load="lazy".
// Add a frame with loading="lazy".
let frame_on = createIframe(document.body, {
id: "ON",
load: "lazy",
loading: "lazy",
src: `${cross_origin_url}?id=ON`
});
// Sanity-check: The frame is not visible.
@@ -48,17 +48,17 @@
await waitForMessageOrTimeout(t, "ON", load_timeout);
assert_equals(msg_or_timeout_attr_on,
expected_timeout_msg,
"With load='lazy', the frame should not load.");
"With loading='lazy', the frame should not load.");
}, "Sanity-check: Contents do not load immediately (no eager-loading) " +
"when the load attribute is 'lazy' and frame is in viewport.");
"when the loading attribute is 'lazy' and frame is in viewport.");
// When feature is enabled, a frame can turn off lazy loading by setting the
// attribute to 'off'.
promise_test(async(t) => {
// Add a frame with load="eager".
// Add a frame with loading="eager".
let frame_off = createIframe(document.body, {
id: "OFF",
load: "eager",
loading: "eager",
src: `${cross_origin_url}?id=OFF`
});
// Sanity-check: The frame is not visible.
@@ -71,7 +71,7 @@
assert_equals(msg_or_timeout_attr_off,
expected_load_msg,
"With load='eager', the frame should load.");
"With loading='eager', the frame should load.");
}, "When 'lazyload' feature is enabled, a frame can avoid lazyloading by " +
"setting 'load' attribute to 'eager'");
"setting 'loading' attribute to 'eager'");
</script>
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test oversized-images policy with threshold 'inf'</title>
</head>
<body>
<!-- The sample image has an intrinsic image size of 200x200px -->
<img src="resources/sample-1.png" width="200" height="200">
<img src="resources/sample-1.png" width="100" height="200">
<img src="resources/sample-1.png" width="50" height="200">
<br>
<img src="resources/sample-1.png" width="200" height="100">
<img src="resources/sample-1.png" width="100" height="100">
<img src="resources/sample-1.png" width="50" height="100">
<br>
<img src="resources/sample-1.png" width="200" height="50">
<img src="resources/sample-1.png" width="100" height="50">
<img src="resources/sample-1.png" width="50" height="50">
</body>
</html>
@@ -0,0 +1 @@
Feature-Policy: oversized-images (inf)
Oops, something went wrong.

0 comments on commit 1a4444a

Please sign in to comment.
You can’t perform that action at this time.