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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler_unittest.cc

Issue 2786083005: scheduler: Maintain a constant enqueue order for every task (Closed)
Patch Set: WASM workaround no longer needed Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/base/work_queue_unittest.cc ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/scheduler/renderer/task_queue_throttler.h" 5 #include "platform/scheduler/renderer/task_queue_throttler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 base::Bind(&RunTenTimesTask, count, timer_queue)); 51 base::Bind(&RunTenTimesTask, count, timer_queue));
52 } 52 }
53 } 53 }
54 54
55 bool IsQueueBlocked(TaskQueue* task_queue) { 55 bool IsQueueBlocked(TaskQueue* task_queue) {
56 internal::TaskQueueImpl* task_queue_impl = 56 internal::TaskQueueImpl* task_queue_impl =
57 reinterpret_cast<internal::TaskQueueImpl*>(task_queue); 57 reinterpret_cast<internal::TaskQueueImpl*>(task_queue);
58 if (!task_queue_impl->IsQueueEnabled()) 58 if (!task_queue_impl->IsQueueEnabled())
59 return true; 59 return true;
60 return task_queue_impl->GetFenceForTest() == 60 return task_queue_impl->GetFenceForTest() ==
61 static_cast<internal::EnqueueOrder>( 61 static_cast<internal::SequenceNumber>(
62 internal::EnqueueOrderValues::BLOCKING_FENCE); 62 internal::EnqueueOrderSequenceNumberValues::BLOCKING_FENCE);
63 } 63 }
64 } 64 }
65 65
66 class TaskQueueThrottlerTest : public testing::Test { 66 class TaskQueueThrottlerTest : public testing::Test {
67 public: 67 public:
68 TaskQueueThrottlerTest() {} 68 TaskQueueThrottlerTest() {}
69 ~TaskQueueThrottlerTest() override {} 69 ~TaskQueueThrottlerTest() override {}
70 70
71 void SetUp() override { 71 void SetUp() override {
72 clock_.reset(new base::SimpleTestTickClock()); 72 clock_.reset(new base::SimpleTestTickClock());
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 run_times, 1050 run_times,
1051 ElementsAre( 1051 ElementsAre(
1052 base::TimeTicks() + base::TimeDelta::FromMilliseconds(1000), 1052 base::TimeTicks() + base::TimeDelta::FromMilliseconds(1000),
1053 base::TimeTicks() + base::TimeDelta::FromMilliseconds(3000), 1053 base::TimeTicks() + base::TimeDelta::FromMilliseconds(3000),
1054 base::TimeTicks() + base::TimeDelta::FromMilliseconds(6000), 1054 base::TimeTicks() + base::TimeDelta::FromMilliseconds(6000),
1055 base::TimeTicks() + base::TimeDelta::FromMilliseconds(26000))); 1055 base::TimeTicks() + base::TimeDelta::FromMilliseconds(26000)));
1056 } 1056 }
1057 1057
1058 } // namespace scheduler 1058 } // namespace scheduler
1059 } // namespace blink 1059 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/base/work_queue_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698