mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
fb1d8e15cb
MozReview-Commit-ID: LvpIb2OK2GS --HG-- rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/challenge-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/keytype-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/model-also-novalid.html rename : testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-isvalid.html => testing/web-platform/tests/conformance-checkers/html/elements/keygen/no-attributes-novalid.html rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/054-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/055-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/056-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/057-also-novalid.xhtml rename : testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-isvalid.xhtml => testing/web-platform/tests/conformance-checkers/xhtml/elements/keygen/058-also-novalid.xhtml rename : testing/web-platform/tests/html-media-capture/capture_fallback_file_upload.html => testing/web-platform/tests/html-media-capture/capture_fallback_file_upload-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-start-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-stop-manual.html rename : testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.html => testing/web-platform/tests/service-workers/cache-storage/serviceworker/credentials.https.html
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
|
<title>OffscreenCanvas test: 2d.composite.uncovered.pattern.copy</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/common/canvas-tests.js"></script>
|
|
|
|
<h1>2d.composite.uncovered.pattern.copy</h1>
|
|
<p class="desc">Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.</p>
|
|
|
|
|
|
<script>
|
|
var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.");
|
|
t.step(function() {
|
|
|
|
var offscreenCanvas = new OffscreenCanvas(100, 50);
|
|
var ctx = offscreenCanvas.getContext('2d');
|
|
|
|
|
|
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
|
|
ctx.fillRect(0, 0, 100, 50);
|
|
ctx.globalCompositeOperation = 'copy';
|
|
var promise = new Promise(function(resolve, reject) {
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open("GET", '/images/yellow.png');
|
|
xhr.responseType = 'blob';
|
|
xhr.send();
|
|
xhr.onload = function() {
|
|
resolve(xhr.response);
|
|
};
|
|
});
|
|
promise.then(function(response) {
|
|
ctx.fillStyle = ctx.createPattern(response, 'no-repeat');
|
|
ctx.fillRect(0, 50, 100, 50);
|
|
_assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
|
|
});
|
|
|
|
t.done();
|
|
|
|
});
|
|
</script>
|