Do first (small) round of importing W3C reftests into tree. (This provides a test for bug 782401.)

This commit is contained in:
L. David Baron 2012-08-20 19:23:32 -07:00
parent 16cea699bc
commit eb164315fe
40 changed files with 1057 additions and 2 deletions

View File

@ -13,6 +13,7 @@ include ../../image/test/reftest/reftest.list
# CSSWG tests
include w3c-css/submitted/reftest.list
include w3c-css/received/reftest.list
# relative and absolute positioning
include abs-pos/reftest.list

View File

@ -0,0 +1,144 @@
#!/usr/bin/python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# FIXME:
# * Import more tests rather than just the very limited set currently
# chosen.
# - Maybe start by moving layout/reftests/css-namespace/ into this
# directory structure, since it was manually imported.
# * Read in a (checked-in) input file with a list of test assertions
# expected to fail.
# * Read in a (checked-in) input file with a list of reference choices
# for tests with multiple rel="match" references. (But still go
# though all those references in case they, in turn, have references.)
import os
from optparse import OptionParser
from subprocess import Popen, PIPE
import xml.dom.minidom
import html5lib
import shutil
op = OptionParser()
(options, args) = op.parse_args()
if len(args) != 1:
op.error("expected a single argument (path to CSS test repository clone)")
srcpath = args[0]
if not os.path.isdir(srcpath) or \
not os.path.isdir(os.path.join(srcpath, ".hg")):
raise StandardError("source path does not appear to be a mercurial clone")
destpath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "received")
# Since we're going to commit the tests, we should also commit
# information about where they came from.
log = open(os.path.join(destpath, "import.log"), "w")
def log_output_of(subprocess):
subprocess.wait()
if (subprocess.returncode != 0):
raise StandardError("error while running subprocess")
log.write(subprocess.stdout.readline().rstrip())
log.write("Importing revision: ")
log_output_of(Popen(["hg", "parent", "--template={node}"],
stdout=PIPE, cwd=srcpath))
log.write("\nfrom repository: ")
log_output_of(Popen(["hg", "paths", "default"],
stdout=PIPE, cwd=srcpath))
log.write("\n")
# Eventually we should import all the tests that have references. (At
# least for a subset of secs. And we probably want to organize the
# directory structure by spec to avoid constant file moves when files
# move in the W3C repository. And we probably also want to import each
# test only once, even if it covers more than one spec.)
# But for now, let's just import one set of tests.
subtree = os.path.join(srcpath, "contributors", "opera", "submitted", "css3-conditional")
testfiles = []
for dirpath, dirnames, filenames in os.walk(subtree, topdown=True):
if "support" in dirnames:
dirnames.remove("support")
for f in filenames:
if f.find("-ref.") != -1:
continue
testfiles.append(os.path.join(dirpath, f))
testfiles.sort()
filemap = {}
def map_file(fn, spec):
if fn in filemap:
return filemap[fn]
if not fn.startswith(srcpath):
raise StandardError("Filename " + fn + " does not start with " + srcpath)
logname = fn[len(srcpath):]
destname = os.path.join(spec, os.path.basename(fn))
filemap[fn] = destname
log.write("Importing " + logname + " to " + destname + "\n")
destfile = os.path.join(destpath, destname)
destdir = os.path.dirname(destfile)
if not os.path.exists(destdir):
os.makedirs(destdir)
shutil.copyfile(fn, destfile)
return destname
tests = []
def add_test_items(fn, spec):
document = None # an xml.dom.minidom document
if fn.endswith(".htm") or fn.endswith(".html"):
# An HTML file
f = open(fn, "r")
parser = html5lib.HTMLParser(tree=html5lib.treebuilders.getTreeBuilder("dom"))
document = parser.parse(f)
f.close()
else:
# An XML file
document = xml.dom.minidom.parse(fn)
refs = []
notrefs = []
for link in document.getElementsByTagName("link"):
rel = link.getAttribute("rel")
if rel == "help" and spec == None:
specurl = link.getAttribute("href")
startidx = specurl.find("/TR/")
if startidx != -1:
startidx = startidx + 4
endidx = specurl.find("/", startidx)
if endidx != -1:
spec = str(specurl[startidx:endidx])
if rel == "match":
arr = refs
elif rel == "mismatch":
arr = notrefs
else:
continue
arr.append(os.path.join(os.path.dirname(fn), str(link.getAttribute("href"))))
if len(refs) > 1:
raise StandardError("Need to add code to specify which reference we want to match.")
if spec is None:
raise StandardError("Could not associate test with specification")
for ref in refs:
tests.append(["==", map_file(fn, spec), map_file(ref, spec)])
for notref in notrefs:
tests.append(["!=", map_file(fn, spec), map_file(notref, spec)])
# Add chained references too
for ref in refs:
add_test_items(ref, spec=spec)
for notref in notrefs:
add_test_items(notref, spec=spec)
for t in testfiles:
add_test_items(t, spec=None)
listfile = open(os.path.join(destpath, "reftest.list"), "w")
for test in tests:
listfile.write(" ".join(test) + "\n")
listfile.close()
log.close()

