| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "mojo/public/cpp/bindings/binding_set.h" | 6 #include "mojo/public/cpp/bindings/binding_set.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/gfx/mojo/traits_test_service.mojom.h" | 8 #include "ui/gfx/mojo/traits_test_service.mojom.h" |
| 9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 // TraitsTestService: | 25 // TraitsTestService: |
| 26 void EchoTransform(const Transform& t, | 26 void EchoTransform(const Transform& t, |
| 27 const EchoTransformCallback& callback) override { | 27 const EchoTransformCallback& callback) override { |
| 28 callback.Run(t); | 28 callback.Run(t); |
| 29 } | 29 } |
| 30 | 30 |
| 31 base::MessageLoop loop_; | 31 base::MessageLoop loop_; |
| 32 mojo::BindingSet<TraitsTestService> traits_test_bindings_; | 32 mojo::BindingSet<TraitsTestService> traits_test_bindings_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(StructTraitsTest); |
| 33 }; | 35 }; |
| 34 | 36 |
| 35 } // namespace | 37 } // namespace |
| 36 | 38 |
| 37 TEST_F(StructTraitsTest, Transform) { | 39 TEST_F(StructTraitsTest, Transform) { |
| 38 const float col1row1 = 1.f; | 40 const float col1row1 = 1.f; |
| 39 const float col2row1 = 2.f; | 41 const float col2row1 = 2.f; |
| 40 const float col3row1 = 3.f; | 42 const float col3row1 = 3.f; |
| 41 const float col4row1 = 4.f; | 43 const float col4row1 = 4.f; |
| 42 const float col1row2 = 5.f; | 44 const float col1row2 = 5.f; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 70 EXPECT_EQ(col2row3, output.matrix().get(2, 1)); | 72 EXPECT_EQ(col2row3, output.matrix().get(2, 1)); |
| 71 EXPECT_EQ(col3row3, output.matrix().get(2, 2)); | 73 EXPECT_EQ(col3row3, output.matrix().get(2, 2)); |
| 72 EXPECT_EQ(col4row3, output.matrix().get(2, 3)); | 74 EXPECT_EQ(col4row3, output.matrix().get(2, 3)); |
| 73 EXPECT_EQ(col1row4, output.matrix().get(3, 0)); | 75 EXPECT_EQ(col1row4, output.matrix().get(3, 0)); |
| 74 EXPECT_EQ(col2row4, output.matrix().get(3, 1)); | 76 EXPECT_EQ(col2row4, output.matrix().get(3, 1)); |
| 75 EXPECT_EQ(col3row4, output.matrix().get(3, 2)); | 77 EXPECT_EQ(col3row4, output.matrix().get(3, 2)); |
| 76 EXPECT_EQ(col4row4, output.matrix().get(3, 3)); | 78 EXPECT_EQ(col4row4, output.matrix().get(3, 3)); |
| 77 } | 79 } |
| 78 | 80 |
| 79 } // namespace gfx | 81 } // namespace gfx |
| OLD | NEW |