Example 14.3 in CSS3 background-size
background-size: length auto
:
background-repeat: round repeat
:
round
for width and auto
for height, so height is scaled to keep the image's original aspect ratio
<!DOCTYPE html>
<title>[Test Area]: [Title/Scope of Test]</title>
<link rel="author" title="[Name of Author]" href=mailto:EMAIL OR
http://CONTACT_PAGE">
<link rel="help" href="http://www.w3.org/TR/[direct link to tested
section]">
<link rel="match" href="[path to reference file]">
<meta name="flags" content="[requirement flags]">
<meta name="assert" content="Test checks that [explanation of what
you're trying to test].">
<style>
[CSS for test]
</style>
<body>
<p> Test passes if [description of pass condition].</p>
[Content of test]
</body>
The reference file should look exactly like the test file, except that the code behind it is different.
assert
metadata is taken out.title
is generic, as this file can and may be shared among multiple testsmatch
(or mismatch
) metadata not necessary
<!DOCTYPE html>
<title>[Test Area] Reference File</title>
<link rel="author" title="[Name of Author]" href=mailto:EMAIL OR
http://CONTACT_PAGE">
<style>
[CSS for test]
</style>
<body>
<p> Test passes if [description of pass condition].</p>
[Content of test]
</body>
<link rel="match" href="reference/background-size-029-ref.xht">
The last subtest on this page shows this problem.
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<div id="log"></div>
Blob Interface in FileAPI
Blob Constructor in FileAPI
blob = Blob():
<!DOCTYPE html>
<title>[Test Area]: [Title/Scope of Test]</title>
<link rel="author" title="[Name of Author]" href=mailto:EMAIL OR
http://CONTACT_PAGE">
<link rel="help" href="http://www.w3.org/TR/[direct link to tested
section]">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<div id="log"></div>
<script>
test(function() {
[body of test function - must include at least one assert*()
function]
}, [Test Name]);
/* Include as many test() functions as you need */
</script>