Update web-platform-tests to revision 2abaf21d855986de7baa55ad52a601c489ff22fd

This commit is contained in:
WPT Sync Bot 2019-01-07 20:35:39 -05:00
parent e09e683718
commit 05d9213a6e
33 changed files with 531 additions and 95 deletions

View file

@ -0,0 +1,10 @@
[getContextAttributes.html]
[Test context creation attributes alpha: true]
expected: FAIL
[Test context creation attributes alpha: false]
expected: FAIL
[Test default context creation attributes]
expected: FAIL

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]

View file

@ -13507,6 +13507,12 @@
{}
]
],
"payment-request/billing-address-changed-manual.https.html": [
[
"/payment-request/billing-address-changed-manual.https.html",
{}
]
],
"payment-request/change-shipping-option-manual.https.html": [
[
"/payment-request/change-shipping-option-manual.https.html",
@ -122481,6 +122487,18 @@
{}
]
],
"css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html": [
[
"/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html",
[
[
"/css/css-grid/reference/grid-auto-repeat-multiple-values-001-ref.html",
"=="
]
],
{}
]
],
"css/css-grid/grid-definition/grid-layout-auto-tracks.html": [
[
"/css/css-grid/grid-definition/grid-layout-auto-tracks.html",
@ -264904,6 +264922,11 @@
{}
]
],
"css/css-grid/reference/grid-auto-repeat-multiple-values-001-ref.html": [
[
{}
]
],
"css/css-grid/reference/grid-different-gutters-ref.html": [
[
{}
@ -326622,6 +326645,12 @@
{}
]
],
"2dcontext/context-attributes/getContextAttributes.html": [
[
"/2dcontext/context-attributes/getContextAttributes.html",
{}
]
],
"2dcontext/drawing-images-to-the-canvas/2d.drawImage.3arg.html": [
[
"/2dcontext/drawing-images-to-the-canvas/2d.drawImage.3arg.html",
@ -407628,6 +407657,12 @@
{}
]
],
"resource-timing/test_resource_timing.https.html": [
[
"/resource-timing/test_resource_timing.https.html",
{}
]
],
"screen-capture/getdisplaymedia.https.html": [
[
"/screen-capture/getdisplaymedia.https.html",
@ -445899,6 +445934,10 @@
"a1697c60087c2426338a467604c3542ca3d01c4a",
"testharness"
],
"2dcontext/context-attributes/getContextAttributes.html": [
"cff02ea06f6e6d50647ea7f7992cbcb89dd878a0",
"testharness"
],
"2dcontext/drawing-images-to-the-canvas/2d.drawImage.3arg.html": [
"b4fd347b9bf3ef246940379f4c86a1a3539f350d",
"testharness"
@ -456336,7 +456375,7 @@
"testharness"
],
"clipboard-apis/async-navigator-clipboard-basics.https.html": [
"8d7cf99ed202349973dd173ff02873f5ef9157eb",
"11ed88c3fa2172c2ca0e635cb7f263f99388ca3a",
"testharness"
],
"clipboard-apis/async-write-dttext-read-dttext-manual.https.html": [
@ -560207,6 +560246,10 @@
"00ef5a5974423967dadf26a594539ab2eb65526c",
"reftest"
],
"css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html": [
"085d94996f1142d11f9f9c6076e6d9afc025c39c",
"reftest"
],
"css/css-grid/grid-definition/grid-change-fit-content-argument-001.html": [
"9441b0a439e1bbdcd3954af439a49ac162a513a1",
"testharness"
@ -561163,6 +561206,10 @@
"1f325f37a2cd0bc08603ed3b3fd2730e4084203a",
"support"
],
"css/css-grid/reference/grid-auto-repeat-multiple-values-001-ref.html": [
"0b8ef6d39bf6f01d994f6025f34c0136cc2908cf",
"support"
],
"css/css-grid/reference/grid-different-gutters-ref.html": [
"57d27ff3aaea88eaeeed6f34f8ac49623b409fd2",
"support"
@ -648639,6 +648686,10 @@
"4564d264c4e2c542b25740e92709c9e7c0a14a1d",
"testharness"
],
"payment-request/billing-address-changed-manual.https.html": [
"cb9acf6eb6a20df5ddd03ef734796cefb6195467",
"manual"
],
"payment-request/change-shipping-option-manual.https.html": [
"a33365bac73ed51b6873215d0f54d79a73422163",
"manual"
@ -659771,8 +659822,12 @@
"f4e851abb203aca49194aef51646be673507078f",
"testharness"
],
"resource-timing/test_resource_timing.https.html": [
"f4e851abb203aca49194aef51646be673507078f",
"testharness"
],
"resource-timing/test_resource_timing.js": [
"8e729e013567a123f9c4a71ab7ea30435b7e2b47",
"598a727bf88e7f47556d509f6929a86b64b0506c",
"support"
],
"resources/.gitignore": [
@ -674800,7 +674855,7 @@
"support"
],
"tools/wpt/run.py": [
"a6b61e42c0b09fdf498d9ab4ed050f5abca24bf9",
"44cf3137d41338a7e57e29ae998859b4bc42a82b",
"support"
],
"tools/wpt/testfiles.py": [
@ -675288,7 +675343,7 @@
"support"
],
"tools/wptrunner/wptrunner/testloader.py": [
"f8849ebe75e6c5a2370ad45bc8fd9d5d43750277",
"aa23cfb5e9bdf5fb8de7ae78b2774d704130eada",
"support"
],
"tools/wptrunner/wptrunner/testrunner.py": [
@ -675376,7 +675431,7 @@
"support"
],
"tools/wptrunner/wptrunner/wptcommandline.py": [
"08810fcc0272d6cf3096c5fc111014fdae85c9e6",
"8443a01c7dea9d8839f9659e194614bcbf4caedb",
"support"
],
"tools/wptrunner/wptrunner/wptlogging.py": [
@ -675436,7 +675491,7 @@
"support"
],
"tools/wptrunner/wptrunner/wptrunner.py": [
"f5780daacd7f4d0dfc1902c98ad387adcebf857b",
"ec9a3fe838e14f20cc2bb0012c4a8e294353382c",
"support"
],
"tools/wptrunner/wptrunner/wpttest.py": [
@ -675900,7 +675955,7 @@
"testharness"
],
"trusted-types/TrustedTypePolicy-createXXX.tentative.html": [
"6a0151ad9bcf7d02b6a98532ba53db509e086f83",
"475a264790482aedf714958f63a4d47d69661941",
"testharness"
],
"trusted-types/TrustedTypePolicy-exposed.tentative.html": [
@ -675912,7 +675967,7 @@
"testharness"
],
"trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html": [
"a162d84cd820051d6c5868c35b58cd347b0026e5",
"37e245ee27aa5828bd97568d9390d9cbfbb6f968",
"testharness"
],
"trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html": [
@ -675984,7 +676039,7 @@
"testharness"
],
"trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html": [
"b24ab69c0671dd3e8551f289e1cb67e455e1937c",
"c243757887a83611d28c61c1c1ce45a0fda925b2",
"testharness"
],
"trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html": [
@ -675992,7 +676047,7 @@
"testharness"
],
"trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [
"0eef00bd7772b50bd6d774425cbe688eacf0183f",
"4a5c2cc8d62e22888b463b724bab255500943af5",
"testharness"
],
"trusted-types/block-string-assignment-to-Location-assign.tentative.html": [
@ -681716,7 +681771,7 @@
"testharness"
],
"webrtc/RTCPeerConnection-setRemoteDescription.html": [
"182abea403ed7bee6568aac402cbb6a8caac6159",
"464e16d736a02085e312350597c5ebe492de3c1c",
"testharness"
],
"webrtc/RTCPeerConnection-track-stats.https.html": [

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

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

View file

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

View file

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

View file

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

View file

@ -13,3 +13,21 @@
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: FAIL
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to wide]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to wide]
expected: FAIL
[img (srcset 1 cand) valid image, resize to narrow]
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to wide]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL

