OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | |
6 | |
7 #include "base/memory/scoped_vector.h" | 5 #include "base/memory/scoped_vector.h" |
8 #include "cc/test/geometry_test_utils.h" | 6 #include "cc/test/geometry_test_utils.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati
ons.h" | 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati
ons.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" |
12 | 10 |
13 using namespace WebKit; | 11 using namespace WebKit; |
14 | 12 |
15 TEST(WebTransformOperationTest, transformTypesAreUnique) | 13 TEST(WebTransformOperationTest, transformTypesAreUnique) |
16 { | 14 { |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 operations.appendPerspective(1000); | 601 operations.appendPerspective(1000); |
604 | 602 |
605 double progress = 0.5; | 603 double progress = 0.5; |
606 | 604 |
607 WebTransformationMatrix expected; | 605 WebTransformationMatrix expected; |
608 expected.applyPerspective(500 + 0.5 * std::numeric_limits<double>::max()
); | 606 expected.applyPerspective(500 + 0.5 * std::numeric_limits<double>::max()
); |
609 | 607 |
610 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, identityOperations[i]->blend(o
perations, progress)); | 608 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, identityOperations[i]->blend(o
perations, progress)); |
611 } | 609 } |
612 } | 610 } |
613 | |
OLD | NEW |