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