Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/cssRotation.html

Issue 2938353002: [CSS Typed OM] Add missing error handling for CSSRotation constructor (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html b/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
index d4e14ed90e8cffee8e54bf15f3c436632757a8d0..d3502f62eee7a652c52e1757c23ff3243018f9c7 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssRotation.html
@@ -100,6 +100,22 @@ var testParams = [
}
];
+test(() => {
+ assert_throws(new TypeError(), () => { new CSSRotation(); });
+ assert_throws(new TypeError(), () => { new CSSRotation(null); });
+ // Wrong number of arguments.
+ assert_throws(new TypeError(), () => {
+ new CSSRotation(1, 2, new CSSUnitValue(10, 'deg'));
+ });
+ // Length instead of angle.
+ assert_throws(new TypeError(), () => {
+ new CSSRotation(new CSSUnitValue(10, 'px'));
+ });
+ assert_throws(new TypeError(), () => {
+ new CSSRotation(1, 2, 3, new CSSUnitValue(10, 'px'));
+ });
+}, "Invalid arguments to constructor should throw");
+
for (let params of testParams) {
test(() => {
assert_equals(params.input.angle.value, params.angle);

Powered by Google App Engine
This is Rietveld 408576698