Commit 51a7aec7 authored by nednguyen@google.com's avatar nednguyen@google.com

Modify TraceEventTestFixture.TraceBufferVectorReportFull to assert the...

Modify TraceEventTestFixture.TraceBufferVectorReportFull to assert the overflowed_at_ts is between the timestamp of last event and current trace_log's time.

BUG=395739

Review URL: https://codereview.chromium.org/402283002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284702 0039d316-1c4b-4281-b951-d872f2087c98
parent 496d37c7
......@@ -2450,16 +2450,17 @@ TEST_F(TraceEventTestFixture, TraceBufferVectorReportFull) {
trace_log->buffer_limit_reached_timestamp_.ToInternalValue()),
buffer_limit_reached_timestamp);
// Test that buffer_limit_reached_timestamp's value is near to the timestamp
// of the last trace event.
// Test that buffer_limit_reached_timestamp's value is between the timestamp
// of the last trace event and current time.
DropTracedMetadataRecords();
const DictionaryValue* last_trace_event = NULL;
double last_trace_event_timestamp = 0;
EXPECT_TRUE(trace_parsed_.GetDictionary(trace_parsed_.GetSize() - 1,
&last_trace_event));
EXPECT_TRUE(last_trace_event->GetDouble("ts", &last_trace_event_timestamp));
// The difference between the two timestamps should be less than 50ms.
EXPECT_NEAR(last_trace_event_timestamp, buffer_limit_reached_timestamp, 50);
EXPECT_LT(last_trace_event_timestamp, buffer_limit_reached_timestamp);
EXPECT_LT(buffer_limit_reached_timestamp,
trace_log->OffsetNow().ToInternalValue());
}
TEST_F(TraceEventTestFixture, TraceBufferRingBufferGetReturnChunk) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment