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

Side by Side Diff: webkit/compositor_bindings/web_transform_operations_unittest.cc

Issue 11876016: Define cc::TransformOperations and webkit::WebTransformOperationsImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Put TransformOperation into its own header Created 7 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 unified diff | Download patch
« no previous file with comments | « webkit/compositor_bindings/web_transform_operations_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/scoped_vector.h" 5 #include "base/memory/scoped_vector.h"
6 #include "cc/test/geometry_test_utils.h" 6 #include "cc/test/geometry_test_utils.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati ons.h" 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati ons.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa trix.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa trix.h"
10 10
11 using namespace WebKit; 11 using namespace WebKit;
12 12
13 #ifndef WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
14
13 TEST(WebTransformOperationTest, transformTypesAreUnique) 15 TEST(WebTransformOperationTest, transformTypesAreUnique)
14 { 16 {
15 ScopedVector<WebTransformOperations> transforms; 17 ScopedVector<WebTransformOperations> transforms;
16 18
17 WebTransformOperations* toAdd = new WebTransformOperations(); 19 WebTransformOperations* toAdd = new WebTransformOperations();
18 toAdd->appendTranslate(1, 0, 0); 20 toAdd->appendTranslate(1, 0, 0);
19 transforms.push_back(toAdd); 21 transforms.push_back(toAdd);
20 22
21 toAdd = new WebTransformOperations(); 23 toAdd = new WebTransformOperations();
22 toAdd->appendRotate(0, 0, 1, 2); 24 toAdd->appendRotate(0, 0, 1, 2);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 operations.appendPerspective(1000); 603 operations.appendPerspective(1000);
602 604
603 double progress = 0.5; 605 double progress = 0.5;
604 606
605 WebTransformationMatrix expected; 607 WebTransformationMatrix expected;
606 expected.applyPerspective(500 + 0.5 * std::numeric_limits<double>::max() ); 608 expected.applyPerspective(500 + 0.5 * std::numeric_limits<double>::max() );
607 609
608 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, identityOperations[i]->blend(o perations, progress)); 610 EXPECT_TRANSFORMATION_MATRIX_EQ(expected, identityOperations[i]->blend(o perations, progress));
609 } 611 }
610 } 612 }
613
614 #endif
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_transform_operations_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698