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

Unified Diff: third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: Update expectations. Created 3 years, 8 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/animations/resources/composited-animation-test.js
diff --git a/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js b/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
index c542583f92558c3a7986a8a1d6782222ff95879b..1070bb7219716a2c53b43061649ee86a15fb129c 100644
--- a/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
+++ b/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
@@ -5,6 +5,7 @@ class CompositedAnimationTestCommon {
this.composited = composited;
this.tests = [];
this.nextInstanceId = 1;
+ this.errorCount = 0;
this.createStyles();
this.createStaticElements();
@@ -33,9 +34,10 @@ class CompositedAnimationTestCommon {
createStaticElements() {
this.error = document.createElement('span');
- this.error.style.color = 'red';
- // The element must have some painted content in order to be composited.
- this.error.textContent = 'x';
+ this.error.style = 'color: red; font-family: monospace; font-size: 12px';
+ // The error element must have some painted content in order to be
+ // composited when animated in SPv2.
+ this.error.innerText = '(no errors)';
document.body.appendChild(this.error);
this.wrapper = document.createElement('div');
@@ -129,16 +131,19 @@ class CompositedAnimationTestCommon {
test.instances.forEach(instance => {
var composited = internals.isCompositedAnimation(instance.animation);
if (composited != this.composited)
- this.reportError(test, `Animation ${composited ? 'is' : 'is not'} running on the compositor.`);
+ this.reportError(test, `Animation ${composited ? 'is' : 'is not'} running on the compositor [id=${instance.id}].`);
});
});
}
reportError(test, message) {
- if (!this.error.textContent)
- this.error.textContent = `${this.composited ? 'Tests:' : 'TestExpectations:'} `;
+ if (this.errorCount == 0)
+ this.error.innerHTML = `${this.composited ? 'Tests:' : 'TestExpectations:'}<br>`;
- this.error.textContent += `${test.name}: ${message} `;
+ if (this.errorCount > 0)
+ this.error.innerHTML += '<br>';
+ this.error.innerHTML += `${test.name}: ${message} `;
+ this.errorCount++;
}
waitForCompositor() {

Powered by Google App Engine
This is Rietveld 408576698