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

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

Issue 2868003002: CSSPaint: Move layout tests in csspaint/ to http/tests/csspaint/ (Closed)
Patch Set: rebase 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
Index: third_party/WebKit/LayoutTests/csspaint/resources/generate-paint-style-logging.js
diff --git a/third_party/WebKit/LayoutTests/csspaint/resources/generate-paint-style-logging.js b/third_party/WebKit/LayoutTests/csspaint/resources/generate-paint-style-logging.js
deleted file mode 100644
index 7f114ba57dded07a6a77ba40e524be8d96ce54f1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/csspaint/resources/generate-paint-style-logging.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// Generates code for a CSS paint API function which logs the given properties
-// to the console.
-//
-// Usage:
-// generatePaintStyleLogging([
-// '--foo',
-// 'line-height',
-// ]);
-
-function generatePaintStyleLogging(properties) {
- const json = JSON.stringify(properties);
- return `
- registerPaint('test', class {
- static get inputProperties() { return ${json}; }
- paint(ctx, geom, styleMap) {
- const properties = styleMap.getProperties().sort();
- for (let i = 0; i < properties.length; i++) {
- const value = styleMap.get(properties[i]);
- let serialized;
- if (value) {
- serialized = '[' + value.constructor.name + '=' + value.cssText + ']';
- } else {
- serialized = '[null]';
- }
- console.log(properties[i] + ': ' + serialized);
- }
- }
- });
- `;
-}

Powered by Google App Engine
This is Rietveld 408576698