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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 622 |
623 v1->Reset(); | 623 v1->Reset(); |
624 v2->Reset(); | 624 v2->Reset(); |
625 v3->Reset(); | 625 v3->Reset(); |
626 v4->Reset(); | 626 v4->Reset(); |
627 v3->SchedulePaintInRect(gfx::Rect(10, 10, 10, 10)); | 627 v3->SchedulePaintInRect(gfx::Rect(10, 10, 10, 10)); |
628 PaintRootView(root, empty_paint); | 628 PaintRootView(root, empty_paint); |
629 | 629 |
630 SkRect tmp_rect; | 630 SkRect tmp_rect; |
631 | 631 |
632 tmp_rect.set(SkIntToScalar(10), | 632 tmp_rect.iset(10, 10, 20, 20); |
633 SkIntToScalar(10), | |
634 SkIntToScalar(20), | |
635 SkIntToScalar(20)); | |
636 CheckRect(v3->last_clip_, tmp_rect); | 633 CheckRect(v3->last_clip_, tmp_rect); |
637 | 634 |
638 tmp_rect.set(SkIntToScalar(20), | 635 tmp_rect.iset(20, 20, 30, 30); |
639 SkIntToScalar(20), | |
640 SkIntToScalar(30), | |
641 SkIntToScalar(30)); | |
642 CheckRect(v2->last_clip_, tmp_rect); | 636 CheckRect(v2->last_clip_, tmp_rect); |
643 | 637 |
644 tmp_rect.set(SkIntToScalar(30), | 638 tmp_rect.iset(30, 30, 40, 40); |
645 SkIntToScalar(30), | |
646 SkIntToScalar(40), | |
647 SkIntToScalar(40)); | |
648 CheckRect(v1->last_clip_, tmp_rect); | 639 CheckRect(v1->last_clip_, tmp_rect); |
649 | 640 |
650 // Make sure v4 was not painted | 641 // Make sure v4 was not painted |
651 tmp_rect.setEmpty(); | 642 tmp_rect.setEmpty(); |
652 CheckRect(v4->last_clip_, tmp_rect); | 643 CheckRect(v4->last_clip_, tmp_rect); |
653 | 644 |
654 window.DestroyWindow(); | 645 window.DestroyWindow(); |
655 } | 646 } |
656 */ | 647 */ |
657 | 648 |
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2969 | 2960 |
2970 // Move c1 to the front. The layers should have moved too. | 2961 // Move c1 to the front. The layers should have moved too. |
2971 content->ReorderChildView(c1, -1); | 2962 content->ReorderChildView(c1, -1); |
2972 EXPECT_EQ(c1->layer(), parent_layer->children()[1]); | 2963 EXPECT_EQ(c1->layer(), parent_layer->children()[1]); |
2973 EXPECT_EQ(c2->layer(), parent_layer->children()[0]); | 2964 EXPECT_EQ(c2->layer(), parent_layer->children()[0]); |
2974 } | 2965 } |
2975 | 2966 |
2976 #endif // USE_AURA | 2967 #endif // USE_AURA |
2977 | 2968 |
2978 } // namespace views | 2969 } // namespace views |
OLD | NEW |