View File

@ -1,5 +1,5 @@
W3C CSS Test Suite Import Directory
-----------------------------------
This directory will contain reftests pulled from the CSSWG test repository.
It's not set up yet.
This directory contains reftests pulled from the CSSWG test repository
using ../import-tests.py .

View File

@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<style>
div {
background-color:green;
height:100px;
width:100px;
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<head>
<title>CSS Test (Conditional Rules): Support for simple passing conditions in @supports</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 0) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div>
</div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Support for @supports within @media</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@media all {
@supports (margin: 0) {
div { background-color:green; }
}
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Support for @media within @supports</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 0) {
@media all{
div { background-color:green; }
}
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): @supports within non-matching @media should not apply</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0) { div { background-color:green; } }
@media not all {
@supports (margin: 0) {
div { background-color:red; }
}
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): non-matching @media within @supports should not apply</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0) { div { background-color:green; } }
@supports (margin: 0) {
@media not all {
div { background-color:red; }
}
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Nested parens around conditions in @supports should work</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((margin: 0)) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Conjunctions of passing simple conditions in @supports should pass</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((margin: 0) and (display:inline-block !important)) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Disjunctions with at least a passing simple condition in @supports should pass</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((margin: 0) or (foo: 15em)) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Negations of failing simple conditions in @supports should pass</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (not (yadayada: x, calc( 2/3 ))) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Combinations of conjuctions, disjunctions, and negations of simple conditions in @supports should work</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((yada: 2kg !trivial) or ((not (foo:bar)) and (((visibility:hidden))))) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Conditions not enclosed in parens in @supports should not work</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0) { div { background-color:green; } }
@supports margin: 0 {
div { background-color:red; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Conjunctions with more than two terms in @supports should work</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((margin: 0) and (background: blue) and (padding:inherit)) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Disjunction with more than two terms in @supports should work</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((yoyo: yaya) or (margin: 0) or (answer: 42)) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Negations in @supports should not work if "not" isn't follow by a space</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (width: 0) {
div { background-color:green; }
}
@supports (not(foo: baz)) {
div { background-color:red; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Bizarre syntax that still conforms to the core grammar should succesfully parse in @supports</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (not (foo: baz !unrelated $ ,/[&])) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): In @supports, parens are required to mix conjunctions with disjunctions</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div{
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0) { div { background-color:green; } }
@supports ((margin: 0) and (display: inline) or (width:1em)) {
div { background-color:red; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): In @supports, functions can be parsed successfully</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background:red;
height:100px;
width:100px;
}
@supports (background: url("http://www.example.com/foo.jpg")) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): In @supports conditions, the arguments of a function can begin with spaces</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="">
<style>
div {
background:red;
height:100px;
width:100px;
}
@supports (not (width:compute( 2px + 2px ))) {
div { background-color:green; }
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: ) {
div { background-color:red !important; }
}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 2px) ) {
div { background-color:red !important; }
}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0 );
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports [margin: 0] {
div { background-color:red !important; }
}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in nested @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@media all {
@supports (width: 0)) {}
@supports (margin:0) { div { background-color:green !important; } }
}
div { background-color:red; }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports;
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ((margin:0) and [padding:0]) {
div { background-color:red !important; }
}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 0]) {
div { background-color:red !important; }
}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<style>
div {
background-color:green;
height:100px;
width:100px;
}
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-027-ref.html">
<meta name="flags" content="invalid">
<style>
@supports (margin:0) { div { background-color:green; } }
div {
height:100px;
width:100px;
}
@supports (margin: 0)
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 0)) {}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-027-ref.html">
<meta name="flags" content="invalid">
<style>
@supports (margin:0) { div { background-color:green; } }
div {
height:100px;
width:100px;
}
@supports (margin: 0) !
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin:0) { div { background-color:green; } }
@supports ((margin: 0) and ;
div { background-color:red; }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports (margin: 0)) ;
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports {}
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<title>CSS Test (Conditional Rules): Incorrect syntax in @supports recovers properly</title>
<link rel="author" title="Florian Rivoal" href="mailto:florianr@opera.com">
<link rel="help" href="http://www.w3.org/TR/css3-conditional/#at-supports">
<link rel="match" href="at-supports-001-ref.html">
<meta name="flags" content="invalid">
<style>
div {
background-color:red;
height:100px;
width:100px;
}
@supports ;
@supports (margin:0) { div { background-color:green; } }
</style>
</head>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>
</html>

View File

