Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e

This commit is contained in:
WPT Sync Bot 2019-01-24 20:55:37 -05:00
parent 43e21dc845
commit bdaf11b099
139 changed files with 3089 additions and 807 deletions

View file

@ -14,9 +14,6 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
[url-with-fetch.any.html]
[Untitled]
@ -37,6 +34,3 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
[overflow-wrap-break-word-006.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[break-spaces-004.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[break-spaces-005.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[break-spaces-006.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[break-spaces-007.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[break-spaces-008.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[word-break-break-all-012.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[word-break-break-all-013.html]
expected: FAIL

View file

@ -1079,3 +1079,9 @@
[text-indent percentage(%) / values]
expected: FAIL
[padding-left length(px) / values]
expected: FAIL
[padding-bottom length(ex) / values]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ic-unit-008.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ic-unit-009.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ic-unit-010.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ic-unit-011.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ic-unit-012.html]
expected: FAIL

View file

@ -2,7 +2,7 @@
type: testharness
[single-byte-decoder.html?document]
expected: CRASH
expected: TIMEOUT
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
expected: FAIL
@ -32,7 +32,7 @@
[single-byte-decoder.html?XMLHttpRequest]
expected: TIMEOUT
expected: CRASH
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL

View file

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

View file

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

View file

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

View file

@ -0,0 +1,4 @@
[autoplay-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise autoplay.]
expected: FAIL

View file

@ -1,2 +0,0 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT

View file

@ -1,5 +0,0 @@
[promise-rejection-events.html]
expected: TIMEOUT
[rejectionhandled is dispatched from a queued task, and not immediately]
expected: TIMEOUT

View file

@ -143,3 +143,24 @@
[Property shape-margin does not support quirky length]
expected: FAIL
[Property inset-inline-start does not support quirky length]
expected: FAIL
[Property inset-block does not support quirky length]
expected: FAIL
[Property inset-block-start does not support quirky length]
expected: FAIL
[Property inset-inline does not support quirky length]
expected: FAIL
[Property inset-inline-end does not support quirky length]
expected: FAIL
[Property inset does not support quirky length]
expected: FAIL
[Property inset-block-end does not support quirky length]
expected: FAIL

View file

@ -0,0 +1,4 @@
[excluded-properties-003.html]
[inset does not support quirky length values]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[webvr-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise xr.]
expected: FAIL

View file

@ -1,4 +1,5 @@
[import-in-moduleworker.html]
expected: ERROR
[Base URL in module dedicated workers: import]
expected: FAIL

View file

@ -1,5 +1,4 @@
[sharedworker-in-worker.html]
expected: ERROR
[Base URL in workers: new SharedWorker()]
expected: FAIL

View file

@ -0,0 +1,4 @@
[sync-xhr-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise sync-xhr.]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[paint_timing.html]
[Performance entries observer]
expected: FAIL

View file

@ -6,9 +6,13 @@
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/index
#
# In addition to this configuration file, the "Build pull requests from forks
# of this repository" setting must also be enabled in the Azure DevOps project:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github#validate-contributions-from-forks
# In addition to this configuration file, some setup in the Azure DevOps
# project is required:
# - The "Build pull requests from forks of this repository" setting must be
# enabled: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github#validate-contributions-from-forks
# - A scheduled build needs to be set up for the the epochs/daily branch.
# - To get results from scheduled builds into wpt.fyi, a service connection
# named wpt.fyi with URL https://wpt.fyi is needed.
jobs:
# The affected tests jobs are unconditional for speed, as most PRs have one or
@ -125,7 +129,7 @@ jobs:
- job: all_macOS
displayName: 'all tests (Safari Technology Preview)'
condition: eq(variables['Build.SourceBranch'], 'refs/heads/epochs/daily')
condition: eq(variables['Build.Reason'], 'Schedule')
strategy:
parallel: 4 # chosen to make runtime ~2h
timeoutInMinutes: 360
@ -148,3 +152,20 @@ jobs:
inputs:
artifactName: 'results'
condition: succeededOrFailed()
# The InvokeRESTAPI task can only run in a server job.
- job: all_post
displayName: 'all tests (wpt.fyi hook)'
dependsOn: all_macOS
pool: server
steps:
- task: InvokeRESTAPI@1
displayName: 'Invoke wpt.fyi hook'
inputs:
serviceConnection: wpt.fyi
urlSuffix: /api/checks/azure/$(Build.BuildId)
- task: InvokeRESTAPI@1
displayName: 'Invoke staging.wpt.fyi hook'
inputs:
serviceConnection: staging.wpt.fyi
urlSuffix: /api/checks/azure/$(Build.BuildId)

View file

@ -61,7 +61,7 @@ tasks:
owner: ${event.pusher.email}
source: ${event.repository.url}
payload:
image: harjgam/web-platform-tests:0.25
image: harjgam/web-platform-tests:0.26
maxRunTime: 7200
artifacts:
public/results:
@ -136,7 +136,7 @@ tasks:
owner: ${event.pull_request.user.login}@users.noreply.github.com
source: ${event.repository.url}
payload:
image: harjgam/web-platform-tests:0.25
image: harjgam/web-platform-tests:0.26
maxRunTime: 7200
artifacts:
public/results:

View file

@ -188,20 +188,17 @@ promise_test(async testCase => {
});
// Txn1 should commit before txn2, even though txn2 uses commit().
const txn1 = db.transaction(['books'], 'readwrite');
const objectStore1 = txn1.objectStore('books');
const putRequest1 = objectStore1.put({isbn:'one', title:'title1'});
txn1.objectStore('books').put({isbn: 'one', title: 'title1'});
const releaseTxnFunction = keepAlive(testCase, txn1, 'books');
const txn2 = db.transaction(['books'], 'readwrite');
const objectStore2 = txn2.objectStore('books');
const putRequest2 = objectStore2.put({isbn:'one', title:'title2'});
txn2.objectStore('books').put({isbn:'one', title:'title2'});
txn2.commit();
// Exercise the IndexedDB transaction ordering by executing one with a
// different scope.
const txn3 = db.transaction(['not_books'], 'readwrite');
const objectStore3 = txn3.objectStore('not_books');
objectStore3.put({'title': 'not_title'}, 'key');
txn3.objectStore('not_books').put({'title': 'not_title'}, 'key');
txn3.oncomplete = function() {
releaseTxnFunction();
}
@ -210,8 +207,7 @@ promise_test(async testCase => {
// Read the data back to verify that txn2 executed last.
const txn4 = db.transaction(['books'], 'readonly');
const objectStore4 = txn4.objectStore('books');
const getRequest4 = objectStore4.get('one');
const getRequest4 = txn4.objectStore('books').get('one');
await promiseForTransaction(testCase, txn4);
assert_equals(getRequest4.result.title, 'title2');
db.close();
@ -225,8 +221,7 @@ promise_test(async testCase => {
});
// Txn1 creates the book 'one' so the 'add()' below fails.
const txn1 = db.transaction(['books'], 'readwrite');
const objectStore1 = txn1.objectStore('books');
const putRequest1 = objectStore1.add({isbn:'one', title:'title1'});
txn1.objectStore('books').add({isbn:'one', title:'title1'});
txn1.commit();
await promiseForTransaction(testCase, txn1);
@ -235,15 +230,17 @@ promise_test(async testCase => {
const txn2 = db.transaction(['books'], 'readwrite');
const objectStore2 = txn2.objectStore('books');
objectStore2.put({isbn:'two', title:'title2'});
const addRequest2 = objectStore2.add({isbn:'one', title:'title2'});
const addRequest = objectStore2.add({isbn:'one', title:'title2'});
txn2.commit();
txn2.oncomplete = assert_unreached(
'Transaction with invalid "add" call should not be completed.');
txn2.oncomplete = () => { assert_unreached(
'Transaction with invalid "add" call should not be completed.'); };
var addWatcher = requestWatcher(testCase, addRequest2);
var txnWatcher = transactionWatcher(testCase, txn2);
await Promise.all([addWatcher.wait_for('error'),
txnWatcher.wait_for('error', 'abort')]);
// Wait for the transaction to complete. We have to explicitly wait for the
// error signal on the transaction because of the nature of the test tooling.
await Promise.all([
requestWatcher(testCase, addRequest).wait_for('error'),
transactionWatcher(testCase, txn2).wait_for(['error', 'abort'])
]);
// Read the data back to verify that txn2 was aborted.
const txn3 = db.transaction(['books'], 'readonly');
@ -255,3 +252,41 @@ promise_test(async testCase => {
assert_equals(getRequest2.result, 0);
db.close();
}, 'Transactions that explicitly commit and have errors should abort.');
promise_test(async testCase => {
const db = await createDatabase(testCase, db => {
createBooksStore(testCase, db);
});
const txn1 = db.transaction(['books'], 'readwrite');
txn1.objectStore('books').add({isbn: 'one', title: 'title1'});
txn1.commit();
await promiseForTransaction(testCase, txn1);
// The second add request will throw an error, but the onerror handler will
// appropriately catch the error allowing the valid put request on the
// transaction to commit.
const txn2 = db.transaction(['books'], 'readwrite');
const objectStore2 = txn2.objectStore('books');
objectStore2.put({isbn: 'two', title:'title2'});
const addRequest = objectStore2.add({isbn: 'one', title:'unreached_title'});
addRequest.onerror = (event) => {
event.preventDefault();
addRequest.transaction.commit();
};
// Wait for the transaction to complete. We have to explicitly wait for the
// error signal on the transaction because of the nature of the test tooling.
await transactionWatcher(testCase,txn2).wait_for(['error', 'complete'])
// Read the data back to verify that txn2 was committed.
const txn3 = db.transaction(['books'], 'readonly');
const objectStore3 = txn3.objectStore('books');
const getRequest1 = objectStore3.get('one');
const getRequest2 = objectStore3.get('two');
await promiseForTransaction(testCase, txn3);
assert_equals(getRequest1.result.title, 'title1');
assert_equals(getRequest2.result.title, 'title2');
db.close();
}, 'Transactions that handle all errors properly should be behave as ' +
'expected when an explicit commit is called in an onerror handler.');

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that accelerometer is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/sensors/#feature-policy-api">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('accelerometer', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise accelerometer.');
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that ambient-light-sensor is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/sensors/#feature-policy-api">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('ambient-light-sensor', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise ambient-light-sensor.');
</script>

View file

@ -30,3 +30,9 @@ function waitForAsyncAnimationFrames(count) {
// AnimationWorklet.
return waitForAnimationFrames(count + 1);
}
async function waitForAnimationFrameWithCondition(condition) {
do {
await new Promise(window.requestAnimationFrame);
} while (!condition())
};

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<style>
#box {
width: 100px;
height: 100px;
transform: translateY(100px);
background-color: green;
}
</style>
<div id="box"></div>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Verify that calling pause immediately after playing works as expected</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<link rel="match" href="references/translated-box-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>
<style>
#box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div id="box"></div>
<script>
registerPassthroughAnimator().then(async _ => {
const box = document.getElementById('box');
const effect = new KeyframeEffect(box,
{ transform: ['translateY(100px)', 'translateY(200px)'] },
{ duration: 100, iterations: 1 }
);
const animation = new WorkletAnimation('passthrough', effect);
animation.play();
// Immediately pausing animation should freeze the current time at 0.
animation.pause();
// Wait at least one frame to ensure a paused animation actually freezes.
await waitForAsyncAnimationFrames(1);
takeScreenshot();
});
</script>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Verify that calling pause immediately after playing works as expected</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<link rel="match" href="references/translated-box-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="common.js"></script>
<style>
#box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div id="box"></div>
<script>
registerPassthroughAnimator().then(async _ => {
const duration = 18; // a bit longer than a frame
const box = document.getElementById('box');
const effect = new KeyframeEffect(box,
{ transform: ['translateY(0px)', 'translateY(100px)'] },
{ duration: duration, iterations: 1, fill: 'forwards'}
);
const animation = new WorkletAnimation('passthrough', effect);
// Immediately pausing animation should freeze the current time at 0.
animation.pause();
// Playing should cause animation to resume.
animation.play();
// Wait until we ensure animation has reached completion.
await waitForAnimationFrameWithCondition( _ => {
return animation.currentTime >= duration;
});
takeScreenshot();
});
</script>
</html>

View file

@ -0,0 +1,58 @@
<!DOCTYPE html>
<title>Verify that currentTime and playState are correct when animation is paused</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>
<div id="box"></div>
<script>
setup(setupAndRegisterTests, {explicit_done: true});
function createAnimation() {
const box = document.getElementById('box');
const effect = new KeyframeEffect(box,
{ transform: ['translateY(100px)', 'translateY(200px)'] },
{ duration: 100, iterations: 1 }
);
return new WorkletAnimation('passthrough', effect);
}
async function setupAndRegisterTests() {
await registerPassthroughAnimator();
promise_test(async t => {
const animation = createAnimation();
animation.play();
// Immediately pausing animation should freeze the current time at 0.
animation.pause();
assert_equals(animation.currentTime, 0);
assert_equals(animation.playState, "paused");
// Wait some time to ensure a paused animation actually freezes.
await waitForNextFrame();
assert_equals(animation.currentTime, 0);
assert_equals(animation.playState, "paused");
}, 'pausing an animation freezes its current time');
promise_test(async t => {
const animation = createAnimation();
const startTime = document.timeline.currentTime;
animation.pause();
animation.play();
await waitForNextFrame();
const timelineTime = document.timeline.currentTime;
assert_equals(animation.playState, "running");
assert_greater_than(animation.currentTime, 0);
assert_times_equal(animation.currentTime, (timelineTime - startTime));
}, 'playing a paused animation should resume it');
done();
}
</script>

View file

@ -44,3 +44,21 @@ backgroundFetchTest(async (test, backgroundFetch) => {
assert_equals(uploaded, uploadData.length);
}, 'Progress event includes uploaded bytes');
backgroundFetchTest(async (test, backgroundFetch) => {
const uploadRequest1 =
new Request('resources/upload.py', {method: 'POST', body: 'upload1'});
const uploadRequest2 =
new Request('resources/upload.py', {method: 'POST', body: 'upload2'});
await backgroundFetch.fetch(uniqueId(), [uploadRequest1, uploadRequest2]);
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
assert_equals(type, 'backgroundfetchsuccess');
assert_equals(results.length, 2);
assert_equals(eventRegistration.result, 'success');
assert_equals(eventRegistration.failureReason, '');
assert_array_equals([results[0].text, results[1].text].sort(),
['upload1', 'upload2']);
}, 'Duplicate upload requests work and can be distinguished.');

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Shadow Parts - Interaction with tree-abiding</title>
<title>CSS Shadow Parts - Interaction with pseudo-elements</title>
<meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly">
<link href="http://www.google.com/" rel="author" title="Google">
<link href="https://drafts.csswg.org/css-shadow-parts/" rel="help">
@ -14,6 +14,9 @@
#c-e::part(before-p)::before { color: green; }
#c-e::part(after-p)::after { color: green; }
#c-e::part(placeholder-p)::placeholder { color: green; }
#c-e::part(selection-p)::selection { color: green; }
#c-e::part(first-line-p)::first-line { color: green; }
#c-e::part(first-letter-p)::first-letter { color: green; }
</style>
<script>installCustomElement("custom-element", "custom-element-template");</script>
<template id="custom-element-template">
@ -21,6 +24,9 @@
#before-i::before { content: "this text"; color: red; }
#after-i::after { content: "this text"; color: red; }
#placeholder-i::placeholder { color: red; }
#selection-i::selection { color: red; }
#first-line-i::first-line { color: red; }
#first-letter-i::first-letter { color: red; }
</style>
<div>
The following text should be green:
@ -34,6 +40,18 @@
The following text should be green:
<input id="placeholder-i" part="placeholder-p" placeholder="this text"></input>
</div>
<div>
The selected text should be green:
<div id="selection-i" part="selection-p">select some text</div>
</div>
<div>
The following text should be green:
<div id="first-line-i" part="first-line-p">this text<br>Not this</div>
</div>
<div>
The first letter should be green:
<div id="first-letter-i" part="first-letter-p"><p>this text</p></div>
</div>
</template>
<custom-element id="c-e"></custom-element>
<script>
@ -51,6 +69,18 @@
const el = getElementByShadowIds(document, ["c-e", "placeholder-i"]);
assert_equals(window.getComputedStyle(el, '::placeholder').color, colorGreen);
}, "::placeholder in selected host is styled");
test(function() {
const el = getElementByShadowIds(document, ["c-e", "selection-i"]);
assert_equals(window.getComputedStyle(el, '::selection').color, colorGreen);
}, "::selection in selected host is styled");
test(function() {
const el = getElementByShadowIds(document, ["c-e", "first-line-i"]);
assert_equals(window.getComputedStyle(el, '::first-line').color, colorGreen);
}, "::first-line in selected host is styled");
test(function() {
const el = getElementByShadowIds(document, ["c-e", "first-letter-i"]);
assert_equals(window.getComputedStyle(el, '::first-letter').color, colorGreen);
}, "::first-letter in selected host is styled");
</script>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!doctype html>
<title>@charset isn't a valid rule and should be dropped</title>
<meta name="author" title="Tab Atkins-Bittner">
<link rel=help href="https://drafts.csswg.org/css-syntax/#charset-rule">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@charset "utf-8";
@charset "utf-8";
foo { color: blue; }
@charset "utf-8";
</style>
<script>
test(()=>{
assert_true(document.styleSheets[0].cssRules.length == 1)
}, "@charset isn't a valid rule and shouldn't show up in the OM");
</script>

View file

@ -22,7 +22,7 @@ div {
</style>
<p>This test passes if there is nothing below this sentence.
<div> FAIL <div>
<div> FAIL </div>
<!--
white-space:break-spaces should cause the spaces at the end of the line to be preserved.
Since there is an allowed break point between the first space and the F,

View file

@ -22,4 +22,4 @@ div {
</style>
<p>This test passes if the word FAIL does not appear below.
<div>PASS FAIL<div>
<div>PASS FAIL</div>

View file

@ -3,6 +3,7 @@
<title>CSS Text Test: overflow-wrap: break-word</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<meta name="flags" content="ahem">
<link rel="match" href="reference/overflow-wrap-break-word-001-ref.html">
<meta name="assert" content="A Single leading white-space constitutes a soft breaking opportunity, honoring the 'white-space: pre-wrap' property, that must prevent the word to be broken.">

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: overflow-wrap: break-word</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<meta name="flags" content="ahem">
<link rel="match" href="reference/overflow-wrap-break-word-001-ref.html">
<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>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
}
.red {
position: absolute;
background: green;
color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test {
color: green;
line-height: 1em;
width: 5ch;
white-space: break-spaces;
overflow-wrap: break-word;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="red"><br>XXXXX</div>
<div class="test"> XXXXX </div>
</body>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space: break-spaces</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word">
<meta name="flags" content="ahem">
<link rel="match" href="reference/pre-wrap-001-ref.html">
<meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the 'white-space: break-spaces' value.">
<style>
div {
position: relative;
font: 20px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 2ch;
white-space: break-spaces;
word-break: break-word;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail"><span>XX</span><br>XX</div>
<div class="test"> XX</div>
</body>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space - break-spaces</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="flags" content="ahem">
<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>
div {
position: relative;
font: 10px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 100px;
white-space: break-spaces;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail">XXXX<span>XXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XXXXXXXXXX</span><br><span>XX</span>XXXX<span>XXXX</span></div>
<div class="test">XXXX XXXX</div>
</body>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space - break-spaces</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="flags" content="ahem">
<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>
div {
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 4ch;
white-space: break-spaces;
word-break: break-all;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail"><span>X</span>XXX<br>X<span>X</span>XX<br>X<span>XXX</span><br><span>XXXX</span></div>
<div class="test"> XXXX XXX</div>
</body>

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space - break-spaces</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="flags" content="ahem">
<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>
div {
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 4ch;
white-space: break-spaces;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail"><span>XXXX</span><br>XXXX<br>XXX<span>X</span><br><span>XXXX</span></div>
<div class="test"> XXXX XXX</div>
</body>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space - break-spaces</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="flags" content="ahem">
<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>
div {
position: relative;
font: 25px/1 Ahem;
}
.fail {
position: absolute;
color: red;
z-index: -1;
}
span { color: green; }
.test {
color: green;
width: 4ch;
white-space: break-spaces;
word-break: break-all;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="fail">XXXX<br><span>X</span>XX<span>X</span><br><span>XXXX</span><br><span>XXXX</span></div>
<div class="test">XXXX XX</div>
</body>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: white-space: pre-wrap</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word">
<meta name="flags" content="ahem">
<link rel="match" href="reference/pre-wrap-001-ref.html">
<meta name="assert" content="The word is not broken if there are previous breaking opportunities, honoring the white-space: pre-wrap value.">
<style>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
}
.red {
position: absolute;
white-space: pre;
background: green;
color: red;
width: 40px;
height: 40px;
z-index: -1;
}
.test {
color: green;
line-height: 1em;
width: 2ch;
white-space: pre-wrap;
word-break: break-word;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="red"><br>XX</div>
<div class="test"> XX</div>
</body>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<style>
div {
position: relative;
width: 100px;
height: 100px;
background: green;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div></div>
</body>

View file

@ -1,8 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: overflow-wrap: break-word</title>
<title>CSS Text Test: word-break: break-all</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<meta name="flags" content="ahem">
<link rel="match" href="reference/word-break-break-all-010-ref.html">
<meta name="assert" content="The word is broken even if pre-wrap provides a former breaking opportunity in leading white-space.">

View file

@ -1,8 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: overflow-wrap: break-word</title>
<title>CSS Text Test: word-break: break-all</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<meta name="flags" content="ahem">
<link rel="match" href="reference/word-break-break-all-010-ref.html">
<meta name="assert" content="A single leading white-space should account as soft breaking opportunity, honoring the 'white-space: pre-wrap', on top to the ones provided by 'word-break: break-all'.">

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: overflow-wrap: break-word</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<meta name="flags" content="ahem">
<link rel="match" href="reference/word-break-break-all-010-ref.html">
<meta name="assert" content="The word is broken even if white-space: break-spaces provides a former breaking opportunity in leading white-space.">
<style>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
}
.red {
position: absolute;
white-space: pre;
background: green;
color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test {
color: green;
line-height: 1em;
width: 5ch;
white-space: break-spaces;
word-break: break-all;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="red"> XXXX<br>X</div>
<div class="test"> XXXXX</div>
</body>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: word-break: break-all</title>
<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<meta name="flags" content="ahem">
<link rel="match" href="reference/word-break-break-all-010-ref.html">
<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>
div {
position: relative;
font-size: 20px;
font-family: Ahem;
}
.red {
position: absolute;
background: green;
color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test {
color: green;
background: green;
line-height: 1em;
width: 1ch;
white-space: break-spaces;
word-break: break-all;
}
</style>
<body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div class="red">X<br>X<br>X</div>
<div class="test"> XX</div>
</body>

View file

@ -9,7 +9,7 @@
<meta name="assert" content="
When the fallback value of an attr() function is invalid, the delcaration is ignored.
" />
<meta name="flags" content="invalid">
<link
rel="author"
title="François REMY"

View file

@ -9,7 +9,7 @@
<meta name="assert" content="
When the type of an attr() function is known and unexpected, the declaration is ignored
" />
<meta name="flags" content="invalid">
<link
rel="author"
title="François REMY"

View file

@ -9,7 +9,7 @@
<meta name="assert" content="
When the type of an attr() function is known and unexpected, the declaration is ignored
" />
<meta name="flags" content="invalid">
<link
rel="author"
title="François REMY"

View file

@ -9,7 +9,7 @@
<meta name="assert" content="
When the attr() fallback is an invalid length, the delcaration is correctly ignored.
" />
<meta name="flags" content="invalid">
<link
rel="author"
title="François REMY"

View file

@ -9,7 +9,7 @@
<meta name="assert" content="
When the fallback of a pixel attribute reference is invalid, the declaration is ignored.
" />
<meta name="flags" content="invalid">
<link
rel="author"
title="François REMY"

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: ic unit in width (basic)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-4/#font-relative-lengths">
<link rel="match" href="reference/ic-unit-008-ref.html">
<meta name="flags" content="">
<meta name="assert" content="In this test, the ic unit is the advance width measure of the 水 (CJK water ideograph, U+6C34) glyph.">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
}
div#test-blue
{
background-color: blue;
height: 1.8em;
width: 5ic;
}
div#reference-orange
{
background-color: orange;
clear: left;
color: orange;
line-height: 1.8; /* arbitrary line-height */
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same width</strong> as an orange rectangle.
<div id="test-blue"></div>
<div id="reference-orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: ic unit in height (basic)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-4/#font-relative-lengths">
<link rel="match" href="reference/ic-unit-009-ref.html">
<meta name="flags" content="">
<meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
writing-mode: vertical-rl;
}
div#test-blue
{
background-color: blue;
height: 5ic;
width: 1.8em;
}
div#reference-orange
{
background-color: orange;
color: orange;
line-height: 1.8; /* arbitrary line-height */
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same height</strong> as an orange rectangle.
<div id="test-blue"></div>
<div id="reference-orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: ic unit in height with 'text-orientation: mixed'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-4/#font-relative-lengths">
<link rel="match" href="reference/ic-unit-009-ref.html">
<meta name="flags" content="">
<meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
text-orientation: mixed;
writing-mode: vertical-rl;
}
div#test-blue
{
background-color: blue;
height: 5ic;
width: 1.8em;
}
div#reference-orange
{
background-color: orange;
color: orange;
line-height: 1.8; /* arbitrary line-height */
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same height</strong> as an orange rectangle.
<div id="test-blue"></div>
<div id="reference-orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: ic unit in height with 'text-orientation: upright'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-4/#font-relative-lengths">
<link rel="match" href="reference/ic-unit-009-ref.html">
<meta name="flags" content="">
<meta name="assert" content="In this test, the ic unit is the advance height measure of the 水 (CJK water ideograph, U+6C34) glyph.">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
text-orientation: upright;
writing-mode: vertical-rl;
}
div#test-blue
{
background-color: blue;
height: 5ic;
width: 1.8em;
}
div#reference-orange
{
background-color: orange;
color: orange;
line-height: 1.8; /* arbitrary line-height */
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same height</strong> as an orange rectangle.
<div id="test-blue"></div>
<div id="reference-orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: ic unit in height with 'text-orientation: sideways'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-4/#font-relative-lengths">
<link rel="match" href="reference/ic-unit-009-ref.html">
<meta name="flags" content="">
<meta name="assert" content="In this test, the ic unit is the advance width measure of the 水 (CJK water ideograph, U+6C34) glyph.">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
text-orientation: sideways;
writing-mode: vertical-rl;
}
div#test-blue
{
background-color: blue;
height: 5ic;
width: 1.8em;
}
div#reference-orange
{
background-color: orange;
color: orange;
line-height: 1.8; /* arbitrary line-height */
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same height</strong> as an orange rectangle.
<div id="test-blue"></div>
<div id="reference-orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: case-insensitivity of Q unit (quarter-millimeter)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#absolute-lengths">
<link rel="help" href="https://www.w3.org/TR/CSS22/syndata.html#characters">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta content="This test checks that 'Q' unit is case-insensitive." name="assert">
<meta name="flags" content="">
<style>
div#test-overlapping-green
{
background-color: green;
height: 105.83333Q;
width: 1px;
width: 105.83333q;
}
/*
25.4mm == 96px
Therefore, 26.45833mm == 100px
So, 26.45833 * 4 (Q per mm) == 105.83333Q == 100px
*/
div#reference-overlapped-red
{
background-color: red;
bottom: 100px;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.
<div id="test-overlapping-green"></div>
<div id="reference-overlapped-red"></div>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: case-insensitivity of Q unit (quarter-millimeter)</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#absolute-lengths">
<link rel="help" href="https://www.w3.org/TR/CSS22/syndata.html#characters">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta content="This test checks that 'Q' unit is case-insensitive." name="assert">
<meta name="flags" content="">
<style>
div#test-overlapping-green
{
background-color: green;
height: 105.83333q;
width: 1px;
width: 105.83333Q;
}
/*
25.4mm == 96px
Therefore, 26.45833mm == 100px
So, 26.45833 * 4 (Q per mm) == 105.83333Q == 100px
*/
div#reference-overlapped-red
{
background-color: red;
bottom: 100px;
height: 100px;
position: relative;
width: 100px;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.
<div id="test-overlapping-green"></div>
<div id="reference-overlapped-red"></div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test Reference File</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
line-height: 1.8; /* arbitrary line-height */
}
div#blue
{
background-color: blue;
color: blue;
}
div#orange
{
background-color: orange;
color: orange;
clear: left;
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same width</strong> as an orange rectangle.
<div id="blue">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<div id="orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test Reference File</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
float: left;
font-size: 80px; /* arbitrary font size */
line-height: 1.8; /* arbitrary line-height */
writing-mode: vertical-rl;
}
div#blue
{
background-color: blue;
color: blue;
}
div#orange
{
background-color: orange;
color: orange;
}
</style>
<p>Test passes if there is a blue rectangle with the <strong>same height</strong> as an orange rectangle.
<div id="blue">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<div id="orange">&#27700;&#27700;&#27700;&#27700;&#27700;</div>
<!--
水 (CJK water ideograph, U+6C34) glyph == &#27700;
水 (CJK water ideograph, U+6C34) glyph == &#x6C34;
-->

View file

@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Encrypted Media Extensions: Check encryptionScheme with Clear Key</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">
<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<!-- Content metadata -->
<!--<script src=/encrypted-media/content/content-metadata.js></script>-->
<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/check-encryption-scheme.js></script>
</head>
<body>
<div id='log'></div>
<script>
var config = { keysystem: 'org.w3.clearkey' }
runTest(config);
</script>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Encrypted Media Extensions: Check HDCP status with Clear Key</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">
<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<!-- Content metadata -->
<!--<script src=/encrypted-media/content/content-metadata.js></script>-->
<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/check-status-for-hdcp.js></script>
</head>
<body>
<div id='log'></div>
<script>
var config = { keysystem: 'org.w3.clearkey' }
runTest(config);
</script>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Encrypted Media Extensions: Check encryptionScheme with DRM</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">
<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<!-- Content metadata -->
<!--<script src=/encrypted-media/content/content-metadata.js></script>-->
<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/check-encryption-scheme.js></script>
</head>
<body>
<div id='log'></div>
<script>
var config = { keysystem: getSupportedKeySystem() }
runTest(config);
</script>
</body>
</html>

View file

@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Encrypted Media Extensions: Check HDCP status with DRM</title>
<link rel="help" href="https://w3c.github.io/encrypted-media/">
<!-- Web Platform Test Harness scripts -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<!-- Helper scripts for Encrypted Media Extensions tests -->
<script src=/encrypted-media/util/utils.js></script>
<script src=/encrypted-media/util/utf8.js></script>
<!-- Content metadata -->
<!--<script src=/encrypted-media/content/content-metadata.js></script>-->
<!-- The script for this specific test -->
<script src=/encrypted-media/scripts/check-status-for-hdcp.js></script>
</head>
<body>
<div id='log'></div>
<script>
var config = { keysystem: getSupportedKeySystem() }
runTest(config);
</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that encrypted-media is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://github.com/w3c/encrypted-media/pull/432">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('encrypted-media', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise encrypted-media.');
</script>

View file

@ -0,0 +1,41 @@
function runTest(config, qualifier)
{
function checkEncryptionScheme(encryptionScheme)
{
var simpleConfig = getSimpleConfiguration();
assert_greater_than(simpleConfig[0].audioCapabilities.length, 0);
simpleConfig[0].audioCapabilities.forEach(function(capability) {
capability.encryptionScheme = encryptionScheme;
});
return navigator.requestMediaKeySystemAccess(config.keysystem, simpleConfig)
.then(
function(access) {
var actualConfiguration = access.getConfiguration();
for (let i = 0; i < actualConfiguration.audioCapabilities.length; i++) {
const capability = actualConfiguration.audioCapabilities[i];
// If "encryptionScheme" is not supported, fail.
if (!('encryptionScheme' in capability)) {
return Promise.reject('Not implemented');
}
// If "encryptionScheme" is supported, it should be returned.
assert_equals(capability.encryptionScheme, encryptionScheme);
}
return Promise.resolve('Supported');
},
function error() {
// CDM does not support "encryptionScheme". Test should still pass.
return Promise.resolve('Not supported');
});
}
promise_test(
() => checkEncryptionScheme('cenc'),
testnamePrefix(qualifier, config.keysystem) + ' support for "cenc" encryption scheme.');
promise_test(
() => checkEncryptionScheme('cbcs'),
testnamePrefix(qualifier, config.keysystem) + ' support for "cbcs" encryption scheme.');
}

View file

@ -0,0 +1,26 @@
function runTest(config, qualifier)
{
function checkStatusForMinHdcpVersionPolicy(hdcpVersion)
{
return navigator.requestMediaKeySystemAccess(config.keysystem, getSimpleConfiguration())
.then(function(access) {
return access.createMediaKeys();
})
.then(function(mediaKeys) {
// As HDCP policy depends on the hardware running this test,
// don't bother checking the result returned as it may or
// may not be supported. This simply verifies that
// getStatusForPolicy() exists and doesn't blow up.
return mediaKeys.getStatusForPolicy({minHdcpVersion: hdcpVersion});
});
}
promise_test(
() => checkStatusForMinHdcpVersionPolicy(''),
testnamePrefix(qualifier, config.keysystem) +
' support for empty HDCP version.');
promise_test(
() => checkStatusForMinHdcpVersionPolicy('1.0'),
testnamePrefix(qualifier, config.keysystem) + ' support for HDCP 1.0.');
}

View file

@ -0,0 +1,11 @@
test(() => {
if (typeof PerformanceObserver.supportedEntryTypes === "undefined")
assert_unreached("supportedEntryTypes is not supported.");
const types = PerformanceObserver.supportedEntryTypes;
assert_true(types.includes("firstInput"),
"There should be 'firstInput' in PerformanceObserver.supportedEntryTypes");
assert_true(types.includes("event"),
"There should be 'event' in PerformanceObserver.supportedEntryTypes");
assert_greater_than(types.indexOf("firstInput"), types.indexOf('event'),
"The 'firstInput' entry should appear after the 'event' entry");
}, "supportedEntryTypes contains 'event' and 'firstInput'.");

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that payment is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://github.com/w3c/payment-request/issues/600">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('payment', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise payment.');
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that picture-in-picture is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://wicg.github.io/picture-in-picture/#feature-policy">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('picture-in-picture', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise picture-in-picture.');
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<img src="./unoptimized-image.jpg">
<script>
var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "feature-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "unoptimized-images");
assert_equals(report.body.disposition, "enforce");
};
async_test(t => {
new ReportingObserver(t.step_func_done(check_report_format),
{types: ['feature-policy-violation'], buffered: true}).observe();
}, "unoptimized-images Report Format");
</script>
</body>
</html>

View file

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

View file

@ -8,7 +8,8 @@ const crossOriginURL = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin
"SAME-ORIGIN",
"Same-Origin",
"same-origin, <>",
"same-origin, same-origin"
"same-origin, same-origin",
"https://www.example.com", // See https://github.com/whatwg/fetch/issues/760
].forEach(incorrectHeaderValue => {
// Note: an incorrect value results in a successful load, so this test is only meaningful in
// implementations with support for the header.

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that geolocation is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/sensors/#feature-policy-api">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('geolocation', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise geolocation.');
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that gyroscope is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/sensors/#feature-policy-api">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('gyroscope', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise gyroscope.');
</script>

View file

@ -106,16 +106,22 @@ addTest(function() {
C.location[prop]; // Shouldn't throw.
Object.getOwnPropertyDescriptor(C.location, prop); // Shouldn't throw.
assert_true(Object.prototype.hasOwnProperty.call(C.location, prop), "hasOwnProperty for " + prop);
assert_throws("SecurityError", function() { C.location[prop] = undefined; }, "Should throw when writing to " + prop + " on Location");
}
else if (prop == 'href') {
Object.getOwnPropertyDescriptor(C.location, prop); // Shouldn't throw.
assert_true(Object.prototype.hasOwnProperty.call(C.location, prop), "hasOwnProperty for " + prop);
assert_throws("SecurityError", function() { C.location[prop] },
"Should throw reading href on Location");
}
else {
assert_throws("SecurityError", function() { C[prop]; }, "Should throw when accessing " + prop + " on Location");
assert_throws("SecurityError", function() { Object.getOwnPropertyDescriptor(C, prop); },
assert_throws("SecurityError", function() { C.location[prop]; }, "Should throw when accessing " + prop + " on Location");
assert_throws("SecurityError", function() { Object.getOwnPropertyDescriptor(C.location, prop); },
"Should throw when accessing property descriptor for " + prop + " on Location");
assert_throws("SecurityError", function() { Object.prototype.hasOwnProperty.call(C, prop); },
assert_throws("SecurityError", function() { Object.prototype.hasOwnProperty.call(C.location, prop); },
"Should throw when invoking hasOwnProperty for " + prop + " on Location");
assert_throws("SecurityError", function() { C.location[prop] = undefined; }, "Should throw when writing to " + prop + " on Location");
}
if (prop != 'href')
assert_throws("SecurityError", function() { C[prop] = undefined; }, "Should throw when writing to " + prop + " on Location");
}
}, "Only whitelisted properties are accessible cross-origin");
@ -150,11 +156,22 @@ addTest(function() {
assert_throws(new TypeError, function() { protoSetter.call(C, new Object()); }, "proto setter |call| on cross-origin Window");
assert_throws(new TypeError, function() { protoSetter.call(C.location, new Object()); }, "proto setter |call| on cross-origin Location");
});
// Hack to avoid "duplicate test name" harness issues.
setters.forEach(function(protoSetter) {
test(function() { protoSetter.call(C, null); },
"proto setter |call| on cross-origin Window with null (" + protoSetter + ")");
test(function() { protoSetter.call(C.location, null); },
"proto setter |call| on cross-origin Location with null (" + protoSetter + ")");
});
if (Reflect.setPrototypeOf) {
assert_false(Reflect.setPrototypeOf(C, new Object()),
"Reflect.setPrototypeOf on cross-origin Window");
assert_true(Reflect.setPrototypeOf(C, null),
"Reflect.setPrototypeOf on cross-origin Window with null");
assert_false(Reflect.setPrototypeOf(C.location, new Object()),
"Reflect.setPrototypeOf on cross-origin Location");
assert_true(Reflect.setPrototypeOf(C.location, null),
"Reflect.setPrototypeOf on cross-origin Location with null");
}
}, "[[SetPrototypeOf]] should return false");
@ -230,6 +247,19 @@ addTest(function() {
assert_equals(typeof D.then, "object");
}, "[[GetOwnProperty]] - Subframe named 'then' should shadow the default 'then' value");
addTest(function() {
assert_equals(typeof D.close, "function");
assert_equals(typeof D.open, "object");
}, "[[GetOwnProperty]] - Subframes should be visible cross-origin only if their names don't match the names of cross-origin-exposed IDL properties");
addTest(function() {
assert_equals(typeof Object.getOwnPropertyDescriptor(C, '0').value, "object");
assert_equals(typeof Object.getOwnPropertyDescriptor(C, '1').value, "object");
assert_throws("SecurityError", function() {
Object.getOwnPropertyDescriptor(C, '2');
});
}, "[[GetOwnProperty]] - Should be able to get a property descriptor for an indexed property only if it corresponds to a child window.");
/*
* [[Delete]]
*/

View file

@ -6,5 +6,9 @@
<!-- A subframe to test "then" behavior -->
<iframe name="then"></iframe>
<iframe name="b"></iframe>
<!-- Two subframes with names corresponding to IDL-defined properties; one
a cross-origin-exposed property and one not exposed cross-origin -->
<iframe name="close"></iframe>
<iframe name="open"></iframe>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that autoplay is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://html.spec.whatwg.org/multipage/infrastructure.html#policy-controlled-features">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('autoplay', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise autoplay.');
</script>

View file

@ -200,6 +200,7 @@ interface IDBTransaction : EventTarget {
readonly attribute DOMException error;
IDBObjectStore objectStore(DOMString name);
void commit();
void abort();
// Event handlers:

View file

@ -18,7 +18,7 @@ interface MediaRecorder : EventTarget {
readonly attribute unsigned long videoBitsPerSecond;
readonly attribute unsigned long audioBitsPerSecond;
void start(optional long timeslice);
void start(optional unsigned long timeslice);
void stop();
void pause();
void resume();

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Test that magnetometer is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/sensors/#feature-policy-api">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('magnetometer', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise magnetometer.');
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<title>Test that accelerometer is advertised in the feature list</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#dom-featurepolicy-features">
<link rel="help" href="https://w3c.github.io/mediacapture-main/#feature-policy-integration">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_in_array('camera', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise camera.');
test(() => {
assert_in_array('microphone', document.featurePolicy.features());
}, 'document.featurePolicy.features should advertise microphone.');
</script>

View file

@ -1,6 +1,7 @@
<!doctype html>
<title>MediaStreamTrack GetSettings</title>
<p class="instructions">When prompted, accept to share your video stream.</p>
<meta name=timeout content=long>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>

View file

@ -68,7 +68,6 @@ function runManualTest(button, expected = {}) {
<button onclick="
const expectedAddress = {
country: 'AU',
regionCode: 'QLD',
addressLine: '55 test st',
city: 'Chapel Hill',
dependentLocality: '',

View file

@ -81,11 +81,6 @@ function retryShowsShippingAddressMember(button, error) {
The payment sheet shows "REGION ERROR" for the shipping address' region.
</button>
</li>
<li>
<button onclick="retryShowsShippingAddressMember(this, { regionCode: 'REGIONCODE ERROR' });">
The payment sheet shows "REGIONCODE ERROR" for the shipping address' region code.
</button>
</li>
<li>
<button onclick="retryShowsShippingAddressMember(this, { sortingCode: 'SORTINGCODE ERROR' });">
The payment sheet shows "SORTINGCODE ERROR" for the shipping address' sorting code.

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