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

Unified Diff: Source/platform/transforms/TransformationMatrixTest.cpp

Issue 352793004: Fix use-of-uninitialized-value in TransformationMatrix::blend() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/platform/transforms/TransformationMatrix.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/transforms/TransformationMatrixTest.cpp
diff --git a/Source/platform/transforms/TransformationMatrixTest.cpp b/Source/platform/transforms/TransformationMatrixTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..64c533ce1c05399a263a8407a9ef15f2757df37f
--- /dev/null
+++ b/Source/platform/transforms/TransformationMatrixTest.cpp
@@ -0,0 +1,28 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "platform/transforms/TransformationMatrix.h"
+
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+namespace {
+
+TEST(TransformationMatrixTest, NonInvertableBlendTest)
+{
+ TransformationMatrix from;
+ TransformationMatrix to(2.7133590938, 0.0, 0.0, 0.0, 0.0, 2.4645137761, 0.0, 0.0, 0.0, 0.0, 0.00, 0.01, 0.02, 0.03, 0.04, 0.05);
+ TransformationMatrix result;
+
+ result = to;
+ result.blend(from, 0.25);
+ EXPECT_TRUE(result == from);
+
+ result = to;
+ result.blend(from, 0.75);
+ EXPECT_TRUE(result == to);
+}
+
+} // namespace
« no previous file with comments | « Source/platform/transforms/TransformationMatrix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698