@ -0,0 +1,37 @@
Importing revision: aa7ad3ba9510c83ad82c7b81121dfe689c1541dc
from repository: https://hg.csswg.org/test
Importing contributors/opera/submitted/css3-conditional/at-supports-001.html to css3-conditional/at-supports-001.html
Importing contributors/opera/submitted/css3-conditional/at-supports-001-ref.html to css3-conditional/at-supports-001-ref.html
Importing contributors/opera/submitted/css3-conditional/at-supports-002.html to css3-conditional/at-supports-002.html
Importing contributors/opera/submitted/css3-conditional/at-supports-003.html to css3-conditional/at-supports-003.html
Importing contributors/opera/submitted/css3-conditional/at-supports-004.html to css3-conditional/at-supports-004.html
Importing contributors/opera/submitted/css3-conditional/at-supports-005.html to css3-conditional/at-supports-005.html
Importing contributors/opera/submitted/css3-conditional/at-supports-006.html to css3-conditional/at-supports-006.html
Importing contributors/opera/submitted/css3-conditional/at-supports-007.html to css3-conditional/at-supports-007.html
Importing contributors/opera/submitted/css3-conditional/at-supports-008.html to css3-conditional/at-supports-008.html
Importing contributors/opera/submitted/css3-conditional/at-supports-009.html to css3-conditional/at-supports-009.html
Importing contributors/opera/submitted/css3-conditional/at-supports-010.html to css3-conditional/at-supports-010.html
Importing contributors/opera/submitted/css3-conditional/at-supports-011.html to css3-conditional/at-supports-011.html
Importing contributors/opera/submitted/css3-conditional/at-supports-012.html to css3-conditional/at-supports-012.html
Importing contributors/opera/submitted/css3-conditional/at-supports-013.html to css3-conditional/at-supports-013.html
Importing contributors/opera/submitted/css3-conditional/at-supports-014.html to css3-conditional/at-supports-014.html
Importing contributors/opera/submitted/css3-conditional/at-supports-015.html to css3-conditional/at-supports-015.html
Importing contributors/opera/submitted/css3-conditional/at-supports-016.html to css3-conditional/at-supports-016.html
Importing contributors/opera/submitted/css3-conditional/at-supports-017.html to css3-conditional/at-supports-017.html
Importing contributors/opera/submitted/css3-conditional/at-supports-018.html to css3-conditional/at-supports-018.html
Importing contributors/opera/submitted/css3-conditional/at-supports-019.html to css3-conditional/at-supports-019.html
Importing contributors/opera/submitted/css3-conditional/at-supports-020.html to css3-conditional/at-supports-020.html
Importing contributors/opera/submitted/css3-conditional/at-supports-021.html to css3-conditional/at-supports-021.html
Importing contributors/opera/submitted/css3-conditional/at-supports-022.html to css3-conditional/at-supports-022.html
Importing contributors/opera/submitted/css3-conditional/at-supports-023.html to css3-conditional/at-supports-023.html
Importing contributors/opera/submitted/css3-conditional/at-supports-024.html to css3-conditional/at-supports-024.html
Importing contributors/opera/submitted/css3-conditional/at-supports-025.html to css3-conditional/at-supports-025.html
Importing contributors/opera/submitted/css3-conditional/at-supports-026.html to css3-conditional/at-supports-026.html
Importing contributors/opera/submitted/css3-conditional/at-supports-027.html to css3-conditional/at-supports-027.html
Importing contributors/opera/submitted/css3-conditional/at-supports-027-ref.html to css3-conditional/at-supports-027-ref.html
Importing contributors/opera/submitted/css3-conditional/at-supports-028.html to css3-conditional/at-supports-028.html
Importing contributors/opera/submitted/css3-conditional/at-supports-029.html to css3-conditional/at-supports-029.html
Importing contributors/opera/submitted/css3-conditional/at-supports-030.html to css3-conditional/at-supports-030.html
Importing contributors/opera/submitted/css3-conditional/at-supports-031.html to css3-conditional/at-supports-031.html
Importing contributors/opera/submitted/css3-conditional/at-supports-032.html to css3-conditional/at-supports-032.html
Importing contributors/opera/submitted/css3-conditional/at-supports-033.html to css3-conditional/at-supports-033.html

View File

@ -0,0 +1,33 @@
== css3-conditional/at-supports-001.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-002.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-003.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-004.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-005.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-006.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-007.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-008.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-009.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-010.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-011.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-012.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-013.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-014.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-015.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-016.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-017.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-018.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-019.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-020.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-021.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-022.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-023.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-024.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-025.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-026.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-027.html css3-conditional/at-supports-027-ref.html
== css3-conditional/at-supports-028.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-029.html css3-conditional/at-supports-027-ref.html
== css3-conditional/at-supports-030.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-031.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-032.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-033.html css3-conditional/at-supports-001-ref.html