Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: cc/quads/list_container_unittest.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/resources/picture_layer_tiling_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/quads/list_container.h" 5 #include "cc/quads/list_container.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/quads/largest_draw_quad.h" 9 #include "cc/quads/largest_draw_quad.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 class SimpleDrawQuadConstructMagicNumberTwo : public SimpleDrawQuad { 50 class SimpleDrawQuadConstructMagicNumberTwo : public SimpleDrawQuad {
51 public: 51 public:
52 SimpleDrawQuadConstructMagicNumberTwo() : SimpleDrawQuad() { 52 SimpleDrawQuadConstructMagicNumberTwo() : SimpleDrawQuad() {
53 set_value(kMagicNumberToUseForDrawQuadTwo); 53 set_value(kMagicNumberToUseForDrawQuadTwo);
54 } 54 }
55 }; 55 };
56 56
57 class MockDrawQuad : public DrawQuad { 57 class MockDrawQuad : public DrawQuad {
58 public: 58 public:
59 virtual ~MockDrawQuad() { Destruct(); } 59 ~MockDrawQuad() override { Destruct(); }
60 virtual void IterateResources( 60 void IterateResources(const ResourceIteratorCallback& callback) override {}
61 const ResourceIteratorCallback& callback) override {} 61 void ExtendValue(base::debug::TracedValue* value) const override {}
62 virtual void ExtendValue(base::debug::TracedValue* value) const override {}
63 MOCK_METHOD0(Destruct, void()); 62 MOCK_METHOD0(Destruct, void());
64 }; 63 };
65 64
66 TEST(ListContainerTest, ConstructorCalledInAllocateAndConstruct) { 65 TEST(ListContainerTest, ConstructorCalledInAllocateAndConstruct) {
67 ListContainer<DrawQuad> list(LargestDrawQuadSize()); 66 ListContainer<DrawQuad> list(LargestDrawQuadSize());
68 67
69 size_t size = 2; 68 size_t size = 2;
70 SimpleDrawQuadConstructMagicNumberOne* dq_1 = 69 SimpleDrawQuadConstructMagicNumberOne* dq_1 =
71 list.AllocateAndConstruct<SimpleDrawQuadConstructMagicNumberOne>(); 70 list.AllocateAndConstruct<SimpleDrawQuadConstructMagicNumberOne>();
72 SimpleDrawQuadConstructMagicNumberTwo* dq_2 = 71 SimpleDrawQuadConstructMagicNumberTwo* dq_2 =
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 for (ListContainer<SharedQuadState>::ReverseIterator iter = list.rbegin(); 545 for (ListContainer<SharedQuadState>::ReverseIterator iter = list.rbegin();
547 iter != list.rend(); 546 iter != list.rend();
548 ++iter) { 547 ++iter) {
549 EXPECT_EQ(i, iter.index()); 548 EXPECT_EQ(i, iter.index());
550 ++i; 549 ++i;
551 } 550 }
552 } 551 }
553 552
554 } // namespace 553 } // namespace
555 } // namespace cc 554 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | cc/resources/picture_layer_tiling_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698