mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Update web-platform-tests to revision 816924d8a73ac20159d2ec8e2d14dfc2e882cb17
This commit is contained in:
parent
8dc7a25893
commit
dffc3b3bdd
28 changed files with 289 additions and 146 deletions
|
@ -16,7 +16,7 @@
|
|||
href="mailto:fremycompany.developer@yahoo.fr"
|
||||
/ >
|
||||
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-values/#attr-notation"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-values/#common-keywords"/>
|
||||
|
||||
<link
|
||||
rel="match"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-padding-top">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=966795">
|
||||
<link rel="match" href="../reference/nothing.html">
|
||||
<meta name="assert" content="Percentage-padding is always resolved against the inline-size of the containing block, even if it's about block padding.">
|
||||
<p>There should be nothing below.</p>
|
||||
<div style="float:left;">
|
||||
<div style="display:flex; writing-mode:vertical-rl; padding:1000%; background:red;"></div>
|
||||
</div>
|
|
@ -11,6 +11,21 @@ On Windows, be sure to add the Python directory (`c:\python2x`, by default) to
|
|||
your `%Path%` [Environment Variable](http://www.computerhope.com/issues/ch000549.htm),
|
||||
and read the [Windows Notes](#windows-notes) section below.
|
||||
|
||||
<!--
|
||||
There does not appear to be a cross-platform means of installing `pip`.
|
||||
https://github.com/web-platform-tests/wpt/pull/16670
|
||||
-->
|
||||
|
||||
Install `pip`. On many systems, this can be achieved with the command `python
|
||||
-m ensurepip`. If this is not possible, use your system's package manager to
|
||||
install the `python-pip` package.
|
||||
|
||||
Next, install `virtualenv` using the following command:
|
||||
|
||||
```bash
|
||||
pip install virtualenv
|
||||
```
|
||||
|
||||
To get the tests running, you need to set up the test domains in your
|
||||
[`hosts` file](http://en.wikipedia.org/wiki/Hosts_%28file%29%23Location_in_the_file_system).
|
||||
|
||||
|
|
|
@ -53,9 +53,12 @@ function test(mime_type, is_blocking_expected) {
|
|||
// Some mime types should be protected by CORB without any kind
|
||||
// of confirmation sniffing.
|
||||
protected_mime_types = [
|
||||
"application/gzip",
|
||||
"application/x-gzip",
|
||||
"application/x-protobuf",
|
||||
"application/x-www-form-urlencoded",
|
||||
"application/zip",
|
||||
"text/event-stream",
|
||||
// TODO(lukasza): https://crbug.com/944162: Add application/pdf and
|
||||
// text/csv to the list of content types tested here (after
|
||||
// kMimeHandlerViewInCrossProcessFrame gets enabled by default).
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<title>Reference for track rendering with empty cue</title>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
.container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<video width="320" height="180">
|
||||
<source src="/media/white.webm" type="video/webm">
|
||||
<source src="/media/white.mp4" type="video/mp4">
|
||||
<script>
|
||||
var video = document.querySelector("video");
|
||||
video.addEventListener('playing', () => {
|
||||
video.pause();
|
||||
takeScreenshot();
|
||||
}, { once: true});
|
||||
video.play();
|
||||
</script>
|
||||
</video>
|
||||
</div>
|
||||
</html>
|
|
@ -1,26 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<title>Track rendering with empty cue</title>
|
||||
<link rel="match" href="track-cue-rendering-empty-cue-ref.html">
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<video width="320" height="180">
|
||||
<source src="/media/white.webm" type="video/webm">
|
||||
<source src="/media/white.mp4" type="video/mp4">
|
||||
<script>
|
||||
var video = document.querySelector("video");
|
||||
var track = video.addTextTrack("captions", "regular captions track", "en");
|
||||
track.addCue(new VTTCue(0, 4, ""));
|
||||
track.mode = "showing";
|
||||
<title>Empty cues</title>
|
||||
<script src="/common/media.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var video = document.createElement("video");
|
||||
video.src = getVideoURI("/media/test");
|
||||
video.addTextTrack("captions", "regular captions track", "en");
|
||||
video.textTracks[0].addCue(new VTTCue(0, 4, ""));
|
||||
|
||||
video.addEventListener('playing', () => {
|
||||
video.pause();
|
||||
takeScreenshot();
|
||||
}, { once: true});
|
||||
video.onplaying = t.step_func_done();
|
||||
video.play();
|
||||
</script>
|
||||
</video>
|
||||
</html>
|
||||
});
|
||||
</script>
|
|
@ -20,6 +20,7 @@
|
|||
background: green;
|
||||
color: green;
|
||||
font-size: 120px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
background: green;
|
||||
color: green;
|
||||
font-size: 50px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=967255">
|
||||
<rt style="display:block;">
|
||||
<div></div>
|
||||
</rt>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(()=> { }, "No crash");
|
||||
</script>
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
// Inject pen inputs.
|
||||
new test_driver.Actions()
|
||||
.addPointer("pointer1", "pen")
|
||||
.addPointer("PenPointer1", "pen")
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
var target_list = ["target0", "target1"];
|
||||
var pointer_event_list = ["pointerdown" , "pointermove", "pointerup"];
|
||||
var mouse_event_list = ["mousedown", "mouseup", "mousemove"];
|
||||
var last_pointer_event = null;
|
||||
|
||||
target_list.forEach(function(targetId) {
|
||||
var target = document.getElementById(targetId);
|
||||
|
@ -64,8 +63,6 @@
|
|||
|
||||
if (label === "pointerdown@target0")
|
||||
event.preventDefault();
|
||||
|
||||
last_pointer_event = event;
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -77,11 +74,6 @@
|
|||
event_log.push(event.type + "@" + targetId);
|
||||
|
||||
include_next_mousemove = (event.type == "mousedown");
|
||||
test(function() {
|
||||
test(function () {
|
||||
assert_equals(event.timeStamp, last_pointer_event.timeStamp, "The time stamp of the compat mouse event should be the same as its pointerevent");
|
||||
});
|
||||
}, event.type + "'s time stamp should be the same as " + last_pointer_event.type + "'s time stamp.");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
function nextMessage() {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.addEventListener('message', e => resolve(e.data), {once: true});
|
||||
});
|
||||
}
|
||||
|
||||
promise_test(async () => {
|
||||
let iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('src', '/common/security-features/subresource/document.py?first')
|
||||
iframe.setAttribute('referrerpolicy', 'no-referrer');
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
try {
|
||||
{
|
||||
let {referrer: documentReferrer, headers: {referer: httpReferrer}} = await nextMessage();
|
||||
assert_equals(httpReferrer, undefined, 'expected no HTTP Referer header on initial load');
|
||||
assert_equals(documentReferrer, undefined, 'expected no document.referrer on initial load');
|
||||
}
|
||||
|
||||
iframe.setAttribute('src', '/common/security-features/subresource/document.py?second');
|
||||
|
||||
{
|
||||
let {referrer: documentReferrer, headers: {referer: httpReferrer}} = await nextMessage();
|
||||
assert_equals(httpReferrer, undefined, 'expected no HTTP Referer header on src change');
|
||||
assert_equals(documentReferrer, undefined, 'expected no document.referrer on src change');
|
||||
}
|
||||
} finally {
|
||||
iframe.remove();
|
||||
}
|
||||
}, "Checks that referrerpolicy is respected when an iframe's src changes.");
|
||||
</script>
|
||||
</body>
|
|
@ -340,12 +340,15 @@ class MockRuntime {
|
|||
this.environmentProviderBinding_.close();
|
||||
}
|
||||
|
||||
closeDataProvider() {
|
||||
this.dataProviderBinding_.close();
|
||||
}
|
||||
|
||||
updateSessionGeometry(frame_size, display_rotation) {
|
||||
// This function must exist to ensure that calls to it do not crash, but we
|
||||
// do not have any use for this data at present.
|
||||
}
|
||||
|
||||
|
||||
// Utility function
|
||||
requestRuntimeSession(sessionOptions) {
|
||||
return this.runtimeSupportsSession(sessionOptions).then((result) => {
|
||||
|
@ -366,7 +369,7 @@ class MockRuntime {
|
|||
|
||||
let dataProviderPtr = new device.mojom.XRFrameDataProviderPtr();
|
||||
let dataProviderRequest = mojo.makeRequest(dataProviderPtr);
|
||||
let dataProviderBinding = new mojo.Binding(
|
||||
this.dataProviderBinding_ = new mojo.Binding(
|
||||
device.mojom.XRFrameDataProvider, this, dataProviderRequest);
|
||||
|
||||
let clientRequest = mojo.makeRequest(this.sessionClient_);
|
||||
|
|
|
@ -634,7 +634,11 @@ class Opera(Browser):
|
|||
|
||||
class EdgeChromium(Browser):
|
||||
"""MicrosoftEdge-specific interface."""
|
||||
|
||||
platform = {
|
||||
"Linux": "linux",
|
||||
"Windows": "win",
|
||||
"Darwin": "macos"
|
||||
}.get(uname[0])
|
||||
product = "edgechromium"
|
||||
requirements = "requirements_edge_chromium.txt"
|
||||
|
||||
|
@ -642,13 +646,35 @@ class EdgeChromium(Browser):
|
|||
raise NotImplementedError
|
||||
|
||||
def find_binary(self, venv_path=None, channel=None):
|
||||
raise find_executable("msedge")
|
||||
binary = None
|
||||
if self.platform == "win":
|
||||
binaryname = "msedge"
|
||||
binary = find_executable(binaryname)
|
||||
if not binary:
|
||||
# Use paths from different Edge channels starting with Release\Beta\Dev\Canary
|
||||
winpaths = [os.path.expanduser("~\\AppData\\Local\\Microsoft\\Edge\\Application"),
|
||||
os.path.expandvars("$SYSTEMDRIVE\\Program Files\\Microsoft\\Edge Beta\\Application"),
|
||||
os.path.expandvars("$SYSTEMDRIVE\\Program Files\\Microsoft\\Edge Dev\\Application"),
|
||||
os.path.expandvars("$SYSTEMDRIVE\\Program Files (x86)\\Microsoft\\Edge Beta\\Application"),
|
||||
os.path.expandvars("$SYSTEMDRIVE\\Program Files (x86)\\Microsoft\\Edge Dev\\Application"),
|
||||
os.path.expanduser("~\\AppData\Local\\Microsoft\\Edge SxS\\Application"),]
|
||||
return find_executable(binaryname, os.pathsep.join(winpaths))
|
||||
if self.platform == "macos":
|
||||
binaryname = "Microsoft Edge Canary"
|
||||
binary = find_executable(binaryname)
|
||||
if not binary:
|
||||
macpaths = ["/Applications/Microsoft Edge.app/Contents/MacOS",
|
||||
os.path.expanduser("~/Applications/Microsoft Edge.app/Contents/MacOS"),
|
||||
"/Applications/Microsoft Edge Canary.app/Contents/MacOS",
|
||||
os.path.expanduser("~/Applications/Microsoft Edge Canary.app/Contents/MacOS")]
|
||||
return find_executable("Microsoft Edge Canary", os.pathsep.join(macpaths))
|
||||
return binary
|
||||
|
||||
def find_webdriver(self, channel=None):
|
||||
return find_executable("msedgedriver")
|
||||
|
||||
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
|
||||
if uname[0] != "Windows":
|
||||
if self.platform == "win":
|
||||
raise ValueError("Only Windows platform is currently supported")
|
||||
|
||||
if dest is None:
|
||||
|
@ -666,19 +692,29 @@ class EdgeChromium(Browser):
|
|||
return find_executable("msedgedriver", dest)
|
||||
|
||||
def version(self, binary=None, webdriver_binary=None):
|
||||
if uname[0] != "Windows":
|
||||
if binary is None:
|
||||
binary = self.find_binary()
|
||||
if self.platform != "win":
|
||||
try:
|
||||
version_string = call(binary, "--version").strip()
|
||||
except subprocess.CalledProcessError:
|
||||
self.logger.warning("Failed to call %s" % binary)
|
||||
return None
|
||||
m = re.match(r"(?:MSEdge|Edge) (.*)", version_string)
|
||||
m = re.match(r"Microsoft Edge (.*) ", version_string)
|
||||
if not m:
|
||||
self.logger.warning("Failed to extract version from: %s" % version_string)
|
||||
return None
|
||||
return m.group(1)
|
||||
self.logger.warning("Unable to extract version from binary on Windows.")
|
||||
return None
|
||||
else:
|
||||
if binary is not None:
|
||||
command = "(Get-Item '%s').VersionInfo.FileVersion" % binary
|
||||
try:
|
||||
return call("powershell.exe", command).strip()
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
self.logger.warning("Failed to call %s in PowerShell" % command)
|
||||
return None
|
||||
self.logger.warning("Failed to find Edge binary.")
|
||||
return None
|
||||
|
||||
class Edge(Browser):
|
||||
"""Edge-specific interface."""
|
||||
|
|
|
@ -1,10 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>WakeLock: passing an AbortSignal already set aborts</title>
|
||||
<link rel="help" href="https://w3c.github.io/wake-lock/">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
// META: title=WakeLock.request() AbortSignal Test
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async t => {
|
||||
const invalidSignals = [
|
||||
"string",
|
||||
123,
|
||||
{},
|
||||
true,
|
||||
Symbol(),
|
||||
() => {},
|
||||
self
|
||||
];
|
||||
|
||||
for (let signal of invalidSignals) {
|
||||
await promise_rejects(t, new TypeError(), WakeLock.request('screen', { signal: signal }));
|
||||
}
|
||||
}, "'TypeError' is thrown when the signal option is not an AbortSignal");
|
||||
|
||||
promise_test(t => {
|
||||
const abortController = new AbortController();
|
||||
const abortSignal = abortController.signal;
|
||||
|
@ -28,4 +41,3 @@ promise_test(async t => {
|
|||
await promise_rejects(t, "AbortError", lock2);
|
||||
await promise_rejects(t, "AbortError", lock3);
|
||||
}, "The same AbortSignal can be used to cause multiple wake locks to abort");
|
||||
</script>
|
|
@ -13,7 +13,7 @@ promise_test(t => {
|
|||
"",
|
||||
true
|
||||
];
|
||||
invalidTypes.map(async invalidType => {
|
||||
await promise_rejects(t, new TypeError(), WakeLock.request(invalidType));
|
||||
});
|
||||
return Promise.all(invalidTypes.map(invalidType => {
|
||||
return promise_rejects(t, new TypeError(), WakeLock.request(invalidType));
|
||||
}));
|
||||
}, "'TypeError' is thrown when set an invalid wake lock type");
|
||||
|
|
|
@ -3,7 +3,10 @@ def main(request, response):
|
|||
|
||||
# Allow simple requests, but deny preflight
|
||||
if request.method != "OPTIONS":
|
||||
response.headers.set("Access-Control-Allow-Credentials", "true")
|
||||
response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin"))
|
||||
if "origin" in request.headers:
|
||||
response.headers.set("Access-Control-Allow-Credentials", "true")
|
||||
response.headers.set("Access-Control-Allow-Origin", request.headers["origin"])
|
||||
else:
|
||||
response.status = 500
|
||||
else:
|
||||
response.status = 400
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue