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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 EXPECT_TRUE(observer.notified()); | 903 EXPECT_TRUE(observer.notified()); |
904 | 904 |
905 // So should setting the opacity back. | 905 // So should setting the opacity back. |
906 observer.Reset(); | 906 observer.Reset(); |
907 l2->SetOpacity(1.0f); | 907 l2->SetOpacity(1.0f); |
908 RunPendingMessages(); | 908 RunPendingMessages(); |
909 EXPECT_TRUE(observer.notified()); | 909 EXPECT_TRUE(observer.notified()); |
910 | 910 |
911 // Setting the transform of a layer should alert the observers. | 911 // Setting the transform of a layer should alert the observers. |
912 observer.Reset(); | 912 observer.Reset(); |
913 Transform transform; | 913 gfx::Transform transform; |
914 transform.ConcatTranslate(-200, -200); | 914 transform.ConcatTranslate(-200, -200); |
915 transform.ConcatRotate(90.0f); | 915 transform.ConcatRotate(90.0f); |
916 transform.ConcatTranslate(200, 200); | 916 transform.ConcatTranslate(200, 200); |
917 l2->SetTransform(transform); | 917 l2->SetTransform(transform); |
918 RunPendingMessages(); | 918 RunPendingMessages(); |
919 EXPECT_TRUE(observer.notified()); | 919 EXPECT_TRUE(observer.notified()); |
920 | 920 |
921 // A change resulting in an aborted swap buffer should alert the observer | 921 // A change resulting in an aborted swap buffer should alert the observer |
922 // and also signal an abort. | 922 // and also signal an abort. |
923 observer.Reset(); | 923 observer.Reset(); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 | 1300 |
1301 // Resize layer. | 1301 // Resize layer. |
1302 child->SetBounds(gfx::Rect(200, 200, 400, 400)); | 1302 child->SetBounds(gfx::Rect(200, 200, 400, 400)); |
1303 child->SetVisible(true); | 1303 child->SetVisible(true); |
1304 EXPECT_TRUE(schedule_draw_invoked_); | 1304 EXPECT_TRUE(schedule_draw_invoked_); |
1305 DrawTree(root.get()); | 1305 DrawTree(root.get()); |
1306 EXPECT_TRUE(delegate.painted()); | 1306 EXPECT_TRUE(delegate.painted()); |
1307 } | 1307 } |
1308 | 1308 |
1309 } // namespace ui | 1309 } // namespace ui |
OLD | NEW |