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

Side by Side Diff: ppapi/tests/test_paint_aggregator.cc

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_paint_aggregator.h ('k') | ppapi/tests/test_post_message.h » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/tests/test_paint_aggregator.h" 5 #include "ppapi/tests/test_paint_aggregator.h"
6 6
7 #include "ppapi/cpp/paint_aggregator.h" 7 #include "ppapi/cpp/paint_aggregator.h"
8 #include "ppapi/tests/testing_instance.h" 8 #include "ppapi/tests/testing_instance.h"
9 9
10 REGISTER_TEST_CASE(PaintAggregator); 10 REGISTER_TEST_CASE(PaintAggregator);
11 11
12 bool TestPaintAggregator::Init() { 12 bool TestPaintAggregator::Init() {
13 return true; 13 return true;
14 } 14 }
15 15
16 void TestPaintAggregator::RunTest() { 16 void TestPaintAggregator::RunTests(const std::string& filter) {
17 RUN_TEST(InitialState); 17 RUN_TEST(InitialState, filter);
18 RUN_TEST(SingleInvalidation); 18 RUN_TEST(SingleInvalidation, filter);
19 RUN_TEST(DoubleDisjointInvalidation); 19 RUN_TEST(DoubleDisjointInvalidation, filter);
20 RUN_TEST(SingleScroll); 20 RUN_TEST(SingleScroll, filter);
21 RUN_TEST(DoubleOverlappingScroll); 21 RUN_TEST(DoubleOverlappingScroll, filter);
22 RUN_TEST(NegatingScroll); 22 RUN_TEST(NegatingScroll, filter);
23 RUN_TEST(DiagonalScroll); 23 RUN_TEST(DiagonalScroll, filter);
24 RUN_TEST(ContainedPaintAfterScroll); 24 RUN_TEST(ContainedPaintAfterScroll, filter);
25 RUN_TEST(ContainedPaintBeforeScroll); 25 RUN_TEST(ContainedPaintBeforeScroll, filter);
26 RUN_TEST(ContainedPaintsBeforeAndAfterScroll); 26 RUN_TEST(ContainedPaintsBeforeAndAfterScroll, filter);
27 RUN_TEST(LargeContainedPaintAfterScroll); 27 RUN_TEST(LargeContainedPaintAfterScroll, filter);
28 RUN_TEST(LargeContainedPaintBeforeScroll); 28 RUN_TEST(LargeContainedPaintBeforeScroll, filter);
29 RUN_TEST(OverlappingPaintBeforeScroll); 29 RUN_TEST(OverlappingPaintBeforeScroll, filter);
30 RUN_TEST(OverlappingPaintAfterScroll); 30 RUN_TEST(OverlappingPaintAfterScroll, filter);
31 RUN_TEST(DisjointPaintBeforeScroll); 31 RUN_TEST(DisjointPaintBeforeScroll, filter);
32 RUN_TEST(DisjointPaintAfterScroll); 32 RUN_TEST(DisjointPaintAfterScroll, filter);
33 RUN_TEST(ContainedPaintTrimmedByScroll); 33 RUN_TEST(ContainedPaintTrimmedByScroll, filter);
34 RUN_TEST(ContainedPaintEliminatedByScroll); 34 RUN_TEST(ContainedPaintEliminatedByScroll, filter);
35 RUN_TEST(ContainedPaintAfterScrollTrimmedByScrollDamage); 35 RUN_TEST(ContainedPaintAfterScrollTrimmedByScrollDamage, filter);
36 RUN_TEST(ContainedPaintAfterScrollEliminatedByScrollDamage); 36 RUN_TEST(ContainedPaintAfterScrollEliminatedByScrollDamage, filter);
37 } 37 }
38 38
39 std::string TestPaintAggregator::TestInitialState() { 39 std::string TestPaintAggregator::TestInitialState() {
40 pp::PaintAggregator greg; 40 pp::PaintAggregator greg;
41 if (greg.HasPendingUpdate()) 41 if (greg.HasPendingUpdate())
42 return "Pending update invalid"; 42 return "Pending update invalid";
43 PASS(); 43 PASS();
44 } 44 }
45 45
46 std::string TestPaintAggregator::TestSingleInvalidation() { 46 std::string TestPaintAggregator::TestSingleInvalidation() {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 ASSERT_TRUE(greg.HasPendingUpdate()); 418 ASSERT_TRUE(greg.HasPendingUpdate());
419 419
420 ASSERT_FALSE(greg.GetPendingUpdate().scroll_rect.IsEmpty()); 420 ASSERT_FALSE(greg.GetPendingUpdate().scroll_rect.IsEmpty());
421 ASSERT_TRUE(1U == greg.GetPendingUpdate().paint_rects.size()); 421 ASSERT_TRUE(1U == greg.GetPendingUpdate().paint_rects.size());
422 422
423 ASSERT_TRUE(scroll_rect == greg.GetPendingUpdate().scroll_rect); 423 ASSERT_TRUE(scroll_rect == greg.GetPendingUpdate().scroll_rect);
424 ASSERT_TRUE(expected_scroll_damage == greg.GetPendingUpdate().paint_rects[0]); 424 ASSERT_TRUE(expected_scroll_damage == greg.GetPendingUpdate().paint_rects[0]);
425 PASS(); 425 PASS();
426 } 426 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_paint_aggregator.h ('k') | ppapi/tests/test_post_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698