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

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 470803007: cc: Disable all synthetic BeginFrame tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "cc/scheduler/scheduler.h" 4 #include "cc/scheduler/scheduler.h"
5 5
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 client.Reset(); 1420 client.Reset();
1421 1421
1422 // Make sure SetNeedsBeginFrame isn't called on the client 1422 // Make sure SetNeedsBeginFrame isn't called on the client
1423 // when the BeginFrame is no longer needed. 1423 // when the BeginFrame is no longer needed.
1424 client.task_runner().RunPendingTasks(); // Run posted deadline. 1424 client.task_runner().RunPendingTasks(); // Run posted deadline.
1425 EXPECT_NO_ACTION(client); 1425 EXPECT_NO_ACTION(client);
1426 EXPECT_FALSE(client.needs_begin_frame()); 1426 EXPECT_FALSE(client.needs_begin_frame());
1427 client.Reset(); 1427 client.Reset();
1428 } 1428 }
1429 1429
1430 // See: http://crbug.com/388901 1430 // See: http://crbug.com/380889
1431 TEST(SchedulerTest, DISABLED_SyntheticBeginFrames) { 1431 TEST(SchedulerTest, DISABLED_SyntheticBeginFrames) {
1432 bool begin_frame_scheduling_enabled = false; 1432 bool begin_frame_scheduling_enabled = false;
1433 bool throttle_frame_production = true; 1433 bool throttle_frame_production = true;
1434 BeginFramesNotFromClient(begin_frame_scheduling_enabled, 1434 BeginFramesNotFromClient(begin_frame_scheduling_enabled,
1435 throttle_frame_production); 1435 throttle_frame_production);
1436 } 1436 }
1437 1437
1438 TEST(SchedulerTest, VSyncThrottlingDisabled) { 1438 TEST(SchedulerTest, VSyncThrottlingDisabled) {
1439 bool begin_frame_scheduling_enabled = true; 1439 bool begin_frame_scheduling_enabled = true;
1440 bool throttle_frame_production = false; 1440 bool throttle_frame_production = false;
1441 BeginFramesNotFromClient(begin_frame_scheduling_enabled, 1441 BeginFramesNotFromClient(begin_frame_scheduling_enabled,
1442 throttle_frame_production); 1442 throttle_frame_production);
1443 } 1443 }
1444 1444
1445 TEST(SchedulerTest, SyntheticBeginFrames_And_VSyncThrottlingDisabled) { 1445 // See: http://crbug.com/380889
1446 TEST(SchedulerTest, DISABLED_SyntheticBeginFrames_And_VSyncThrottlingDisabled) {
1446 bool begin_frame_scheduling_enabled = false; 1447 bool begin_frame_scheduling_enabled = false;
1447 bool throttle_frame_production = false; 1448 bool throttle_frame_production = false;
1448 BeginFramesNotFromClient(begin_frame_scheduling_enabled, 1449 BeginFramesNotFromClient(begin_frame_scheduling_enabled,
1449 throttle_frame_production); 1450 throttle_frame_production);
1450 } 1451 }
1451 1452
1452 void BeginFramesNotFromClient_SwapThrottled(bool begin_frame_scheduling_enabled, 1453 void BeginFramesNotFromClient_SwapThrottled(bool begin_frame_scheduling_enabled,
1453 bool throttle_frame_production) { 1454 bool throttle_frame_production) {
1454 FakeSchedulerClient client; 1455 FakeSchedulerClient client;
1455 SchedulerSettings scheduler_settings; 1456 SchedulerSettings scheduler_settings;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 // BeginImplFrame deadline should draw. 1516 // BeginImplFrame deadline should draw.
1516 scheduler->SetNeedsRedraw(); 1517 scheduler->SetNeedsRedraw();
1517 client.task_runner().RunPendingTasks(); // Run posted deadline. 1518 client.task_runner().RunPendingTasks(); // Run posted deadline.
1518 EXPECT_ACTION("ScheduledActionAnimate", client, 0, 2); 1519 EXPECT_ACTION("ScheduledActionAnimate", client, 0, 2);
1519 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client, 1, 2); 1520 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client, 1, 2);
1520 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending()); 1521 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending());
1521 EXPECT_FALSE(client.needs_begin_frame()); 1522 EXPECT_FALSE(client.needs_begin_frame());
1522 client.Reset(); 1523 client.Reset();
1523 } 1524 }
1524 1525
1525 TEST(SchedulerTest, SyntheticBeginFrames_SwapThrottled) { 1526 // See: http://crbug.com/380889
1527 TEST(SchedulerTest, DISABLED_SyntheticBeginFrames_SwapThrottled) {
1526 bool begin_frame_scheduling_enabled = false; 1528 bool begin_frame_scheduling_enabled = false;
1527 bool throttle_frame_production = true; 1529 bool throttle_frame_production = true;
1528 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled, 1530 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled,
1529 throttle_frame_production); 1531 throttle_frame_production);
1530 } 1532 }
1531 1533
1532 TEST(SchedulerTest, VSyncThrottlingDisabled_SwapThrottled) { 1534 TEST(SchedulerTest, VSyncThrottlingDisabled_SwapThrottled) {
1533 bool begin_frame_scheduling_enabled = true; 1535 bool begin_frame_scheduling_enabled = true;
1534 bool throttle_frame_production = false; 1536 bool throttle_frame_production = false;
1535 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled, 1537 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled,
1536 throttle_frame_production); 1538 throttle_frame_production);
1537 } 1539 }
1538 1540
1541 // See: http://crbug.com/380889
1539 TEST(SchedulerTest, 1542 TEST(SchedulerTest,
1540 SyntheticBeginFrames_And_VSyncThrottlingDisabled_SwapThrottled) { 1543 DISABLED_SyntheticBeginFrames_And_VSyncThrottlingDisabled_SwapThrottled) {
1541 bool begin_frame_scheduling_enabled = false; 1544 bool begin_frame_scheduling_enabled = false;
1542 bool throttle_frame_production = false; 1545 bool throttle_frame_production = false;
1543 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled, 1546 BeginFramesNotFromClient_SwapThrottled(begin_frame_scheduling_enabled,
1544 throttle_frame_production); 1547 throttle_frame_production);
1545 } 1548 }
1546 1549
1547 TEST(SchedulerTest, DidLoseOutputSurfaceAfterOutputSurfaceIsInitialized) { 1550 TEST(SchedulerTest, DidLoseOutputSurfaceAfterOutputSurfaceIsInitialized) {
1548 FakeSchedulerClient client; 1551 FakeSchedulerClient client;
1549 SchedulerSettings scheduler_settings; 1552 SchedulerSettings scheduler_settings;
1550 TestScheduler* scheduler = client.CreateScheduler(scheduler_settings); 1553 TestScheduler* scheduler = client.CreateScheduler(scheduler_settings);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client); 1871 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client);
1869 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending()); 1872 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending());
1870 EXPECT_TRUE(client.needs_begin_frame()); 1873 EXPECT_TRUE(client.needs_begin_frame());
1871 1874
1872 // No more BeginRetroFrame because BeginRetroFrame queue is cleared. 1875 // No more BeginRetroFrame because BeginRetroFrame queue is cleared.
1873 client.Reset(); 1876 client.Reset();
1874 client.task_runner().RunPendingTasks(); 1877 client.task_runner().RunPendingTasks();
1875 EXPECT_NO_ACTION(client); 1878 EXPECT_NO_ACTION(client);
1876 } 1879 }
1877 1880
1878 TEST(SchedulerTest, 1881 // See: http://crbug.com/380889
1879 StopBeginFrameAfterDidLoseOutputSurfaceWithSyntheticBeginFrameSource) { 1882 TEST(
1883 SchedulerTest,
1884 DISABLED_StopBeginFrameAfterDidLoseOutputSurfaceWithSyntheticBeginFrameSourc e) {
1880 FakeSchedulerClient client; 1885 FakeSchedulerClient client;
1881 SchedulerSettings scheduler_settings; 1886 SchedulerSettings scheduler_settings;
1882 scheduler_settings.begin_frame_scheduling_enabled = false; 1887 scheduler_settings.begin_frame_scheduling_enabled = false;
1883 TestScheduler* scheduler = client.CreateScheduler(scheduler_settings); 1888 TestScheduler* scheduler = client.CreateScheduler(scheduler_settings);
1884 scheduler->SetCanStart(); 1889 scheduler->SetCanStart();
1885 scheduler->SetVisible(true); 1890 scheduler->SetVisible(true);
1886 scheduler->SetCanDraw(true); 1891 scheduler->SetCanDraw(true);
1887 InitializeOutputSurfaceAndFirstCommit(scheduler, &client); 1892 InitializeOutputSurfaceAndFirstCommit(scheduler, &client);
1888 1893
1889 // SetNeedsCommit should begin the frame on the next BeginImplFrame. 1894 // SetNeedsCommit should begin the frame on the next BeginImplFrame.
(...skipping 22 matching lines...) Expand all
1912 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive()); 1917 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive());
1913 1918
1914 client.Reset(); 1919 client.Reset();
1915 client.task_runner().RunPendingTasks(); // Run posted deadline. 1920 client.task_runner().RunPendingTasks(); // Run posted deadline.
1916 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client); 1921 EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", client);
1917 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive()); 1922 EXPECT_FALSE(scheduler->IsSyntheticBeginFrameSourceActive());
1918 } 1923 }
1919 1924
1920 } // namespace 1925 } // namespace
1921 } // namespace cc 1926 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698