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

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/resources/generate-paint-style-logging.js

Issue 2097093002: [Typed OM] Rename cssString methods to cssText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-transformvalue
Patch Set: Update usage in csspaint logging for tests Created 4 years, 5 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
1 // Generates code for a CSS paint API function which logs the given properties 1 // Generates code for a CSS paint API function which logs the given properties
2 // to the console. 2 // to the console.
3 // 3 //
4 // Usage: 4 // Usage:
5 // generatePaintStyleLogging([ 5 // generatePaintStyleLogging([
6 // '--foo', 6 // '--foo',
7 // 'line-height', 7 // 'line-height',
8 // ]); 8 // ]);
9 9
10 function generatePaintStyleLogging(properties) { 10 function generatePaintStyleLogging(properties) {
11 const json = JSON.stringify(properties); 11 const json = JSON.stringify(properties);
12 return ` 12 return `
13 registerPaint('test', class { 13 registerPaint('test', class {
14 static get inputProperties() { return ${json}; } 14 static get inputProperties() { return ${json}; }
15 paint(ctx, geom, styleMap) { 15 paint(ctx, geom, styleMap) {
16 const properties = styleMap.getProperties().sort(); 16 const properties = styleMap.getProperties().sort();
17 for (let i = 0; i < properties.length; i++) { 17 for (let i = 0; i < properties.length; i++) {
18 const value = styleMap.get(properties[i]); 18 const value = styleMap.get(properties[i]);
19 console.log(properties[i] + ': ' + (value ? value.cssString : '[null]')); 19 console.log(properties[i] + ': ' + (value ? value.cssText: ' [null]'));
20 } 20 }
21 } 21 }
22 }); 22 });
23 `; 23 `;
24 } 24 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698