mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb
This commit is contained in:
parent
fcd6beb608
commit
cb63cfd5c7
185 changed files with 3083 additions and 1074 deletions
|
@ -6,13 +6,16 @@
|
|||
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: false",
|
||||
canvasContextAttributes: {desynchronized: false},
|
||||
expectedContextAttributes: {desynchronized : false}},
|
||||
];
|
||||
|
||||
function runTestScenario(testScenario) {
|
||||
|
@ -20,8 +23,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue