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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc b/third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc
index aa3a09550f2bb167b110b1c3b784480c7d74bc91..bf23388f9952fc217f63b8d757a29974fe1ce068 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/thread_load_tracker_unittest.cc
@@ -53,13 +53,14 @@ TEST(ThreadLoadTrackerTest, RecordTasks) {
thread_load_tracker.RecordIdle(MillisecondsToTime(17500));
// Because of 10-second delay we're getting information starting with 11s.
- EXPECT_THAT(result, ElementsAre(std::make_pair(SecondsToTime(11), 0),
- std::make_pair(SecondsToTime(12), 0.1),
- std::make_pair(SecondsToTime(13), 0.1),
- std::make_pair(SecondsToTime(14), 0.2),
- std::make_pair(SecondsToTime(15), 0.5),
- std::make_pair(SecondsToTime(16), 1.0),
- std::make_pair(SecondsToTime(17), 0.5)));
+ EXPECT_THAT(result,
+ ElementsAre(std::make_pair(SecondsToTime(11), 0),
+ std::make_pair(SecondsToTime(12), 0.1),
+ std::make_pair(SecondsToTime(13), 0.1),
+ std::make_pair(SecondsToTime(14), 0.2),
+ std::make_pair(SecondsToTime(15), 0.5),
+ std::make_pair(SecondsToTime(16), 1.0),
+ std::make_pair(SecondsToTime(17), 0.5)));
}
TEST(ThreadLoadTrackerTest, PauseAndResume) {
@@ -87,10 +88,11 @@ TEST(ThreadLoadTrackerTest, PauseAndResume) {
MillisecondsToTime(26200));
thread_load_tracker.RecordIdle(MillisecondsToTime(27500));
- EXPECT_THAT(result, ElementsAre(std::make_pair(SecondsToTime(21), 0.1),
- std::make_pair(SecondsToTime(22), 0.1),
- std::make_pair(SecondsToTime(23), 0),
- std::make_pair(SecondsToTime(27), 0.1)));
+ EXPECT_THAT(result,
+ ElementsAre(std::make_pair(SecondsToTime(21), 0.1),
+ std::make_pair(SecondsToTime(22), 0.1),
+ std::make_pair(SecondsToTime(23), 0),
+ std::make_pair(SecondsToTime(27), 0.1)));
}
TEST(ThreadLoadTrackerTest, DisabledByDefault) {
@@ -108,9 +110,10 @@ TEST(ThreadLoadTrackerTest, DisabledByDefault) {
thread_load_tracker.RecordTaskTime(SecondsToTime(28), SecondsToTime(29));
- EXPECT_THAT(result, ElementsAre(std::make_pair(SecondsToTime(27), 0),
- std::make_pair(SecondsToTime(28), 0),
- std::make_pair(SecondsToTime(29), 1)));
+ EXPECT_THAT(result,
+ ElementsAre(std::make_pair(SecondsToTime(27), 0),
+ std::make_pair(SecondsToTime(28), 0),
+ std::make_pair(SecondsToTime(29), 1)));
}
} // namespace scheduler

Powered by Google App Engine
This is Rietveld 408576698