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

Unified Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 10911268: Add some TraceAnalyzer utility methods to simplify test code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/trace_event_analyzer_unittest.cc ('k') | chrome/test/perf/frame_rate/frame_rate_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/gpu/gpu_feature_browsertest.cc
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc
index 41c471b2086097ebb91f55b45d7e16447f9d7dc0..2c899ee7cd1239c3687f223d8c4daa31b2c55b96 100644
--- a/chrome/test/gpu/gpu_feature_browsertest.cc
+++ b/chrome/test/gpu/gpu_feature_browsertest.cc
@@ -130,16 +130,14 @@ class GpuFeatureTest : public InProcessBrowserTest {
TraceEventVector events;
if (expectations & EXPECT_NO_GPU_SWAP_BUFFERS) {
- EXPECT_EQ(analyzer_->FindEvents(Query::EventName() ==
- Query::String("SwapBuffers"), &events),
- size_t(0));
+ EXPECT_EQ(analyzer_->FindEvents(Query::EventNameIs("SwapBuffers"),
+ &events), size_t(0));
}
// Check for swap buffers if expected:
if (expectations & EXPECT_GPU_SWAP_BUFFERS) {
- EXPECT_GT(analyzer_->FindEvents(Query::EventName() ==
- Query::String("SwapBuffers"), &events),
- size_t(0));
+ EXPECT_GT(analyzer_->FindEvents(Query::EventNameIs("SwapBuffers"),
+ &events), size_t(0));
}
}
@@ -415,9 +413,9 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, RafNoDamage) {
// Search for matching name on begin event or async_begin event (any begin).
Query query_raf =
- (Query::EventPhase() == Query::Phase(TRACE_EVENT_PHASE_BEGIN) ||
- Query::EventPhase() == Query::Phase(TRACE_EVENT_PHASE_ASYNC_BEGIN)) &&
- Query::EventName() == Query::String("___RafWithNoDamage___");
+ (Query::EventPhaseIs(TRACE_EVENT_PHASE_BEGIN) ||
+ Query::EventPhaseIs(TRACE_EVENT_PHASE_ASYNC_BEGIN)) &&
+ Query::EventNameIs("___RafWithNoDamage___");
TraceEventVector events;
size_t num_events = analyzer_->FindEvents(query_raf, &events);
« no previous file with comments | « base/test/trace_event_analyzer_unittest.cc ('k') | chrome/test/perf/frame_rate/frame_rate_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698