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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/motion-1/parsing/resources/parsing-testcommon.js

Issue 2886703002: CSS Motion Path: Web Platform tests for longhand parsing (Closed)
Patch Set: serializedValue 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 unified diff | Download patch
OLDNEW
(Empty)
1 'use strict';
2
3 function assert_valid_value(property, value, serializedValue) {
4 if (arguments.length < 3)
5 serializedValue = value;
6
7 var stringifiedValue = JSON.stringify(value);
8
9 test(function(){
10 var div = document.createElement('div');
11 div.style[property] = value;
12 assert_not_equals(div.style[property], "");
13 }, "e.style['" + property + "'] = " + stringifiedValue + " should set the va lue");
suzyh_UTC10 (ex-contributor) 2017/05/25 01:55:38 I believe you modified this description in the ver
Eric Willigers 2017/05/25 11:43:12 Done.
14
15 test(function(){
16 var div = document.createElement('div');
17 div.style[property] = value;
18 var readValue = div.style[property];
19 assert_equals(readValue, serializedValue);
20 div.style[property] = readValue;
21 assert_equals(div.style[property], readValue);
22 }, "Serialization should round-trip after setting e.style['" + property + "' ] = " + stringifiedValue);
23 }
24
25 function assert_invalid_value(property, value) {
26 var stringifiedValue = JSON.stringify(value);
27
28 test(function(){
29 var div = document.createElement('div');
30 div.style[property] = value;
31 assert_equals(div.style[property], "");
32 }, "e.style['" + property + "'] = " + stringifiedValue + " should not set th e value");
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698