OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 901 |
902 // So should setting the opacity back. | 902 // So should setting the opacity back. |
903 observer.Reset(); | 903 observer.Reset(); |
904 l2->SetOpacity(1.0f); | 904 l2->SetOpacity(1.0f); |
905 RunPendingMessages(); | 905 RunPendingMessages(); |
906 EXPECT_TRUE(observer.notified()); | 906 EXPECT_TRUE(observer.notified()); |
907 | 907 |
908 // Setting the transform of a layer should alert the observers. | 908 // Setting the transform of a layer should alert the observers. |
909 observer.Reset(); | 909 observer.Reset(); |
910 gfx::Transform transform; | 910 gfx::Transform transform; |
911 transform.ConcatTranslate(-200, -200); | 911 transform.Translate(200.0, 200.0); |
912 transform.ConcatRotate(90.0f); | 912 transform.Rotate(90.0); |
913 transform.ConcatTranslate(200, 200); | 913 transform.Translate(-200.0, -200.0); |
914 l2->SetTransform(transform); | 914 l2->SetTransform(transform); |
915 RunPendingMessages(); | 915 RunPendingMessages(); |
916 EXPECT_TRUE(observer.notified()); | 916 EXPECT_TRUE(observer.notified()); |
917 | 917 |
918 // A change resulting in an aborted swap buffer should alert the observer | 918 // A change resulting in an aborted swap buffer should alert the observer |
919 // and also signal an abort. | 919 // and also signal an abort. |
920 observer.Reset(); | 920 observer.Reset(); |
921 l2->SetOpacity(0.1f); | 921 l2->SetOpacity(0.1f); |
922 GetCompositor()->OnSwapBuffersAborted(); | 922 GetCompositor()->OnSwapBuffersAborted(); |
923 RunPendingMessages(); | 923 RunPendingMessages(); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 | 1297 |
1298 // Resize layer. | 1298 // Resize layer. |
1299 child->SetBounds(gfx::Rect(200, 200, 400, 400)); | 1299 child->SetBounds(gfx::Rect(200, 200, 400, 400)); |
1300 child->SetVisible(true); | 1300 child->SetVisible(true); |
1301 EXPECT_TRUE(schedule_draw_invoked_); | 1301 EXPECT_TRUE(schedule_draw_invoked_); |
1302 DrawTree(root.get()); | 1302 DrawTree(root.get()); |
1303 EXPECT_TRUE(delegate.painted()); | 1303 EXPECT_TRUE(delegate.painted()); |
1304 } | 1304 } |
1305 | 1305 |
1306 } // namespace ui | 1306 } // namespace ui |
OLD | NEW |