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

Unified Diff: base/test/trace_event_analyzer_unittest.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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
« no previous file with comments | « base/test/launcher/test_results_tracker.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/trace_event_analyzer_unittest.cc
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index a17c7e5d436b5593fbdf9c523573febd91f5d241..56045089222500e80848267b30325b81d9b23040 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -399,7 +399,7 @@ TEST_F(TraceEventAnalyzerTest, BeginEndDuration) {
const base::TimeDelta kSleepTime = base::TimeDelta::FromMilliseconds(200);
// We will search for events that have a duration of greater than 90% of the
// sleep time, so that there is no flakiness.
- int duration_cutoff_us = (kSleepTime.InMicroseconds() * 9) / 10;
+ int64 duration_cutoff_us = (kSleepTime.InMicroseconds() * 9) / 10;
BeginTracing();
{
@@ -427,7 +427,8 @@ TEST_F(TraceEventAnalyzerTest, BeginEndDuration) {
TraceEventVector found;
analyzer->FindEvents(
Query::MatchBeginWithEnd() &&
- Query::EventDuration() > Query::Int(duration_cutoff_us) &&
+ Query::EventDuration() >
+ Query::Int(static_cast<int>(duration_cutoff_us)) &&
(Query::EventCategory() == Query::String("cat1") ||
Query::EventCategory() == Query::String("cat2") ||
Query::EventCategory() == Query::String("cat3")),
@@ -444,7 +445,7 @@ TEST_F(TraceEventAnalyzerTest, CompleteDuration) {
const base::TimeDelta kSleepTime = base::TimeDelta::FromMilliseconds(200);
// We will search for events that have a duration of greater than 90% of the
// sleep time, so that there is no flakiness.
- int duration_cutoff_us = (kSleepTime.InMicroseconds() * 9) / 10;
+ int64 duration_cutoff_us = (kSleepTime.InMicroseconds() * 9) / 10;
BeginTracing();
{
@@ -467,7 +468,8 @@ TEST_F(TraceEventAnalyzerTest, CompleteDuration) {
TraceEventVector found;
analyzer->FindEvents(
- Query::EventCompleteDuration() > Query::Int(duration_cutoff_us) &&
+ Query::EventCompleteDuration() >
+ Query::Int(static_cast<int>(duration_cutoff_us)) &&
(Query::EventCategory() == Query::String("cat1") ||
Query::EventCategory() == Query::String("cat2") ||
Query::EventCategory() == Query::String("cat3")),
« no previous file with comments | « base/test/launcher/test_results_tracker.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698