Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc |
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc |
index c98d2816ffcc5013da7e808e833d97e0d11f07f8..96f1c6c0efdfbfba8a1999d3a098568d5e413582 100644 |
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc |
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc |
@@ -19,7 +19,7 @@ |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-using testing::_; |
+using ::testing::_; |
namespace blink { |
namespace scheduler { |
@@ -44,7 +44,7 @@ class TaskQueueSelectorForTest : public TaskQueueSelector { |
using TaskQueueSelector::enabled_selector_for_test; |
}; |
-class TaskQueueSelectorTest : public testing::Test { |
+class TaskQueueSelectorTest : public ::testing::Test { |
public: |
TaskQueueSelectorTest() |
: test_closure_(base::Bind(&TaskQueueSelectorTest::TestFunction)) {} |
@@ -163,21 +163,21 @@ class TaskQueueSelectorTest : public testing::Test { |
TEST_F(TaskQueueSelectorTest, TestDefaultPriority) { |
size_t queue_order[] = {4, 3, 2, 1, 0}; |
PushTasks(queue_order, 5); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(4, 3, 2, 1, 0)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(4, 3, 2, 1, 0)); |
} |
TEST_F(TaskQueueSelectorTest, TestHighPriority) { |
size_t queue_order[] = {0, 1, 2, 3, 4}; |
PushTasks(queue_order, 5); |
selector_.SetQueuePriority(task_queues_[2].get(), TaskQueue::HIGH_PRIORITY); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(2, 0, 1, 3, 4)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(2, 0, 1, 3, 4)); |
} |
TEST_F(TaskQueueSelectorTest, TestLowPriority) { |
size_t queue_order[] = {0, 1, 2, 3, 4}; |
PushTasks(queue_order, 5); |
selector_.SetQueuePriority(task_queues_[2].get(), TaskQueue::LOW_PRIORITY); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(0, 1, 3, 4, 2)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(0, 1, 3, 4, 2)); |
} |
TEST_F(TaskQueueSelectorTest, TestBestEffortPriority) { |
@@ -187,7 +187,7 @@ TEST_F(TaskQueueSelectorTest, TestBestEffortPriority) { |
TaskQueue::BEST_EFFORT_PRIORITY); |
selector_.SetQueuePriority(task_queues_[2].get(), TaskQueue::LOW_PRIORITY); |
selector_.SetQueuePriority(task_queues_[3].get(), TaskQueue::HIGH_PRIORITY); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(3, 1, 4, 2, 0)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(3, 1, 4, 2, 0)); |
} |
TEST_F(TaskQueueSelectorTest, TestControlPriority) { |
@@ -198,7 +198,7 @@ TEST_F(TaskQueueSelectorTest, TestControlPriority) { |
EXPECT_EQ(TaskQueue::CONTROL_PRIORITY, task_queues_[4]->GetQueuePriority()); |
selector_.SetQueuePriority(task_queues_[2].get(), TaskQueue::HIGH_PRIORITY); |
EXPECT_EQ(TaskQueue::HIGH_PRIORITY, task_queues_[2]->GetQueuePriority()); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(4, 2, 0, 1, 3)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(4, 2, 0, 1, 3)); |
} |
TEST_F(TaskQueueSelectorTest, TestObserverWithEnabledQueue) { |
@@ -235,15 +235,15 @@ TEST_F(TaskQueueSelectorTest, TestDisableEnable) { |
// Disabling a queue should not affect its priority. |
EXPECT_EQ(TaskQueue::NORMAL_PRIORITY, task_queues_[2]->GetQueuePriority()); |
EXPECT_EQ(TaskQueue::NORMAL_PRIORITY, task_queues_[4]->GetQueuePriority()); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(0, 1, 3)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(0, 1, 3)); |
EXPECT_CALL(mock_observer, OnTaskQueueEnabled(_)).Times(2); |
EnableQueue(voter2.get()); |
selector_.SetQueuePriority(task_queues_[2].get(), |
TaskQueue::BEST_EFFORT_PRIORITY); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(2)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(2)); |
EnableQueue(voter4.get()); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(4)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(4)); |
} |
TEST_F(TaskQueueSelectorTest, TestDisableChangePriorityThenEnable) { |
@@ -263,7 +263,7 @@ TEST_F(TaskQueueSelectorTest, TestDisableChangePriorityThenEnable) { |
EnableQueue(voter2.get()); |
EXPECT_EQ(TaskQueue::HIGH_PRIORITY, task_queues_[2]->GetQueuePriority()); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(2, 0, 1, 3, 4)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(2, 0, 1, 3, 4)); |
} |
TEST_F(TaskQueueSelectorTest, TestEmptyQueues) { |
@@ -288,7 +288,7 @@ TEST_F(TaskQueueSelectorTest, TestAge) { |
size_t enqueue_order[] = {10, 1, 2, 9, 4}; |
size_t queue_order[] = {0, 1, 2, 3, 4}; |
PushTasksWithEnqueueOrder(queue_order, enqueue_order, 5); |
- EXPECT_THAT(PopTasks(), testing::ElementsAre(1, 2, 4, 3, 0)); |
+ EXPECT_THAT(PopTasks(), ::testing::ElementsAre(1, 2, 4, 3, 0)); |
} |
TEST_F(TaskQueueSelectorTest, TestControlStarvesOthers) { |
@@ -513,7 +513,7 @@ TEST_F(TaskQueueSelectorTest, TestObserverWithTwoBlockedQueues) { |
WorkQueue* chosen_work_queue; |
EXPECT_CALL(mock_observer, OnTriedToSelectBlockedWorkQueue(_)).Times(1); |
EXPECT_FALSE(selector.SelectWorkQueueToService(&chosen_work_queue)); |
- testing::Mock::VerifyAndClearExpectations(&mock_observer); |
+ ::testing::Mock::VerifyAndClearExpectations(&mock_observer); |
EXPECT_CALL(mock_observer, OnTaskQueueEnabled(_)).Times(2); |
@@ -551,7 +551,8 @@ static const ChooseOldestWithPriorityTestParam |
class ChooseOldestWithPriorityTest |
: public TaskQueueSelectorTest, |
- public testing::WithParamInterface<ChooseOldestWithPriorityTestParam> {}; |
+ public ::testing::WithParamInterface<ChooseOldestWithPriorityTestParam> { |
+}; |
TEST_P(ChooseOldestWithPriorityTest, RoundRobinTest) { |
task_queues_[0]->immediate_work_queue()->Push( |
@@ -579,9 +580,10 @@ TEST_P(ChooseOldestWithPriorityTest, RoundRobinTest) { |
GetParam().expected_did_starve_immediate_queue); |
} |
-INSTANTIATE_TEST_CASE_P(ChooseOldestWithPriorityTest, |
- ChooseOldestWithPriorityTest, |
- testing::ValuesIn(kChooseOldestWithPriorityTestCases)); |
+INSTANTIATE_TEST_CASE_P( |
+ ChooseOldestWithPriorityTest, |
+ ChooseOldestWithPriorityTest, |
+ ::testing::ValuesIn(kChooseOldestWithPriorityTestCases)); |
} // namespace internal |
} // namespace scheduler |