Skip to content

Commit

Permalink
Remove some useless test-level properties
Browse files Browse the repository at this point in the history
Remove useless test-level properties, including:

* Incorrect type of the properties parameter for `promise_test()`
* `flags` property passed to `test()`, which is unused in testharness.js
* Incorrect type of the properties `generate_tests`: moved to comments
* `help` property: moved the head of the test files
* Default empty properties dictionary

Related: #14394
  • Loading branch information
qiuzhong authored Aug 28, 2020
1 parent bc2b0f3 commit a04e29b
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 283 deletions.
4 changes: 2 additions & 2 deletions css/css-shapes/shape-outside/values/shape-margin-000.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
}
];
generate_tests( ParsingUtils.testShapeMarginInlineStyle,
ParsingUtils.buildTestCases(shape_margin_valid_tests, "inline"), false);
ParsingUtils.buildTestCases(shape_margin_valid_tests, "inline"));
generate_tests( ParsingUtils.testShapeMarginComputedStyle,
ParsingUtils.buildTestCases(shape_margin_valid_tests, "computed"), false);
ParsingUtils.buildTestCases(shape_margin_valid_tests, "computed"));
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions css/css-shapes/shape-outside/values/shape-margin-001.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
});

generate_tests( ParsingUtils.testShapeMarginInlineStyle,
ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "inline"), true);
ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "inline"));
ParsingUtils.setupFonts();
document.fonts.ready.then(()=> {
generate_tests( ParsingUtils.testShapeMarginComputedStyle,
ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "computed"), true);
ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "computed"));
ParsingUtils.restoreFonts();
done();
});
Expand Down
4 changes: 2 additions & 2 deletions css/css-shapes/shape-outside/values/shape-margin-002.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
},
];
generate_tests( ParsingUtils.testShapeMarginInlineStyle,
ParsingUtils.buildTestCases(shape_margin_valid_tests, "inline"), true);
ParsingUtils.buildTestCases(shape_margin_valid_tests, "inline"));
generate_tests( ParsingUtils.testShapeMarginComputedStyle,
ParsingUtils.buildTestCases(shape_margin_valid_tests, "computed"), true);
ParsingUtils.buildTestCases(shape_margin_valid_tests, "computed"));
</script>
</body>
</html>
6 changes: 1 addition & 5 deletions css/css-transitions/transition-delay-001.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@
});
var result = computedStyle(transition, 'transition-delay');
assert_equals(result, values[key], "Expected computed value");
}, "parse '" + key + "'",
{
// mark tests that fail as such
flags: invalidTests[key] ? "invalid" : ""
});
}, "parse '" + key + "'");
}
}
</script>
Expand Down
6 changes: 1 addition & 5 deletions css/css-transitions/transition-duration-001.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@
});
var result = computedStyle(transition, 'transition-duration');
assert_equals(result, values[key], "Expected computed value");
}, "parse '" + key + "'",
{
// mark tests that fail as such
flags: invalidTests[key] ? "invalid" : ""
});
}, "parse '" + key + "'");
}
}
</script>
Expand Down
Loading

0 comments on commit a04e29b

Please sign in to comment.