View file

@ -1,7 +0,0 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -0,0 +1,4 @@
[iframe_005.html]
[document.write external script into iframe write back into parent]
expected: FAIL

View file

@ -0,0 +1,4 @@
[aborted-parser.window.html]
[document.open() after parser is aborted]
expected: FAIL

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

@ -12,6 +12,3 @@
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
expected: TIMEOUT
[Verifies the resolution of performance.now() is at least 5 microseconds.]
expected: FAIL

View file

@ -0,0 +1,77 @@
[test_resource_timing.https.html]
expected: TIMEOUT
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (script)]
expected: FAIL
[PerformanceEntry has correct protocol attribute (iframe)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (iframe)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (iframe)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (xmlhttprequest)]
expected: FAIL
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (xmlhttprequest)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (link)]
expected: NOTRUN
[PerformanceEntry has correct network transfer attributes (link)]
expected: NOTRUN
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (link)]
expected: TIMEOUT
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (iframe)]
expected: FAIL
[PerformanceEntry has correct protocol attribute (link)]
expected: NOTRUN
[PerformanceEntry has correct protocol attribute (img)]
expected: FAIL
[PerformanceEntry has correct network transfer attributes (iframe)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (xmlhttprequest)]
expected: FAIL
[PerformanceEntry has correct network transfer attributes (img)]
expected: FAIL
[PerformanceEntry has correct network transfer attributes (script)]
expected: FAIL
[PerformanceEntry has correct protocol attribute (xmlhttprequest)]
expected: FAIL
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (img)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (script)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (script)]
expected: FAIL
[PerformanceEntry has correct network transfer attributes (xmlhttprequest)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (img)]
expected: FAIL
[PerformanceEntry has correct protocol attribute (script)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (img)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (link)]
expected: NOTRUN

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,2 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -0,0 +1,34 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var testScenarios = [
{testDescription: "Test default context creation attributes",
canvasContextAttributes: {},
expectedContextAttributes: {alpha : true}},
{testDescription: "Test context creation attributes alpha: true",
canvasContextAttributes: {alpha: true},
expectedContextAttributes: {alpha : true}},
{testDescription: "Test context creation attributes alpha: false",
canvasContextAttributes: {alpha: false},
expectedContextAttributes: {alpha : false}},
];
function runTestScenario(testScenario) {
var t = test(function() {
var canvas = document. createElement('canvas');
var ctx = canvas.getContext('2d', testScenario.canvasContextAttributes);
var contextAttributes = ctx.getContextAttributes();
assert_equals(contextAttributes.alpha,
testScenario.expectedContextAttributes.alpha);
}, testScenario.testDescription);
}
function runAllTests() {
for (var i = 0; i < testScenarios.length; i++)
runTestScenario(testScenarios[i]);
}
runAllTests();
</script>

