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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/color-profile-animate-rotate.html

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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/fast/images/color-profile-animate-rotate.html
diff --git a/third_party/WebKit/LayoutTests/fast/images/color-profile-animate-rotate.html b/third_party/WebKit/LayoutTests/fast/images/color-profile-animate-rotate.html
new file mode 100644
index 0000000000000000000000000000000000000000..eb960b98e178da39a010d6cc34080e5ff28fc3cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/images/color-profile-animate-rotate.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<style>
+ @-webkit-keyframes rotate {
+ 0% { -webkit-transform: rotate(0deg) }
+ }
+
+ img {
+ -webkit-transform: rotate(90deg);
+ }
+</style>
+
+<!-- The blue sector of the image should be at 3 o'clock (viz., rotated by 90 deg). -->
+<img onload="rotate(this)" width="400px" src="resources/red-at-12-oclock-with-color-profile.jpg">
+
+<script>
+function rotate(element) {
+ if (window.testRunner)
+ setTimeout(function() { testRunner.setColorProfile('sRGB', new Function()) }, 0);
+
+ element.addEventListener('webkitAnimationStart', start, false);
+ element.addEventListener('webkitAnimationEnd', end, false);
+
+ if (window.testRunner)
+ element.style.cssText += '-webkit-animation: rotate linear 1s';
+ else
+ element.style.cssText += '-webkit-animation: rotate linear 4s';
+}
+
+function start(event) {
+ if (window.testRunner)
+ setTimeout(function() { testRunner.setColorProfile('whacked', new Function()) }, 100);
+}
+
+function end(event) {
+ if (window.testRunner)
+ setTimeout(function() { testRunner.notifyDone() }, 0);
+}
+
+if (window.internals)
+ internals.settings.setImageColorProfilesEnabled(true);
+
+if (window.testRunner) {
+ testRunner.dumpAsTextWithPixelResults();
+ testRunner.waitUntilDone();
+}
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698