Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb

This commit is contained in:
WPT Sync Bot 2019-03-28 22:09:18 -04:00
parent fcd6beb608
commit cb63cfd5c7
185 changed files with 3083 additions and 1074 deletions

View file

@ -8,3 +8,6 @@
[Test default context creation attributes] [Test default context creation attributes]
expected: FAIL expected: FAIL
[Test context creation attributes desynchronized: false]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
[client-hint-request-headers-2.tentative.htm]
[Client hint headers are simple headers]
expected: FAIL

View file

@ -0,0 +1,10 @@
[simple-requests-ch.tentative.htm]
[No preflight HEAD and {"save-data":"on","device-memory":"2.0","dpr":"3.0","width":"1200","viewport-width":"1300"}]
expected: FAIL
[No preflight POST and {"save-data":"on","device-memory":"2.0","dpr":"3.0","width":"1200","viewport-width":"1300"}]
expected: FAIL
[No preflight GET and {"save-data":"on","device-memory":"2.0","dpr":"3.0","width":"1200","viewport-width":"1300"}]
expected: FAIL

View file

@ -0,0 +1,2 @@
[first-line-000.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[lang-pseudoclass-002.xht]
expected: FAIL

View file

@ -32,7 +32,7 @@
[single-byte-decoder.html?XMLHttpRequest] [single-byte-decoder.html?XMLHttpRequest]
expected: CRASH expected: TIMEOUT
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)] [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL expected: FAIL
@ -55,17 +55,14 @@
expected: FAIL expected: FAIL
[windows-1252: iso_8859-1:1987 (XMLHttpRequest)] [windows-1252: iso_8859-1:1987 (XMLHttpRequest)]
expected: FAIL expected: TIMEOUT
[windows-1254: iso_8859-9:1989 (XMLHttpRequest)] [windows-1254: iso_8859-9:1989 (XMLHttpRequest)]
expected: TIMEOUT expected: FAIL
[windows-1254: windows-1254 (XMLHttpRequest)] [windows-1254: windows-1254 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[x-mac-cyrillic: x-mac-ukrainian (XMLHttpRequest)]
expected: TIMEOUT
[windows-1257: cp1257 (XMLHttpRequest)] [windows-1257: cp1257 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
@ -78,9 +75,6 @@
[windows-1254: latin5 (XMLHttpRequest)] [windows-1254: latin5 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1256: x-cp1256 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1255: cp1255 (XMLHttpRequest)] [windows-1255: cp1255 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
@ -90,18 +84,12 @@
[windows-1258: x-cp1258 (XMLHttpRequest)] [windows-1258: x-cp1258 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1255: x-cp1255 (XMLHttpRequest)]
expected: TIMEOUT
[x-mac-cyrillic: x-mac-cyrillic (XMLHttpRequest)] [x-mac-cyrillic: x-mac-cyrillic (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1258: cp1258 (XMLHttpRequest)] [windows-1258: cp1258 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1256: cp1256 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1257: x-cp1257 (XMLHttpRequest)] [windows-1257: x-cp1257 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
@ -126,7 +114,34 @@
[windows-1254: iso-ir-148 (XMLHttpRequest)] [windows-1254: iso-ir-148 (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT
[windows-1256: windows-1256 (XMLHttpRequest)] [windows-1254: iso_8859-9 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1257: windows-1257 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: iso_8859-1 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1253: windows-1253 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1253: cp1253 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: x-cp1252 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1258: windows-1258 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: l1 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: windows-1252 (XMLHttpRequest)]
expected: TIMEOUT
[windows-1252: us-ascii (XMLHttpRequest)]
expected: TIMEOUT expected: TIMEOUT

View file

@ -312,18 +312,3 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain;charset=gbk text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20no%0D%0AX-Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

@ -0,0 +1,2 @@
[navigation.https.sub.html]
expected: TIMEOUT

View file

@ -0,0 +1,10 @@
[trailing-dot.tentative.https.sub.html]
[Fetching a resource from a cross-site host, spelled with a trailing dot.]
expected: FAIL
[Fetching a resource from the same origin, but spelled with a trailing dot.]
expected: FAIL
[Fetching a resource from the same site, but spelled with a trailing dot.]
expected: FAIL

View file

@ -1,5 +0,0 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT

View file

@ -1,4 +0,0 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

@ -1,4 +0,0 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,37 @@
[navigated-named-objects.window.html]
[Window's associated Document object is used for finding named objects (<iframe> via same-origin <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> via srcdoc <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<iframe> via cross-site <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<div> via same-origin <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> with browsing ccontext via srcdoc <iframe)>]
expected: FAIL
[Window's associated Document object is used for finding named objects (<div> via cross-site <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> with browsing ccontext via same-origin <iframe)>]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> with browsing ccontext via cross-site <iframe)>]
expected: FAIL
[Window's associated Document object is used for finding named objects (<div> via srcdoc <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> via same-origin <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<object> via cross-site <iframe>)]
expected: FAIL
[Window's associated Document object is used for finding named objects (<iframe> via srcdoc <iframe>)]
expected: FAIL

View file

@ -1,10 +0,0 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,4 +1,5 @@
[realtimeanalyser-fft-scaling.html] [realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.] [X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL expected: FAIL

View file

@ -1,6 +1,5 @@
[003.html] [003.html]
type: testharness type: testharness
expected: ERROR
[shared] [shared]
expected: FAIL expected: FAIL

View file

@ -1,5 +0,0 @@
[access-control-basic-cors-safelisted-request-headers.htm]
type: testharness
[Request with CORS-safelisted headers]
expected: FAIL

View file

@ -1,2 +0,0 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -163,11 +163,14 @@ jobs:
condition: always() condition: always()
- template: tools/ci/azure/cleanup_win10.yml - template: tools/ci/azure/cleanup_win10.yml
# All `./wpt run` tests are run from epochs/* branches on a schedule. See
# documentation at the top of this file for required setup.
- job: results_edge - job: results_edge
displayName: 'all tests (Edge)' displayName: 'all tests (Edge)'
# This job is only triggered manually until it has been shown to be robust. condition: |
condition: and(eq(variables['Build.Reason'], 'Manual'), variables['run_all_edge']) or(eq(variables['Build.Reason'], 'Schedule'),
# There are 5 agents in the pool, but use more jobs so that each takes <1h. and(eq(variables['Build.Reason'], 'Manual'), variables['run_all_edge']))
# There are 12 agents in the pool, but use more jobs so that each takes <1h.
strategy: strategy:
parallel: 20 parallel: 20
timeoutInMinutes: 360 timeoutInMinutes: 360
@ -195,8 +198,40 @@ jobs:
dependsOn: results_edge dependsOn: results_edge
artifactName: edge-results artifactName: edge-results
# All `./wpt run` tests are run from epochs/* branches on a schedule. See - job: results_safari
# documentation at the top of this file for required setup. displayName: 'all tests (Safari)'
condition: eq(variables['Build.Reason'], 'Schedule')
strategy:
parallel: 4 # chosen to make runtime ~2h
timeoutInMinutes: 360
pool:
vmImage: 'macOS-10.13'
steps:
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/pip_install.yml
parameters:
packages: virtualenv
- template: tools/ci/azure/install_fonts.yml
- template: tools/ci/azure/install_certs.yml
- template: tools/ci/azure/install_safari.yml
parameters:
channel: stable
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- script: |
# TODO: drop this when `safaridriver --version` is supported.
SAFARI_VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' /Applications/Safari.app/Contents/Info.plist) ($(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' /Applications/Safari.app/Contents/Info.plist))"
no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --browser-version "$SAFARI_VERSION" safari
displayName: 'Run tests'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
inputs:
artifactName: 'safari-results'
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_safari
artifactName: safari-results
- job: results_safari_preview - job: results_safari_preview
displayName: 'all tests (Safari Technology Preview)' displayName: 'all tests (Safari Technology Preview)'
condition: | condition: |

View file

@ -0,0 +1,16 @@
workflow "Build & Release Manifest" {
on = "push"
resolves = ["tag-master"]
}
action "build-manifest" {
uses = "./tools/docker/github"
runs = ["bash", "-c", "tools/ci/action_manifest_build.sh"]
}
action "tag-master" {
needs = "build-manifest"
uses = "./tools/docker/github"
runs = ["python", "tools/ci/tag_master.py"]
secrets = ["GITHUB_TOKEN"]
}

View file

@ -1,18 +1,20 @@
# Python # Python
*.py[co] *.py[co]
.virtualenv/
_venv/
.cache/ .cache/
.coverage*
.pytest_cache/ .pytest_cache/
.tox/ .tox/
.coverage* .virtualenv/
_venv/
_virtualenv/
# Node # Node
node_modules/ node_modules/
# WPT repo stuff # WPT repo stuff
/MANIFEST.json
.wptcache/ .wptcache/
/MANIFEST.json
/_certs
/config.json /config.json
# Files generated when regenerating pre-generated certs # Files generated when regenerating pre-generated certs
@ -22,11 +24,25 @@ node_modules/
# Various OS/editor specific files # Various OS/editor specific files
*# *#
*.orig
*.rej
*.svn
*.sw[po] *.sw[po]
*.xcodeproj
*Thumbs.db
*~ *~
\#* .DS_Store
scratch .directory*
.idea/ .idea/
.vscode/ .vscode/
.DS_Store \#*
*.rej scratch
# Testsuite-specific rules
/conformance-checkers/vnu.jar
/cors/resources/log.txt
/css/build-temp
/css/dist
/css/dist_last
/css/tools/cache
/webaudio/idl/*

View file

@ -64,7 +64,7 @@ tasks:
owner: ${event.pusher.email} owner: ${event.pusher.email}
source: ${event.repository.url} source: ${event.repository.url}
payload: payload:
image: harjgam/web-platform-tests:0.30 image: harjgam/web-platform-tests:0.32
maxRunTime: 7200 maxRunTime: 7200
artifacts: artifacts:
public/results: public/results:
@ -80,10 +80,10 @@ tasks:
echo "wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}"; echo "wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}";
~/start.sh ~/start.sh
${event.repository.url} ${event.repository.url}
${event.ref} ${event.ref};
${event.after};
cd ~/web-platform-tests; cd ~/web-platform-tests;
./tools/ci/run_tc.py ./tools/ci/run_tc.py
--checkout=${event.after}
--oom-killer --oom-killer
--hosts --hosts
--browser=${browser.name} --browser=${browser.name}
@ -112,15 +112,15 @@ tasks:
$map: $map:
# This is the main place to define new stability checks # This is the main place to define new stability checks
- name: wpt-${browser.name}-${browser.channel}-stability - name: wpt-${browser.name}-${browser.channel}-stability
checkout: FETCH_HEAD checkout: task_head
diff_range: HEAD^ diff_base: base_head
description: >- description: >-
Verify that all tests affected by a pull request are stable Verify that all tests affected by a pull request are stable
when executed in ${browser.name}. when executed in ${browser.name}.
extra_args: '--verify' extra_args: '--verify'
- name: wpt-${browser.name}-${browser.channel}-results - name: wpt-${browser.name}-${browser.channel}-results
checkout: FETCH_HEAD checkout: task_head
diff_range: HEAD^ diff_base: base_head
description: >- description: >-
Collect results for all tests affected by a pull request in Collect results for all tests affected by a pull request in
${browser.name}. ${browser.name}.
@ -129,8 +129,8 @@ tasks:
--log-wptreport=../artifacts/wpt_report.json --log-wptreport=../artifacts/wpt_report.json
--log-wptscreenshot=../artifacts/wpt_screenshot.txt --log-wptscreenshot=../artifacts/wpt_screenshot.txt
- name: wpt-${browser.name}-${browser.channel}-results-without-changes - name: wpt-${browser.name}-${browser.channel}-results-without-changes
checkout: FETCH_HEAD^ checkout: base_head
diff_range: FETCH_HEAD diff_base: task_head
description: >- description: >-
Collect results for all tests affected by a pull request in Collect results for all tests affected by a pull request in
${browser.name} but without the changes in the PR. ${browser.name} but without the changes in the PR.
@ -156,7 +156,7 @@ tasks:
owner: ${event.pull_request.user.login}@users.noreply.github.com owner: ${event.pull_request.user.login}@users.noreply.github.com
source: ${event.repository.url} source: ${event.repository.url}
payload: payload:
image: harjgam/web-platform-tests:0.30 image: harjgam/web-platform-tests:0.32
maxRunTime: 7200 maxRunTime: 7200
artifacts: artifacts:
public/results: public/results:
@ -178,8 +178,7 @@ tasks:
echo "${operation.name}"; echo "${operation.name}";
~/start.sh ~/start.sh
${event.repository.clone_url} ${event.repository.clone_url}
refs/pull/${event.number}/merge refs/pull/${event.number}/merge;
FETCH_HEAD;
cd web-platform-tests; cd web-platform-tests;
./tools/ci/run_tc.py ./tools/ci/run_tc.py
--checkout=${operation.checkout} --checkout=${operation.checkout}
@ -189,7 +188,7 @@ tasks:
--xvfb --xvfb
stability stability
./tools/ci/taskcluster-run.py ./tools/ci/taskcluster-run.py
--commit-range ${operation.diff_range} --commit-range ${operation.diff_base}
${browser.name} ${browser.name}
-- --
--channel=${browser.channel} --channel=${browser.channel}
@ -310,7 +309,7 @@ tasks:
owner: ${event.sender.login}@users.noreply.github.com owner: ${event.sender.login}@users.noreply.github.com
source: ${event.repository.url} source: ${event.repository.url}
payload: payload:
image: harjgam/web-platform-tests:0.30 image: harjgam/web-platform-tests:0.32
maxRunTime: 7200 maxRunTime: 7200
artifacts: artifacts:
public/results: public/results:
@ -326,7 +325,6 @@ tasks:
echo "${operation.name}"; echo "${operation.name}";
~/start.sh ~/start.sh
${event.repository.clone_url} ${event.repository.clone_url}
${checkout_ref} ${checkout_ref};
FETCH_HEAD;
cd ~/web-platform-tests; cd ~/web-platform-tests;
${operation.script}; ${operation.script};

View file

@ -1,49 +0,0 @@
dist: trusty
sudo: required
language: python
branches:
only:
- master
before_install:
# This needs be sourced as it sets various env vars
- . ./tools/ci/before_install.sh
install:
- ./tools/ci/install.sh
matrix:
# The use of `if` conditionals to exclude jobs from master should align with
# jobs unconditionally listed by `./wpt test-jobs`, regardless of affected
# paths. (The reverse is not true, as the manifest job could run on PRs too.)
fast_finish: true
include:
- name: "tag master + upload manifest"
if: type = push AND branch = master
os: linux
python: "2.7"
env:
- JOB=manifest_upload SCRIPT=tools/ci/ci_manifest.sh
- secure: "FrlMkMZiwggnhJbLiLxZ4imtXxuzFNozty94g1mneMPEVLrnyhb6c/g2SwN37KKU0WSDlGTz26IYnFvo1ftfSOx+sjRz0HqwW7JnrXULKYo7jiPttIcmeJxlSVeW9yS4blbLaBakytHjSnsf+za7bAaf1aS7RRAtAINgifA6Chg="
deploy:
provider: releases
api_key:
secure: "EljDx50oNpDLs7rzwIv+z1PxIgB5KMnx1W0OQkpNvltR0rBW9g/aQaE+Z/c8M/sPqN1bkvKPybKzGKjb6j9Dw3/EJhah4SskH78r3yMAe2DU/ngxqqjjfXcCc2t5MKxzHAILTAxqScPj2z+lG1jeK1Z+K5hTbSP9lk+AvS0D16w="
file: $WPT_MANIFEST_FILE.gz
skip_cleanup: true
- name: "build-css-testsuites.sh"
if: type = pull_request
os: linux
python: "2.7"
env: JOB=build_css SCRIPT=css/build-css-testsuites.sh
exclude:
- env: # exclude empty env from the top-level above
allow_failures:
- env: JOB=build_css SCRIPT=css/build-css-testsuites.sh
script:
- ./tools/ci/run.sh
cache:
directories:
- $HOME/.cache/pip
- $HOME/meta
notifications:
email:
on_success: never
on_failure: always

View file

@ -6,13 +6,16 @@
var testScenarios = [ var testScenarios = [
{testDescription: "Test default context creation attributes", {testDescription: "Test default context creation attributes",
canvasContextAttributes: {}, canvasContextAttributes: {},
expectedContextAttributes: {alpha : true}}, expectedContextAttributes: {alpha : true, desynchronized: false}},
{testDescription: "Test context creation attributes alpha: true", {testDescription: "Test context creation attributes alpha: true",
canvasContextAttributes: {alpha: true}, canvasContextAttributes: {alpha: true},
expectedContextAttributes: {alpha : true}}, expectedContextAttributes: {alpha : true}},
{testDescription: "Test context creation attributes alpha: false", {testDescription: "Test context creation attributes alpha: false",
canvasContextAttributes: {alpha: false}, canvasContextAttributes: {alpha: false},
expectedContextAttributes: {alpha : false}}, expectedContextAttributes: {alpha : false}},
{testDescription: "Test context creation attributes desynchronized: false",
canvasContextAttributes: {desynchronized: false},
expectedContextAttributes: {desynchronized : false}},
]; ];
function runTestScenario(testScenario) { function runTestScenario(testScenario) {
@ -20,8 +23,14 @@ function runTestScenario(testScenario) {
var canvas = document. createElement('canvas'); var canvas = document. createElement('canvas');
var ctx = canvas.getContext('2d', testScenario.canvasContextAttributes); var ctx = canvas.getContext('2d', testScenario.canvasContextAttributes);
var contextAttributes = ctx.getContextAttributes(); var contextAttributes = ctx.getContextAttributes();
assert_equals(contextAttributes.alpha, if (testScenario.expectedContextAttributes.alpha !== undefined) {
testScenario.expectedContextAttributes.alpha); assert_equals(contextAttributes.alpha,
testScenario.expectedContextAttributes.alpha);
}
if (testScenario.expectedContextAttributes.desynchronized !== undefined) {
assert_equals(contextAttributes.desynchronized,
testScenario.expectedContextAttributes.desynchronized);
}
}, testScenario.testDescription); }, testScenario.testDescription);
} }

View file

@ -1,3 +1,4 @@
// META: timeout=long
const blob = new Blob(['test']); const blob = new Blob(['test']);
const file = new File(['test'], 'name'); const file = new File(['test'], 'name');

View file

@ -0,0 +1,6 @@
def main(request, response):
# Without X-XSS-Protection to disable non-standard XSS protection the functionality this
# resource offers is useless
response.headers.set("X-XSS-Protection", "0")
response.headers.set("Content-Type", "text/html")
response.content = request.GET.first("content")

View file

@ -1 +0,0 @@
vnu.jar

View file

@ -1,5 +1,6 @@
<!doctype html> <!doctype html>
<html lang="">
<meta charset=utf-8> <meta charset=utf-8>
<title>valid download</title> <title>valid download</title>
<a download>foo</a><!-- empty download --> <a href=foo download>foo</a><!-- empty download -->
<a download=baz>foo</a><!-- arbitrary value for download --> <a href=foo download=baz>foo</a><!-- arbitrary value for download -->

View file

@ -0,0 +1,5 @@
<!doctype html>
<html lang="">
<meta charset=utf-8>
<title>invalid download</title>
<a download>foo</a><!-- download without href -->

View file

@ -98,6 +98,7 @@
"html/attributes/lang/xmllang-only-novalid.html": "When the attribute \u201cxml:lang\u201d in no namespace is specified, the element must also have the attribute \u201clang\u201d present with the same value.", "html/attributes/lang/xmllang-only-novalid.html": "When the attribute \u201cxml:lang\u201d in no namespace is specified, the element must also have the attribute \u201clang\u201d present with the same value.",
"html/attributes/role/unrecognized-role-name-novalid.html": "Discarding unrecognized token \u201cinput\u201d from value of attribute \u201crole\u201d. Browsers ignore any token that is not a defined ARIA non-abstract role.", "html/attributes/role/unrecognized-role-name-novalid.html": "Discarding unrecognized token \u201cinput\u201d from value of attribute \u201crole\u201d. Browsers ignore any token that is not a defined ARIA non-abstract role.",
"html/attributes/spellcheck/value-bad-novalid.html": "Bad value \u201cbadvalue\u201d for attribute \u201cspellcheck\u201d on element \u201cp\u201d.", "html/attributes/spellcheck/value-bad-novalid.html": "Bad value \u201cbadvalue\u201d for attribute \u201cspellcheck\u201d on element \u201cp\u201d.",
"html/elements/a/download-novalid.html": "Element \u201ca\u201d is missing required attribute \u201chref\u201d.",
"html/elements/a/href/fragment-backslash-novalid.html": "Bad value \u201c#\\\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: \u201c\\\u201d is not allowed.", "html/elements/a/href/fragment-backslash-novalid.html": "Bad value \u201c#\\\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: \u201c\\\u201d is not allowed.",
"html/elements/a/href/fragment-contains-hash-novalid.html": "Bad value \u201chttp://foo/path#f#g\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: \u201c#\u201d is not allowed.", "html/elements/a/href/fragment-contains-hash-novalid.html": "Bad value \u201chttp://foo/path#f#g\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: \u201c#\u201d is not allowed.",
"html/elements/a/href/fragment-leading-space-novalid.html": "Bad value \u201chttp://f:21/b# e\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: space is not allowed.", "html/elements/a/href/fragment-leading-space-novalid.html": "Bad value \u201chttp://f:21/b# e\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in fragment: space is not allowed.",

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>CORS and Client Hints, potentially</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js?pipe=sub></script>
<h1>Request headers</h1>
<div id=log></div>
<script>
test(function() {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN + 'resources/cors-makeheader.py?headers=x-print,', false)
client.setRequestHeader('x-print', 'unicorn')
client.setRequestHeader('content-type', 'text/plain')
client.setRequestHeader('accept', 'test')
client.setRequestHeader('accept-language', 'nn')
client.setRequestHeader('content-language', 'nn')
client.setRequestHeader('save-data', 'on')
client.setRequestHeader('device-memory', '1.0')
client.setRequestHeader('dpr', '2.0')
client.setRequestHeader('width', '35')
client.setRequestHeader('viewport-width', '42')
client.send(null)
const res = JSON.parse(client.response)
assert_equals(res['x-print'], 'unicorn')
assert_equals(res['content-type'], 'text/plain')
assert_equals(res['accept'], 'test')
assert_equals(res['accept-language'], 'nn')
assert_equals(res['content-language'], 'nn')
assert_equals(res['save-data'], 'on')
assert_equals(res['device-memory'], '1.0')
assert_equals(res['dpr'], '2.0')
assert_equals(res['width'], '35')
assert_equals(res['viewport-width'], '42')
}, 'Client hint headers are simple headers')
</script>

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset=utf-8> <meta charset=utf-8>
<title>CORS - client hint request headers - Access-Control-Allow-Headers</title> <title>CORS and Client Hints</title>
<script src=/resources/testharness.js></script> <script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script> <script src=/resources/testharnessreport.js></script>
@ -10,34 +10,6 @@
<div id=log></div> <div id=log></div>
<script> <script>
test(function() {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN + 'resources/cors-makeheader.py?headers=x-print,', false)
client.setRequestHeader('x-print', 'unicorn')
client.setRequestHeader('content-type', 'text/plain')
client.setRequestHeader('accept', 'test')
client.setRequestHeader('accept-language', 'nn')
client.setRequestHeader('content-language', 'nn')
client.setRequestHeader('save-data', 'on')
client.setRequestHeader('device-memory', '1.0')
client.setRequestHeader('dpr', '2.0')
client.setRequestHeader('width', '35')
client.setRequestHeader('viewport-width', '42')
client.send(null)
const res = JSON.parse(client.response)
assert_equals(res['x-print'], 'unicorn')
assert_equals(res['content-type'], 'text/plain')
assert_equals(res['accept'], 'test')
assert_equals(res['accept-language'], 'nn')
assert_equals(res['content-language'], 'nn')
assert_equals(res['save-data'], 'on')
assert_equals(res['device-memory'], '1.0')
assert_equals(res['dpr'], '2.0')
assert_equals(res['width'], '35')
assert_equals(res['viewport-width'], '42')
}, 'Client hint headers are simple headers')
test(function() { test(function() {
var client = new XMLHttpRequest() var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN + 'resources/cors-makeheader.py?headers=x-print', false) client.open('GET', CROSSDOMAIN + 'resources/cors-makeheader.py?headers=x-print', false)

View file

@ -1 +0,0 @@
logs.txt

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>CORS - simple requests</title>
<meta name=author title="Odin Hørthe Omdal" href="mailto:odiho@opera.com">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js?pipe=sub></script>
<script src=/common/utils.js></script>
<h1>Simple requests</h1>
<p>Simple requests shouldn't trigger preflight</p>
<div id=log></div>
<script>
var test_c = 0;
function check_simple(method, headers)
{
test(function() {
var client = new XMLHttpRequest()
var uuid_token = token();
client.open(method, CROSSDOMAIN + 'resources/preflight.py?token='
+ uuid_token, false)
for (head in headers)
client.setRequestHeader(head, headers[head])
client.send("data")
assert_equals(client.getResponseHeader('content-type'), "text/plain")
if (method == 'HEAD')
assert_equals(client.response, '', 'response')
else
assert_equals(client.response, 'NO', 'response')
client.open('GET', 'resources/preflight.py?check&token='
+ uuid_token, false)
client.send("data")
assert_equals(client.response, "0", "Found preflight log")
},
'No preflight ' + method + ' and ' + JSON.stringify(headers))
}
function check_simple_headers(headers) {
check_simple('GET', headers)
check_simple('HEAD', headers)
check_simple('POST', headers)
}
check_simple_headers({
'save-data': 'on',
'device-memory': '2.0',
'dpr': '3.0',
'width': '1200',
'viewport-width': '1300'
})
</script>

View file

@ -61,14 +61,6 @@ check_simple_headers({
'content-type': 'text/plain; parameter=whatever' 'content-type': 'text/plain; parameter=whatever'
}) })
check_simple_headers({
'save-data': 'on',
'device-memory': '2.0',
'dpr': '3.0',
'width': '1200',
'viewport-width': '1300'
})
check_simple('Get', {'content-type': 'text/plain; parameter=extra_bonus'}) check_simple('Get', {'content-type': 'text/plain; parameter=extra_bonus'})
check_simple('post', {'content-type': 'text/plain'}) check_simple('post', {'content-type': 'text/plain'})

View file

@ -1,15 +0,0 @@
/dist
/dist_last
/build-temp
/tools/cache
/tools/_virtualenv
*.xcodeproj
*.DS_Store
*.pyc
*.svn
.directory*
*~
*.orig
*Thumbs.db
/_certs
/config.json

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: orange;
}
h4 {
color: blue;
}
</style>
<body>
<p>This text should be fuchsia.</p>
<div>This text should be orange.</div>
<h4>This text should be blue.</h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors</title> <title>CSS Test: Selectors: Class selectors</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/> <meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/>
<style type="text/css"> <style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors with the universal selector</title> <title>CSS Test: Selectors: Class selectors with the universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/> <meta name="assert" content="Browsers should apply each rule to the elements which have the specified class"/>
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: fuchsia;
border: thin solid;
}
h4 {
color: blue;
}
</style>
<body>
<p>This text should be fuchsia.</p>
<div>This text should be fuchsia with a thin fuchsia border.</div>
<h4>This text should be blue without any border.</h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: Class selectors: Multiple classes</title> <title>CSS Test: Selectors: Class selectors: Multiple classes</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#class-html" />
<link rel="match" href="class-002-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified class or classes"/> <meta name="assert" content="Browsers should apply each rule to the elements which have the specified class or classes"/>
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
div {
color: orange;
}
h4 {
color: blue;
}
.silver {
color: silver;
}
</style>
<body>
<p><em>This text should be fuchsia.</em> <span class="silver">Filler text.</span></p>
<div>This text should be orange.</div>
<p class="silver">Filler text.</p>
<h4>This text should be blue. <span class="silver">Filler text.</span></h4>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-child pseudo-class</title> <title>CSS Test: Selectors: The :first-child pseudo-class</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" />
<link rel="match" href="first-child-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/> <meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/>
<style type="text/css"> <style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-child pseudo-class with the universal selector</title> <title>CSS Test: Selectors: The :first-child pseudo-class with the universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-child" />
<link rel="match" href="first-child-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/> <meta name="assert" content="Browsers should apply each rule to the element which is the first child of its parent"/>
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
p {
color: fuchsia;
}
span {
color: silver;
}
</style>
<body>
<p>The first line of this paragraph should be fuchsia (same as in the next block).<br /><span>Filler text.</span></p>
<p>Lorem ipsum dolor.<br /><span>Filler text.</span></p>
</body>

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: The :first-line pseudo-element</title> <title>CSS Test: Selectors: The :first-line pseudo-element</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" />
<link rel="match" href="first-line-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply the rule only to the first line of a block-level element"/> <meta name="assert" content="Browsers should apply the rule only to the first line of a block-level element"/>
<style type="text/css"> <style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: ID selectors</title> <title>CSS Test: Selectors: ID selectors</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/> <meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/>
<style type="text/css"> <style type="text/css">

View file

@ -5,6 +5,7 @@
<title>CSS Test: Selectors: ID selectors with universal selector</title> <title>CSS Test: Selectors: ID selectors with universal selector</title>
<link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" /> <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com" />
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" /> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#id-selectors" />
<link rel="match" href="class-000-ref.html"/>
<meta name="flags" content="" /> <meta name="flags" content="" />
<meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/> <meta name="assert" content="Browsers should apply each rule to the elements which have the specified ID"/>
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should also be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">
<link rel="match" href="attribute-value-selector-007-ref.html" />
<meta name="flags" content="HTMLonly"> <meta name="flags" content="HTMLonly">
<meta name="assert" content="lang attribute selector with att=val in HTML should not be case sensitive, and should only match when att is exactly val"> <meta name="assert" content="lang attribute selector with att=val in HTML should not be case sensitive, and should only match when att is exactly val">
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should also be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/>
<link rel="match" href="attribute-value-selector-008-ref.html" />
<meta name="flags" content="nonHTML"/> <meta name="flags" content="nonHTML"/>
<meta name="assert" content="attribute selector with att=val in XHTML should be case sensitive, and should only match when att is exactly val"/> <meta name="assert" content="attribute selector with att=val in XHTML should be case sensitive, and should only match when att is exactly val"/>
<style type="text/css"><![CDATA[ <style type="text/css"><![CDATA[

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"/>
<link rel="match" href="attribute-value-selector-009-ref.html" />
<meta name="flags" content="nonHTML"/> <meta name="flags" content="nonHTML"/>
<meta name="assert" content="lang attribute selector with 'att |= val' in XHTML should be case sensitive, and match hyphen-separated list"/> <meta name="assert" content="lang attribute selector with 'att |= val' in XHTML should be case sensitive, and match hyphen-separated list"/>
<style type="text/css"><![CDATA[ <style type="text/css"><![CDATA[

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green<p>This line should NOT be green</p></div>
<p>This line should NOT be green <em>and this should not be green either</em></p>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">
<link rel="match" href="attribute-value-selector-010-ref.html" />
<meta name="flags" content="HTMLonly"> <meta name="flags" content="HTMLonly">
<meta name="assert" content="lang attribute selector with 'att |= val' in HTML should not be case sensitive, and match hyphen-separated list"> <meta name="assert" content="lang attribute selector with 'att |= val' in HTML should not be case sensitive, and match hyphen-separated list">
<style type="text/css"> <style type="text/css">

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
.green {
background-color: green;
color: white;
}
</style>
<body>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<div class="green">This line should be green</div>
<p class="green">This line should be green <em>and this should be green too</em></p>
<div><p class="green">This line should be green</p>This line should NOT be green</div>
<p>This line should NOT be green <em class="green">but this should be green</em></p>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
<div>This line should NOT be green</div>
</body>

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang"> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang">
<link rel="match" href="lang-pseudoclass-001-ref.html" />
<meta name="flags" content="HTMLonly" > <meta name="flags" content="HTMLonly" >
<meta name="assert" content=":lang pseudoclass in HTML should not be case-sensitive, and match a substring"> <meta name="assert" content=":lang pseudoclass in HTML should not be case-sensitive, and match a substring">
<style type="text/css"> <style type="text/css">

View file

@ -5,6 +5,7 @@
<link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/> <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org"/>
<link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/> <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang"/> <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang"/>
<link rel="match" href="lang-pseudoclass-001-ref.html" />
<meta name="flags" content="nonHTML" /> <meta name="flags" content="nonHTML" />
<meta name="assert" content=":lang pseudoclass in XHTML should be case sensitive, and match a substring"/> <meta name="assert" content=":lang pseudoclass in XHTML should be case sensitive, and match a substring"/>
<style type="text/css"><![CDATA[ <style type="text/css"><![CDATA[
@ -24,8 +25,6 @@
<div xml:lang="en-GB">This line should be green</div> <div xml:lang="en-GB">This line should be green</div>
<div xml:lang="en-GB-scouse">This line should be green</div> <div xml:lang="en-GB-scouse">This line should be green</div>
<div xml:lang="es">This line should be green</div>
<p xml:lang="es">This line should be green <em>and this should be green too</em></p> <p xml:lang="es">This line should be green <em>and this should be green too</em></p>
<div xml:lang="fr"><p>This line should be green</p>This line should NOT be green</div> <div xml:lang="fr"><p>This line should be green</p>This line should NOT be green</div>

View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline flexbox</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-baseline">
<meta name="flags" content="ahem">
<meta name="assert" content="This test check the synthesized of a flexbox container if it has no items (it should use the flex container margin box) or if the items have no baseline (in that case it should use the flex item's border box).">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 200px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-flex;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-flex;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div style="display: flex;" class="border-padding-margin"
data-offset-y="25"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="25">
<div style="display: flex;"
data-offset-y="30">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: inline-flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: flex;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</body>

View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline grid container</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-align-items-baseline">
<meta name="flags" content="ahem">
<meta name="assert" content="This test check the synthesized of a grid container if it has no items (it should use the grid container margin box) or if the items have no baseline (in that case it should use the grid item's border box).">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 300px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-grid;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-grid;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div style="display: grid;" class="border-padding-margin"
data-offset-y="25"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="25">
<div style="display: grid;"
data-offset-y="30">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: inline-grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
<div class="wrapper" style="display: flex; align-items: baseline;">
<canvas></canvas>
<div style="display: grid;" class="magenta-dotted-border"
data-offset-y="25">
<div class="border-padding-margin" data-offset-y="50"></div>
</div>
</div>
</body>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline inline blocks</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
<meta name="flags" content="ahem">
<meta name="assert" content="Inline blocks synthesized baseline use the margin box.">
<style>
.wrapper {
border: solid thick;
position: relative;
width: 200px;
height: 150px;
margin: 10px;
}
canvas {
width: 100px;
height: 100px;
background: blue;
}
.magenta-dotted-border {
border: 5px dotted magenta;
}
.border-padding-margin {
border: 10px solid cyan;
padding: 15px;
margin: 20px 0px;
background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="5">
<div style="display: inline-block;" class="border-padding-margin"
data-offset-y="30"></div>
</div>
</div>
<div class="wrapper">
<canvas></canvas>
<div style="display: inline-block;" class="magenta-dotted-border"
data-offset-y="0">
<div class="border-padding-margin" data-offset-y="25"></div>
</div>
</div>
</body>

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<title>flexbox | paged overflow</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#pagination">
<meta name="flags" content="interact paged">
<style>
* {widows: 1; orphans: 1; margin: 0;}
html {
overflow: -o-paged-x;
}
h4 {
position: fixed;
}
div {
display: flex;
break-before: page;
background: red;
}
</style>
<h4>There should be NO RED onload.</h4>
<div>FAIL</div>

View file

@ -1,47 +0,0 @@
<!DOCTYPE html>
<title>flexbox | @page and paged overflow</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#pagination">
<meta name="flags" content="interact paged">
<style>
* {widows: 1; orphans: 1; margin: 0;}
@page {
width: 600px;
height: 3em;
}
html {
overflow: -o-paged-x;
}
h4 {
position: fixed;
top: 10em;
}
div {
width: 12em;
display: flex;
flex-wrap: wrap;
}
p {
margin: 0;
width: 3em;
height: 4em;
flex: auto;
}
p:nth-child(2) {
break-before: page;
}
p:nth-child(2)~p {
background: red;
}
</style>
<h4>There should be NO RED onload.</h4>
<div>
<p>x</p>
<p>x</p>
<p>fail</p>
<p>fail</p>
</div>

View file

@ -1 +0,0 @@
node_modules

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/box.html#propdef-padding-left">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-fit-content-length-percentage">
<meta name="assert" content="The shrink-to-fit container (#stf) should be just wide enough to fit both floats beside each other. The percentage padding shouldn't be affected by intrinsic sizing; it's simply resolved from its containing block (#container), which doesn't participate in the intrinsic size calculation at all.">
<div id="container" style="width:400px; height:200px;">
<div id="stf" style="width:fit-content; padding-left:20%;">
<div style="float:left; width:50px; height:100px; background:cyan;"></div>
<div style="float:left; width:50px; height:100px; background:hotpink;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var container = document.getElementById("container");
var stf = document.getElementById("stf");
test(()=> {
assert_equals(stf.offsetWidth, 180);
}, "Initial layout");
test(()=> {
container.style.width = "300px";
assert_equals(stf.offsetWidth, 160);
}, "Shrink width");
test(()=> {
container.style.width = "500px";
assert_equals(stf.offsetWidth, 200);
}, "Grow width");
</script>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<style>
td, th {
border: 1px solid black;
}
</style>
<table>
<tr>
<th colspan="4">This cell must span all columns for repro in chrome</th>
</tr>
<tr>
<td rowspan="3" style="height:200px">A</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#display-prop">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=764031">
<link rel="match" href="toggle-row-display-property-001-ref.html">
<meta name="flags" content="" />
<meta name="assert" content="After setting display:table-row on tr elements with display:none, the table should look same as if display:none were never used." />
<style>
td, th {
border: 1px solid black;
}
tr {
display: none;
}
</style>
<table id=theTable>
<tr>
<th colspan="4">This cell must span all columns for repro in chrome</th>
</tr>
<tr>
<td rowspan="3" style="height:200px">A</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
<script>
theTable.offsetTop;
let rows = document.querySelectorAll('tr');
for (var i = 0; i < rows.length; i++) {
rows[i].style.display = 'table-row';
}
</script>

View file

@ -9,9 +9,10 @@
<meta name="assert" content="A Single leading white-space constitutes a soft breaking opportunity, honoring the 'white-space: break-spaces' property, that must prevent the word to be broken."> <meta name="assert" content="A Single leading white-space constitutes a soft breaking opportunity, honoring the 'white-space: break-spaces' property, that must prevent the word to be broken.">
<style> <style>
div { div {
position: relative; position: relative;
font-size: 20px; font-size: 20px;
font-family: Ahem; font-family: Ahem;
line-height: 1em;
} }
.red { .red {
position: absolute; position: absolute;
@ -23,8 +24,8 @@ div {
} }
.test { .test {
color: green; color: green;
line-height: 1em;
width: 5ch; width: 5ch;
white-space: break-spaces; white-space: break-spaces;
overflow-wrap: break-word; overflow-wrap: break-word;
} }

View file

@ -11,8 +11,8 @@
<meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the 'white-space: break-spaces' value."> <meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the 'white-space: break-spaces' value.">
<style> <style>
div { div {
position: relative; position: relative;
font: 20px/1 Ahem; font: 20px/1 Ahem;
} }
.fail { .fail {
position: absolute; position: absolute;

View file

@ -9,8 +9,8 @@
<meta name="assert" content="If 'white-space' is set to 'break-spaces', collapsing preserved white-spaces' advance width is not allowed, so that they can be wrapped honoring the 'white-space' propery."> <meta name="assert" content="If 'white-space' is set to 'break-spaces', collapsing preserved white-spaces' advance width is not allowed, so that they can be wrapped honoring the 'white-space' propery.">
<style> <style>
div { div {
position: relative; position: relative;
font: 10px/1 Ahem; font: 10px/1 Ahem;
} }
.fail { .fail {
position: absolute; position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', but the words are broken, honring the 'word-beak: break-all' even though there are previous breaking opportunities in the white-spaces."> <meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', but the words are broken, honring the 'word-beak: break-all' even though there are previous breaking opportunities in the white-spaces.">
<style> <style>
div { div {
position: relative; position: relative;
font: 25px/1 Ahem; font: 25px/1 Ahem;
} }
.fail { .fail {
position: absolute; position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="A single leading white-space should be used, honoring white-space: break-spaces, to avoid overflow; however, a single preserved white-space at the end of the line cannot be wrapped, hence it hangs when breaking after it to move the rest of the text to the next line."> <meta name="assert" content="A single leading white-space should be used, honoring white-space: break-spaces, to avoid overflow; however, a single preserved white-space at the end of the line cannot be wrapped, hence it hangs when breaking after it to move the rest of the text to the next line.">
<style> <style>
div { div {
position: relative; position: relative;
font: 25px/1 Ahem; font: 25px/1 Ahem;
} }
.fail { .fail {
position: absolute; position: absolute;

View file

@ -11,8 +11,8 @@
<meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', which may lead to overfow. However, we can break before the first white-space after the word honoring the 'break-all' value."> <meta name="assert" content="White spaces are preserved, honoring the 'white-space: break-spaces', which may lead to overfow. However, we can break before the first white-space after the word honoring the 'break-all' value.">
<style> <style>
div { div {
position: relative; position: relative;
font: 25px/1 Ahem; font: 25px/1 Ahem;
} }
.fail { .fail {
position: absolute; position: absolute;

View file

@ -9,8 +9,8 @@
<meta name="assert" content="The text is broken at the end of the space between the two words, never before, so it hangs and cause an overflow"> <meta name="assert" content="The text is broken at the end of the space between the two words, never before, so it hangs and cause an overflow">
<style> <style>
div { div {
position: relative; position: relative;
font: 20px/1 Ahem; font: 20px/1 Ahem;
} }
.ref { .ref {
position: absolute; position: absolute;

View file

@ -12,6 +12,7 @@ div {
position: relative; position: relative;
font-size: 20px; font-size: 20px;
font-family: Ahem; font-family: Ahem;
line-height: 1em;
} }
.red { .red {
position: absolute; position: absolute;
@ -24,7 +25,6 @@ div {
} }
.test { .test {
color: green; color: green;
line-height: 1em;
width: 2ch; width: 2ch;
white-space: pre-wrap; white-space: pre-wrap;

View file

@ -26,6 +26,7 @@ div {
.test { .test {
color: green; color: green;
width: 5ch; width: 5ch;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-all; word-break: break-all;
} }

View file

@ -9,9 +9,10 @@
<meta name="assert" content="The word is broken even if white-space: break-spaces provides a former breaking opportunity in leading white-space."> <meta name="assert" content="The word is broken even if white-space: break-spaces provides a former breaking opportunity in leading white-space.">
<style> <style>
div { div {
position: relative; position: relative;
font-size: 20px; font-size: 20px;
font-family: Ahem; font-family: Ahem;
line-height: 1em;
} }
.red { .red {
position: absolute; position: absolute;
@ -24,7 +25,6 @@ div {
} }
.test { .test {
color: green; color: green;
line-height: 1em;
width: 5ch; width: 5ch;
white-space: break-spaces; white-space: break-spaces;

View file

@ -9,9 +9,10 @@
<meta name="assert" content="A single leading white-space should account as soft breaking opportunity, honoring the 'white-space: break-spaces', on top to the ones provided by 'word-break: break-all'."> <meta name="assert" content="A single leading white-space should account as soft breaking opportunity, honoring the 'white-space: break-spaces', on top to the ones provided by 'word-break: break-all'.">
<style> <style>
div { div {
position: relative; position: relative;
font-size: 20px; font-size: 20px;
font-family: Ahem; font-family: Ahem;
line-height: 1em;
} }
.red { .red {
position: absolute; position: absolute;
@ -24,7 +25,6 @@ div {
} }
.test { .test {
color: green; color: green;
line-height: 1em;
width: 1ch; width: 1ch;
white-space: break-spaces; white-space: break-spaces;
word-break: break-all; word-break: break-all;

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<title>Ellipsizing inline blocks that have absolute positioned objects should not crash</title>
<link rel="author" href="kojii@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=945690">
<meta name="assert" content="Ellipsizing inline blocks that have absolute positioned objects should not crash">
<style>
div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 5ch;
}
.inline-block {
display: inline-block;
}
.abs {
position: absolute;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div>
12345678
<span class="inline-block">
<span class="abs">abs</span>
</span>
</div>
<div>
12345678
<span class="inline-block">
999
<span class="abs">abs</span>
</span>
</div>
<div>
12
<span class="inline-block">
3456789
<span class="abs">abs</span>
</span>
</div>
<script>
test(() => {}, 'No crash or DCHECK failure');
</script>

View file

@ -124,9 +124,8 @@ class Indexer:
def __writeTemplate(self, template, data, outfile): def __writeTemplate(self, template, data, outfile):
o = self.tt.process(template, data) o = self.tt.process(template, data)
f = open(outfile, 'w') with open(outfile, 'w') as f:
f.write(o.encode('utf-8')) f.write(o.encode('utf-8'))
f.close()
def writeOverview(self, destDir, errorOut=sys.stderr, addTests=[]): def writeOverview(self, destDir, errorOut=sys.stderr, addTests=[]):
"""Write format-agnostic pages such as test suite overview pages, """Write format-agnostic pages such as test suite overview pages,

View file

@ -525,7 +525,8 @@ class FileSource:
def data(self): def data(self):
"""Return file contents as a byte string.""" """Return file contents as a byte string."""
if (self._data is None): if (self._data is None):
self._data = open(self.sourcepath, 'r').read() with open(self.sourcepath, 'r') as f:
self._data = f.read()
if (self._data.startswith(codecs.BOM_UTF8)): if (self._data.startswith(codecs.BOM_UTF8)):
self.encoding = 'utf-8-sig' # XXX look for other unicode BOMs self.encoding = 'utf-8-sig' # XXX look for other unicode BOMs
return self._data return self._data
@ -580,8 +581,8 @@ class FileSource:
def write(self, format): def write(self, format):
"""Writes FileSource.data() out to `self.relpath` through Format `format`.""" """Writes FileSource.data() out to `self.relpath` through Format `format`."""
data = self.data() data = self.data()
f = open(format.dest(self.relpath), 'w') with open(format.dest(self.relpath), 'w') as f:
f.write(data) f.write(data)
if (self.metaSource): if (self.metaSource):
self.metaSource.write(format) # XXX need to get output path from format, but not let it choose actual format self.metaSource.write(format) # XXX need to get output path from format, but not let it choose actual format
@ -818,7 +819,8 @@ class ConfigSource(FileSource):
"""Merge contents of all config files represented by this source.""" """Merge contents of all config files represented by this source."""
data = '' data = ''
for src in self.sourcepath: for src in self.sourcepath:
data += open(src).read() with open(src) as f:
data += f.read()
data += '\n' data += '\n'
return data return data
@ -868,35 +870,36 @@ class ReftestManifest(ConfigSource):
for src in self.sourcepath: for src in self.sourcepath:
relbase = basepath(self.relpath) relbase = basepath(self.relpath)
srcbase = basepath(src) srcbase = basepath(src)
for line in open(src): with open(src) as f:
strip = self.baseRE.search(line) for line in f:
if strip: strip = self.baseRE.search(line)
striplist.append(strip.group(1)) if strip:
line = self.stripRE.sub('', line) striplist.append(strip.group(1))
m = self.parseRE.search(line) line = self.stripRE.sub('', line)
if m: m = self.parseRE.search(line)
record = ((join(srcbase, m.group(2)), join(srcbase, m.group(3))), \ if m:
(join(relbase, m.group(2)), join(relbase, m.group(3))), \ record = ((join(srcbase, m.group(2)), join(srcbase, m.group(3))), \
m.group(1)) (join(relbase, m.group(2)), join(relbase, m.group(3))), \
# for strip in striplist: m.group(1))
# strip relrecord # for strip in striplist:
if not exists(record[0][0]): # strip relrecord
raise ReftestFilepathError("Manifest Error in %s: " if not exists(record[0][0]):
"Reftest test file %s does not exist." \ raise ReftestFilepathError("Manifest Error in %s: "
% (src, record[0][0])) "Reftest test file %s does not exist." \
elif not exists(record[0][1]): % (src, record[0][0]))
raise ReftestFilepathError("Manifest Error in %s: " elif not exists(record[0][1]):
"Reftest reference file %s does not exist." \ raise ReftestFilepathError("Manifest Error in %s: "
% (src, record[0][1])) "Reftest reference file %s does not exist." \
elif not isPathInsideBase(record[1][0]): % (src, record[0][1]))
raise ReftestFilepathError("Manifest Error in %s: " elif not isPathInsideBase(record[1][0]):
"Reftest test replath %s not within relpath root." \ raise ReftestFilepathError("Manifest Error in %s: "
% (src, record[1][0])) "Reftest test replath %s not within relpath root." \
elif not isPathInsideBase(record[1][1]): % (src, record[1][0]))
raise ReftestFilepathError("Manifest Error in %s: " elif not isPathInsideBase(record[1][1]):
"Reftest test replath %s not within relpath root." \ raise ReftestFilepathError("Manifest Error in %s: "
% (src, record[1][1])) "Reftest test replath %s not within relpath root." \
yield record % (src, record[1][1]))
yield record
import Utils # set up XML catalog import Utils # set up XML catalog
xhtmlns = '{http://www.w3.org/1999/xhtml}' xhtmlns = '{http://www.w3.org/1999/xhtml}'
@ -1026,9 +1029,8 @@ class XMLSource(FileSource):
output = self.unicode() output = self.unicode()
# write # write
f = open(format.dest(self.relpath), 'w') with open(format.dest(self.relpath), 'w') as f:
f.write(output.encode(self.encoding, 'xmlcharrefreplace')) f.write(output.encode(self.encoding, 'xmlcharrefreplace'))
f.close()
def compact(self): def compact(self):
self.tree = None self.tree = None

View file

@ -102,18 +102,16 @@ var tests = [
tests.forEach(function(testName) { tests.forEach(function(testName) {
Object.keys(testExtensions).forEach(function(ext) { Object.keys(testExtensions).forEach(function(ext) {
var iframe = document.createElement("iframe"); async_test(function(t) {
iframe.src = "Document-createElement-namespace-tests/" + var iframe = document.createElement("iframe");
testName + "." + ext; iframe.src = "Document-createElement-namespace-tests/" +
var t = async_test("Created element's namespace in " + testName + "." + ext); testName + "." + ext;
iframe.onload = function() { iframe.onload = t.step_func_done(function() {
t.step(function() {
testDoc(iframe.contentDocument, testExtensions[ext]); testDoc(iframe.contentDocument, testExtensions[ext]);
document.body.removeChild(iframe);
}); });
document.body.removeChild(iframe); document.body.appendChild(iframe);
t.done(); }, "Created element's namespace in " + testName + "." + ext);
};
document.body.appendChild(iframe);
}); });
}); });
</script> </script>

View file

@ -874,5 +874,10 @@ var browserTests = [
[["outdent",""]], [["outdent",""]],
"<blockquote>foo</blockquote><span>[bar]</span>", "<blockquote>foo</blockquote><span>[bar]</span>",
[true], [true],
{"outdent":[false,false,"",false,false,""]}],
["<ul><ul><li><span style=\"color:rgb(255, 0, 0)\">[]foo</span></li></ul></ul>",
[["outdent",""]],
"<ul><li><span style=\"color:rgb(255, 0, 0)\">[]foo</span></li></ul>",
[true],
{"outdent":[false,false,"",false,false,""]}] {"outdent":[false,false,"",false,false,""]}]
] ]

View file

@ -0,0 +1,73 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Element Timing: observe images in carousel</title>
<style>
body {
margin: 0;
}
/* Do not display images by default */
.carousel-image {
display: none;
}
</style>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/element-timing-helpers.js"></script>
<div class="slideshow-container">
<div class='carousel-image'>
<img src="resources/circle.svg" elementtiming='image0'>
</div>
<div class='carousel-image'>
<img src="resources/square100.png" elementtiming='image1'>
</div>
</div>
<script>
async_test(function (t) {
const beforeRenderTimes = [];
let entry_count = 0;
const entry_count_per_element = [0, 0];
const index = window.location.href.lastIndexOf('/');
const pathname0 = window.location.href.substring(0, index) +
'/resources/circle.svg';
const pathname1 = window.location.href.substring(0, index) +
'/resources/square100.png';
const observer = new PerformanceObserver(list => {
list.getEntries().forEach(entry => {
if (entry_count % 2 == 0) {
checkElement(entry, pathname0, 'image0', beforeRenderTimes[entry_count]);
checkRect(entry, [0, 200, 0, 200]);
entry_count_per_element[0]++;
}
else {
checkElement(entry, pathname1, 'image1', beforeRenderTimes[entry_count]);
checkRect(entry, [0, 100, 0, 100]);
entry_count_per_element[1]++;
}
entry_count++;
// Check each image twice before ending the test.
if (entry_count == 4) {
assert_equals(entry_count_per_element[0], 2);
assert_equals(entry_count_per_element[1], 2);
t.done();
}
})
});
observer.observe({entryTypes: ['element']});
let slideIndex = 0;
showCarousel();
function showCarousel() {
beforeRenderTimes.push(performance.now());
const slides = document.getElementsByClassName("carousel-image");
slides[slideIndex].style.display = "block";
slides[1 - slideIndex].style.display = "none";
slideIndex = 1 - slideIndex;
t.step_timeout(showCarousel, 50); // Change image every 50 ms.
}
}, 'Entries for elements within an image carousel are dispatched when the elements are redrawn.');
</script>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Element Timing: observe image inside SVG with small dimensions</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/element-timing-helpers.js"></script>
<script>
let beforeRender;
async_test(function (t) {
const observer = new PerformanceObserver(
t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/');
const pathname = window.location.href.substring(0, index) +
'/resources/circle.svg';
checkElement(entry, pathname, 'my_svg', beforeRender);
// Image size is 200x200 but SVG size is 100x100 so it is clipped.
checkRect(entry, [0, 100, 0, 100]);
})
);
observer.observe({entryTypes: ['element']});
beforeRender = performance.now();
}, "Able to observe svg image.");
</script>
<style>
body {
margin: 0;
}
</style>
<svg width="100" height="100">
<image href='resources/circle.svg' elementtiming='my_svg'/>
</svg>

View file

@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Element Timing: check intersectionRect for element in iframe</title>
<body>
<style>
body {
margin: 50px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test((t) => {
on_event(window, 'message', e => {
assert_equals(e.data.length, 1);
assert_equals(e.data.entryType, 'element');
const rect = e.data.rect;
// rect should start at (0,0) even though main frame has a margin.
assert_equals(rect.left, 0);
assert_equals(rect.right, 100);
assert_equals(rect.top, 0);
assert_equals(rect.bottom, 100);
t.done();
});
}, 'Element Timing entry in iframe has coordinates relative to the iframe.');
</script>
<iframe src="resources/iframe-with-square-sends-entry.html"/>
</body>

View file

@ -28,6 +28,6 @@ body {
margin: 0; margin: 0;
} }
</style> </style>
<svg> <svg width="300" height="300">
<image href='resources/circle.svg' elementtiming='my_svg'/> <image href='resources/circle.svg' elementtiming='my_svg'/>
</svg> </svg>

View file

@ -0,0 +1,21 @@
<!DOCType html>
<html>
<style>
body {
margin: 0;
}
</style>
<body>
<script>
const observer = new PerformanceObserver(entryList => {
top.postMessage({
'length' : entryList.getEntries().length,
'entryType' : entryList.getEntries()[0].entryType,
'rect' : entryList.getEntries()[0].intersectionRect,
}, '*');
});
observer.observe({entryTypes: ['element']});
</script>
<img src=square100.png elementtiming=my_image/>
</body>
</html>

View file

@ -1 +0,0 @@
Feature-Policy: unoptimized-images 'none'

View file

@ -1 +0,0 @@
Feature-Policy: unoptimized-images 'none'

Some files were not shown because too many files have changed in this diff Show more