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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/resources/parsing-testcommon.js

Issue 2882153004: CSS Transforms 2: Web Platform Tests for translate,rotate,scale parsing (Closed)
Patch Set: parsing subdirectory Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/rotate-parsing-invalid.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/resources/parsing-testcommon.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/resources/parsing-testcommon.js b/third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/resources/parsing-testcommon.js
new file mode 100644
index 0000000000000000000000000000000000000000..688356bd0f9d71f148e3994d2e33cb453905401a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/resources/parsing-testcommon.js
@@ -0,0 +1,33 @@
+'use strict';
+
+function test_valid_value(property, value, serializedValue) {
+ if (arguments.length < 3)
suzyh_UTC10 (ex-contributor) 2017/05/22 23:28:18 Are there any cases for css-transforms-2 where the
+ serializedValue = value;
+
+ var stringifiedValue = JSON.stringify(value);
+
+ test(function(){
+ var div = document.createElement('div');
+ div.style[property] = value;
+ assert_not_equals(div.style[property], "");
+ }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
+
+ test(function(){
+ var div = document.createElement('div');
+ div.style[property] = value;
+ var readValue = div.style[property];
+ assert_equals(readValue, serializedValue);
+ div.style[property] = readValue;
+ assert_equals(div.style[property], readValue);
+ }, "Serialization should round-trip after setting e.style['" + property + "'] = " + stringifiedValue);
+}
+
+function test_invalid_value(property, value) {
+ var stringifiedValue = JSON.stringify(value);
+
+ test(function(){
+ var div = document.createElement('div');
+ div.style[property] = value;
+ assert_equals(div.style[property], "");
+ }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
+}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-transforms-2/parsing/rotate-parsing-invalid.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698