зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1632328 [wpt PR 23189] - Add assert_precondition to the lint, a=testonly
Automatic update from web-platform-tests Add assert_precondition to the lint (#23189) This is deprecated in favour of assert_implements and assert_implements_optional. There are a few files left using assert_precondition, added to the lint ignorelist. -- wpt-commits: d3339d0d109fbcf9978c856ed1ce74621b914675 wpt-pr: 23189
This commit is contained in:
Родитель
8ad8a1b19f
Коммит
f78a95a5dd
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>createImageBitmap and drawImage from a blob with image orientation: from-image</title>
|
||||
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation">
|
||||
<link rel="match" href="reference/drawImage-from-blob-ref.html">
|
||||
<script>
|
||||
function makeBlob() {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", '/css/css-images/image-orientation/support/exif-orientation-3-lr.jpg');
|
||||
xhr.responseType = 'blob';
|
||||
xhr.send();
|
||||
xhr.onload = function() {
|
||||
resolve(xhr.response);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var cfb = document.getElementById("canvasWithFileBitmap");
|
||||
makeBlob().then(function(blob){createImageBitmap(blob).then(bitmap => {
|
||||
cfb.getContext("2d").drawImage(bitmap, 0, 0);
|
||||
window.requestAnimationFrame(() => {
|
||||
document.documentElement.removeAttribute("class");
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvasWithFileBitmap" width="300" height="300"></canvas>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>createImageBitmap and drawImage from a blob with image orientation: from-image, reference</title>
|
||||
</head>
|
||||
<body>
|
||||
<img id="img-element" src="../../../../css/css-images/image-orientation/support/exif-orientation-3-lr.jpg">
|
||||
</body>
|
||||
</html>
|
|
@ -756,3 +756,13 @@ TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-circul
|
|||
TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-under-clip-path-crash.html
|
||||
TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-under-defs-crash.html
|
||||
TESTHARNESS-IN-OTHER-TYPE: svg/svg-in-svg/svg-in-svg-circular-filter-reference-crash.html
|
||||
|
||||
# TODO: Temporary inclusions while we deprecate assert_precondition
|
||||
# https://github.com/web-platform-tests/wpt/issues/21971
|
||||
ASSERT-PRECONDITION: infrastructure/expected-fail/precondition.html
|
||||
ASSERT-PRECONDITION: infrastructure/expected-fail/precondition-in-setup.html
|
||||
ASSERT-PRECONDITION: infrastructure/expected-fail/precondition-in-promise.html
|
||||
ASSERT-PRECONDITION: resources/testharness.js
|
||||
ASSERT-PRECONDITION: webrtc/protocol/crypto-suite.https.html
|
||||
ASSERT-PRECONDITION: webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html
|
||||
ASSERT-PRECONDITION: workers/modules/dedicated-worker-parse-error-failure.html
|
||||
|
|
|
@ -392,7 +392,8 @@ regexps = [item() for item in # type: ignore
|
|||
rules.MissingDepsRegexp,
|
||||
rules.SpecialPowersRegexp,
|
||||
rules.AssertThrowsRegexp,
|
||||
rules.PromiseRejectsRegexp]]
|
||||
rules.PromiseRejectsRegexp,
|
||||
rules.AssertPreconditionRegexp]]
|
||||
|
||||
|
||||
def check_regexp_line(repo_root, path, f):
|
||||
|
|
|
@ -478,3 +478,11 @@ class PromiseRejectsRegexp(Regexp):
|
|||
file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"]
|
||||
description = "Test-file line has a `promise_rejects(...)` call"
|
||||
to_fix = """Replace with promise_rejects_dom or promise_rejects_js or `promise_rejects_exactly`"""
|
||||
|
||||
|
||||
class AssertPreconditionRegexp(Regexp):
|
||||
pattern = br"[^.]assert_precondition\("
|
||||
name = "ASSERT-PRECONDITION"
|
||||
file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"]
|
||||
description = "Test-file line has an `assert_precondition(...)` call"
|
||||
to_fix = """Replace with `assert_implements` or `assert_implements_optional`"""
|
||||
|
|
Загрузка…
Ссылка в новой задаче