View file

@ -13,57 +13,53 @@ test(() => {
/* clipboard.write() */
promise_test(() => {
promise_test(async () => {
const dt = new DataTransfer();
dt.items.add("Howdy", "text/plain");
return navigator.clipboard.write(dt);
await navigator.clipboard.write(dt);
}, "navigator.clipboard.write(DataTransfer) succeeds");
promise_test(t => {
return promise_rejects(t, new TypeError(),
promise_test(async t => {
await promise_rejects(t, new TypeError(),
navigator.clipboard.write());
}, "navigator.clipboard.write() fails (expect DataTransfer)");
promise_test(t => {
return promise_rejects(t, new TypeError(),
promise_test(async t => {
await promise_rejects(t, new TypeError(),
navigator.clipboard.write(null));
}, "navigator.clipboard.write(null) fails (expect DataTransfer)");
promise_test(t => {
return promise_rejects(t, new TypeError(),
promise_test(async t => {
await promise_rejects(t, new TypeError(),
navigator.clipboard.write("Bad string"));
}, "navigator.clipboard.write(DOMString) fails (expect DataTransfer)");
/* clipboard.writeText() */
promise_test(() => {
return navigator.clipboard.writeText("New clipboard text");
promise_test(async () => {
await navigator.clipboard.writeText("New clipboard text");
}, "navigator.clipboard.writeText(DOMString) succeeds");
promise_test(t => {
return promise_rejects(t, new TypeError(),
promise_test(async t => {
await promise_rejects(t, new TypeError(),
navigator.clipboard.writeText());
}, "navigator.clipboard.writeText() fails (expect DOMString)");
/* clipboard.read() */
promise_test(() => {
return navigator.clipboard.read()
.then(result => {
assert_true(result instanceof DataTransfer);
});
promise_test(async () => {
const result = await navigator.clipboard.read();
assert_true(result instanceof DataTransfer);
}, "navigator.clipboard.read() succeeds");
/* clipboard.readText() */
promise_test(() => {
return navigator.clipboard.readText()
.then(result => {
assert_equals(typeof result, "string");
});
promise_test(async () => {
const result = await navigator.clipboard.readText();
assert_equals(typeof result, "string");
}, "navigator.clipboard.readText() succeeds");
</script>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Auto Repaeat with Multiple Tracks and Gutters</title>
<link rel="author" title="Yu Shen" href="shenyu.tcv@gmail.com">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#repeat-notation">
<link rel="match" href="../reference/grid-auto-repeat-multiple-values-001-ref.html">
<style>
.grid-container {
display: grid;
border: solid thick;
margin: 10px;
}
.columns {
grid-template-columns: repeat(auto-fill, 50px 50px);
grid-auto-rows: 25px;
grid-column-gap: 100px;
width: 300px;
}
.rows {
grid-auto-flow: column;
grid-template-rows: repeat(auto-fill, 50px 50px);
grid-auto-columns: 25px;
grid-row-gap: 100px;
width: min-content;
height: 300px;
}
.grid-container>div {
background: lime;
}
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="grid-container columns">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="grid-container rows">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Auto Repaeat with Multiple Tracks and Gutters</title>
<link rel="author" title="Yu Shen" href="shenyu.tcv@gmail.com">
<style>
.match-container {
border: solid thick black;
position: relative;
margin: 10px;
}
.column {
width: 300px;
}
.row {
width: min-content;
height: 300px;
}
.item {
background: lime;
width: 50px;
height: 50px;
}
.column-second {
position: absolute;
top: 0;
left: 150px;
}
.row-second {
position: absolute;
top: 150px;
left: 0px;
}
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="match-container column">
<div class="item"></div>
<div class="item column-second"></div>
</div>
<div class="match-container row">
<div class="item"></div>
<div class="item row-second"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,106 @@
<!DOCTYPE html> <meta charset="utf-8" />
<title>Test for requesting billing address</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({
explicit_done: true,
explicit_timeout: true,
});
const methods = [
{ supportedMethods: "basic-card" },
{ supportedMethods: "https://apple.com/apple-pay" },
];
const details = {
total: {
label: "label",
amount: { currency: "USD", value: "5.00" },
},
};
test(() => {
assert_true(
"onpaymentmethodchange" in PaymentRequest.prototype,
"The paymentmethodchange is not supported"
);
}, "onpaymentmethodchange is in prototype");
function dontRequestBillingAddress() {
promise_test(async t => {
const request = new PaymentRequest(methods, details, {});
const showPromise = request.show();
// Let's check the method data from event.
const { methodDetails } = await new Promise(resolve =>
request.addEventListener("paymentmethodchange", resolve)
);
assert_true("billingAddress" in methodDetails);
assert_equals(
methodDetails.billingAddress,
null,
"Expected methodDetails.billingAddress to be null"
);
await request.abort();
});
}
function requestBillingAddress() {
promise_test(async t => {
const request = new PaymentRequest(methods, details, {
requestBillingAddress: true,
});
const showPromise = request.show();
// Let's check the method data from event.
const { methodDetails } = await new Promise(resolve =>
request.addEventListener("paymentmethodchange", resolve)
);
assert_true("billingAddress" in methodDetails);
const { billingAddress } = methodDetails;
assert_true(
billingAddress instanceof PaymentAddress,
"Expected instance of PaymentAddress"
);
await request.abort();
});
}
</script>
<h2>Request billing address</h2>
<p>
Click on each button in sequence from top to bottom without refreshing the
page. Each button will bring up the Payment Request UI window.
</p>
<p>
When the payment sheet is presented, select a payment method (e.g., a credit
card).
</p>
<ol>
<li>
<button onclick="dontRequestBillingAddress()">
When no billing address is requested,
`PaymentMethodChangeEvent.methodDetails.billingAddress` is null.
</button>
</li>
<li>
<button onclick="requestBillingAddress()">
When billing address is
requested,`PaymentMethodChangeEvent.methodDetails.billingAddress` is a
`PaymentAddress`.
</button>
</li>
<li><button onclick="done()">Done!</button></li>
</ol>
<small>
If you find a buggy test, please
<a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> and
tag one of the
<a
href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml"
>suggested reviewers</a
>.
</small>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>window.performance Resource Timing Entries exist</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="https://w3c.github.io/web-performance/specs/ResourceTiming/Overview.html"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="test_resource_timing.js"></script>
</head>
<body>
<h1>Description</h1>
<p>
NOTE: Due to caching behavior in the browser, it is possible that when revisiting this page, some resources
may not have to be fetched from the network. As a result, the performance timeline will not contain entries
for these resources. This test will fail if any entries are missing to ensure that all resources are fetched
from the network and entries for these resources exist in the Performance Timeline. If revisiting this page,
please either perform a full reload of the page or clear the cache between visits.
</p>
<div id="log"></div>
</body>
</html>

View file

@ -186,22 +186,21 @@ function resource_load(expected)
const entries = window.performance.getEntriesByName(expected.name);
assert_equals(entries.length, 1, 'There should be a single matching entry');
const actual = entries[0];
// Debugging bug 1263428
// Feel free to remove/overwrite this piece of code
if (actual.connectStart < actual.domainLookupEnd) {
assert_true(false, "actual: "+JSON.stringify(actual));
if (window.location.protocol == "http:") {
assert_equals(actual.secureConnectionStart, 0, 'secureConnectionStart should be 0 in http');
} else {
assert_greater_than(actual.secureConnectionStart, 0, 'secureConnectionStart should not be 0 in https');
}
assert_equals(actual.redirectStart, 0, 'redirectStart should be 0');
assert_equals(actual.redirectEnd, 0, 'redirectEnd should be 0');
assert_true(actual.secureConnectionStart == undefined ||
actual.secureConnectionStart == 0, 'secureConnectionStart should be 0 or undefined');
assert_equals(actual.fetchStart, actual.startTime, 'fetchStart is equal to startTime');
assert_greater_than_equal(actual.domainLookupStart, actual.fetchStart, 'domainLookupStart after fetchStart');
assert_greater_than_equal(actual.domainLookupEnd, actual.domainLookupStart, 'domainLookupEnd after domainLookupStart');
assert_greater_than_equal(actual.connectStart, actual.domainLookupEnd, 'connectStart after domainLookupEnd');
assert_greater_than_equal(actual.connectEnd, actual.connectStart, 'connectEnd after connectStart');
assert_true(actual.secureConnectionStart == 0 || actual.secureConnectionStart <= actual.requestStart,
"secureConnectionStart should be either 0 or smaller than/equals to requestStart")
assert_greater_than_equal(actual.requestStart, actual.connectEnd, 'requestStart after connectEnd');
assert_greater_than_equal(actual.responseStart, actual.requestStart, 'responseStart after requestStart');
assert_greater_than_equal(actual.responseEnd, actual.responseStart, 'responseEnd after responseStart');

View file

@ -510,11 +510,9 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
files_changed, manifest_path=kwargs.get("manifest_path"), manifest_update=kwargs["manifest_update"])
test_list = tests_changed | tests_affected
logger.info("Identified %s affected tests" % len(test_list))
if not test_list and not kwargs["test_list"]:
logger.info("Quitting because no tests were affected.")
exit()
test_list = [os.path.relpath(item, wpt_root) for item in test_list]
kwargs["test_list"] += test_list
kwargs["default_exclude"] = True
if install_browser and not kwargs["channel"]:
logger.info("--install-browser is given but --channel is not set, default to nightly channel")

View file

@ -338,15 +338,17 @@ class EqualTimeChunker(TestChunker):
class TestFilter(object):
def __init__(self, test_manifests, include=None, exclude=None, manifest_path=None):
if manifest_path is not None and include is None:
self.manifest = manifestinclude.get_manifest(manifest_path)
else:
def __init__(self, test_manifests, include=None, exclude=None, manifest_path=None, explicit=False):
if manifest_path is None or include or explicit:
self.manifest = manifestinclude.IncludeManifest.create()
self.manifest.set_defaults()
else:
self.manifest = manifestinclude.get_manifest(manifest_path)
if include or explicit:
self.manifest.set("skip", "true")
if include:
self.manifest.set("skip", "true")
for item in include:
self.manifest.add_include(test_manifests, item)

View file

@ -137,6 +137,11 @@ scheme host and port.""")
test_selection_group.add_argument("--tag", action="append", dest="tags",
help="Labels applied to tests to include in the run. "
"Labels starting dir: are equivalent to top-level directories.")
test_selection_group.add_argument("--default-exclude", action="store_true",
default=False,
help="Only run the tests explicitly given in arguments. "
"No tests will run if the list is empty, and the "
"program will exit with status code 0.")
debugging_group = parser.add_argument_group("Debugging")
debugging_group.add_argument('--debugger', const="__default__", nargs="?",

View file

@ -59,11 +59,12 @@ def get_loader(test_paths, product, debug=None, run_info_extras=None, **kwargs):
manifest_filters = []
meta_filters = []
if kwargs["include"] or kwargs["exclude"] or kwargs["include_manifest"]:
if kwargs["include"] or kwargs["exclude"] or kwargs["include_manifest"] or kwargs["default_exclude"]:
manifest_filters.append(testloader.TestFilter(include=kwargs["include"],
exclude=kwargs["exclude"],
manifest_path=kwargs["include_manifest"],
test_manifests=test_manifests))
test_manifests=test_manifests,
explicit=kwargs["default_exclude"]))
if kwargs["tags"]:
meta_filters.append(testloader.TagFilter(tags=kwargs["tags"]))
@ -169,7 +170,7 @@ def run_tests(config, test_paths, product, **kwargs):
test_total = 0
unexpected_total = 0
if len(test_loader.test_ids) == 0:
if len(test_loader.test_ids) == 0 and kwargs["test_list"]:
logger.error("Unable to find any tests at the path(s):")
for path in kwargs["test_list"]:
logger.error(" %s" % path)
@ -299,8 +300,12 @@ def run_tests(config, test_paths, product, **kwargs):
if skipped_tests > 0:
logger.warning("All requested tests were skipped")
else:
logger.error("No tests ran")
return False
if kwargs["default_exclude"]:
logger.info("No tests ran")
return True
else:
logger.error("No tests ran")
return False
if unexpected_total and not kwargs["fail_on_unexpected"]:
logger.info("Tolerating %s unexpected results" % unexpected_total)

View file

@ -36,7 +36,7 @@
assert_equals(el.title, INPUTS.URL);
el.title = policy.createURL(INPUTS.HTML);
assert_equals(el.title, "");
assert_equals(el.title, INPUTS.HTML);
}, "Attributes without type constraints will work as before.");
test(t => {
@ -71,14 +71,14 @@
const urlTestCases = [
[ s => s, INPUTS.SCRIPTURL ],
[ s => null, "" ],
[ s => null, "null" ],
[ s => s + "#duck", INPUTS.SCRIPTURL + "#duck" ],
[ s => { throw new Error() }, new Error() ],
[ s => s + "#" + aGlobalVarForSideEffectTesting,
INPUTS.SCRIPTURL + "#global" ],
[ anotherGlobalFunction.bind(aGlobalObject), INPUTS.SCRIPTURL + "#well," ],
[ s => anotherGlobalFunction(s),
INPUTS.SCRIPTURL + "#a%20global%20var%20named%20foo" ],
INPUTS.SCRIPTURL + "#a global var named foo" ],
];
function policyBuilder(trustedMethodName, trustedType, defaultArg) {

View file

@ -165,7 +165,7 @@
}, "script_url = identity function");
test(t => {
createScriptURLTest('TestPolicyScriptURL2', { createScriptURL: s => null }, "", t);
createScriptURLTest('TestPolicyScriptURL2', { createScriptURL: s => null }, "null", t);
}, "script_url = null");
var scriptURLstr = '#duck';
@ -240,7 +240,7 @@
}, "url = identity function");
test(t => {
createURLTest('TestPolicyURL2', { createURL: s => null }, "", t);
createURLTest('TestPolicyURL2', { createURL: s => null }, "null", t);
}, "url = null");
var URLstr = '#x';

View file

@ -66,20 +66,14 @@
URLTestCases.forEach(c => {
test(t => {
assert_element_accepts_trusted_type(c[0], c[1], INPUTS.URL, RESULTS.URL);
// Properties that actually parse the URLs will resort to the base URL
// when given a null or empty URL.
assert_element_accepts_trusted_type(c[0], c[1], null, "" + window.location);
assert_element_accepts_trusted_type(c[0], c[1], null, window.location.toString().replace(/[^\/]*$/, "null"));
}, c[0] + "." + c[1] + " accepts string and null after default policy was created.");
});
scriptURLTestCases.forEach(c => {
test(t => {
assert_element_accepts_trusted_type(c[0], c[1], INPUTS.SCRIPTURL, RESULTS.SCRIPTURL);
// Properties that actually parse the URLs will resort to the base URL
// when given a null or empty URL.
assert_element_accepts_trusted_type(c[0], c[1], null, "" + window.location);
assert_element_accepts_trusted_type(c[0], c[1], null, window.location.toString().replace(/[^\/]*$/, "null"));
}, c[0] + "." + c[1] + " accepts string and null after default policy was created.");
});

View file

@ -71,14 +71,14 @@
URLTestCases.forEach(c => {
test(t => {
assert_element_accepts_trusted_type(c[0], c[1], INPUTS.URL, RESULTS.URL);
assert_element_accepts_trusted_type(c[0], c[1], null, "" + window.location);
assert_element_accepts_trusted_type(c[0], c[1], null, window.location.toString().replace(/[^\/]*$/, "null"));
}, c[0] + "." + c[1] + " accepts string and null after default policy was created");
});
scriptURLTestCases.forEach(c => {
test(t => {
assert_element_accepts_trusted_type(c[0], c[1], INPUTS.SCRIPTURL, RESULTS.SCRIPTURL);
assert_element_accepts_trusted_type(c[0], c[1], null, "" + window.location);
assert_element_accepts_trusted_type(c[0], c[1], null, window.location.toString().replace(/[^\/]*$/, "null"));
}, c[0] + "." + c[1] + " accepts string and null after default policy was created");
});

View file

@ -96,10 +96,9 @@
await pc.setLocalDescription(offer);
assert_state('have-local-offer');
await pc2.setRemoteDescription(offer);
await pc2.setLocalDescription(await pc2.createAnswer());
await pc.setRemoteDescription(pc2.localDescription);
await exchangeAnswer(pc, pc2);
assert_state('stable');
await pc.setRemoteDescription(await pc2.createOffer());
await exchangeOffer(pc2, pc);
assert_state('have-remote-offer');
}, 'Negotiation should fire signalingsstate events');
@ -112,9 +111,11 @@
t.add_cleanup(() => pc2.close());
const offer1 = await generateAudioReceiveOnlyOffer(pc2);
await pc2.setLocalDescription(offer1);
await pc.setRemoteDescription(offer1);
await pc.setLocalDescription(await pc.createAnswer());
await exchangeAnswer(pc2, pc);
const offer2 = await generateVideoReceiveOnlyOffer(pc2);
await pc2.setLocalDescription(offer2);
await pc.setRemoteDescription(offer2);
assert_session_desc_not_similar(offer1, offer2);
assert_session_desc_similar(pc.remoteDescription, offer2);
@ -134,7 +135,7 @@
const answer = await pc2.createAnswer();
await pc2.setLocalDescription(answer);
await pc.setRemoteDescription(answer);
await pc.setRemoteDescription(await pc2.createOffer());
await exchangeOffer(pc2, pc);
assert_equals(pc.remoteDescription.sdp, pc.pendingRemoteDescription.sdp);
assert_session_desc_similar(pc.remoteDescription, offer);
assert_session_desc_similar(pc.currentRemoteDescription, answer);