Update web-platform-tests to revision 3678c44dfe811f93a796285e9531ee34d7d15682

This commit is contained in:
WPT Sync Bot 2018-02-27 20:17:24 -05:00
parent 6fbf2c1e3c
commit b3ccbe1a35
27 changed files with 808 additions and 100 deletions

View file

@ -2,11 +2,11 @@
set -ex
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
WPT_ROOT=$(readlink -f $SCRIPT_DIR/../..)
WPT_ROOT=$(readlink -f $SCRIPT_DIR/..)
cd $WPT_ROOT
main() {
cd css
cd $WPT_ROOT/css
if [ -z $VENV ]; then
VENV=tools/_virtualenv
@ -41,17 +41,14 @@ main() {
# Install dependencies
$VENV/bin/pip install -r requirements.txt
# Fetch hg submodules if they're not there
if [ ! -d tools/apiclient ]; then
$VENV/bin/hg clone https://hg.csswg.org/dev/apiclient tools/apiclient
fi
if [ ! -d tools/w3ctestlib ]; then
$VENV/bin/hg clone https://hg.csswg.org/dev/w3ctestlib tools/w3ctestlib
# Error if submodules are not there
if [ ! -d tools/apiclient -o ! -d tools/w3ctestlib ]; then
echo 'Please run `git submodule update --init --recursive`'
exit 1
fi
# Run the build script
$VENV/bin/python tools/build.py "$@"
}
main
main "$@"

View file

@ -15,8 +15,10 @@
runPropertyTests('white-space', [
{ syntax: 'normal'},
{ syntax: 'nowrap' }
// and other keywords
{ syntax: 'pre' },
{ syntax: 'nowrap' },
{ syntax: 'pre-wrap' },
{ syntax: 'pre-line' },
]);
</script>

View file

@ -1,24 +0,0 @@
<!doctype html>
<meta charset="utf-8">
<title>'white-space' property</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/testhelper.js"></script>
<script src="resources/testsuite.js"></script>
<body>
<div id="log"></div>
<script>
'use strict';
runPropertyTests('white-space', [
{ syntax: 'normal'},
{ syntax: 'pre' },
{ syntax: 'nowrap' },
{ syntax: 'pre-wrap' },
{ syntax: 'pre-line' },
]);
</script>

View file

@ -1,5 +1,6 @@
six==1.10.0
Template-Python==0.1.post1
html5lib==0.9999999
lxml==3.7.3
mercurial==4.1
html5lib==1.0.1
lxml==4.1.1
mercurial==4.5
six==1.11.0
webencodings==0.5.1

View file

@ -12,7 +12,7 @@ import codecs
import collections
from xml import dom
import html5lib
from html5lib import treebuilders, inputstream
from html5lib import treebuilders
from lxml import etree
from lxml.etree import ParseError
from Utils import getMimeFromExt, escapeToNamedASCII, basepath, isPathInsideBase, relativeURL, assetName
@ -1363,10 +1363,8 @@ class HTMLSource(XMLSource):
if data:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
htmlStream = html5lib.inputstream.HTMLInputStream(data)
if ('utf-8-sig' != self.encoding): # if we found a BOM, respect it
self.encoding = htmlStream.detectEncoding()[0]
self.tree = self.__parser.parse(data, encoding = self.encoding)
self.tree = self.__parser.parse(data)
self.encoding = self.__parser.documentEncoding
self.injectedTags = {}
else:
self.tree = None