mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision 2abaf21d855986de7baa55ad52a601c489ff22fd
This commit is contained in:
parent
e09e683718
commit
05d9213a6e
33 changed files with 531 additions and 95 deletions
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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');
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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="?",
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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.");
|
||||
});
|
||||
|
||||
|
|
|
@ -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");
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue