Bug 1538129 [wpt PR 15982] - WIP Canvas 2D/WebGL context: s/lowLatency/desynchronized/, a=testonly

Automatic update from web-platform-tests
WIP Canvas 2D/WebGL context: s/lowLatency/desynchronized/

This CL renames s/lowLatency/desynchronized/ on web-exposed parts
(s/low_latency/desynchronized/ internally) following [1,2] PRs
(issue [3]), and extends wpt getContextAttributes.html.

[1] https://github.com/whatwg/html/pull/4360
[2] https://github.com/KhronosGroup/WebGL/pull/2753
[3] https://github.com/whatwg/html/issues/4087

Bug: 944199
Change-Id: Ic9d7bd6165f9dc9536613dc63e77b86b8ec42f7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1532920
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643323}

--

wpt-commits: 02e61522099b874a0075d058f89b9f549563c6dc
wpt-pr: 15982
This commit is contained in:
Miguel Casas 2019-04-18 10:13:23 +00:00 коммит произвёл James Graham
Родитель ed26630d6a
Коммит 942fc103ac
1 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

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