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

Unified Diff: test/cctest/libplatform/test-tracing.cc

Issue 2376953002: [tracing] r39794 follow-up: Update the missing part of the test. (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/libplatform/test-tracing.cc
diff --git a/test/cctest/libplatform/test-tracing.cc b/test/cctest/libplatform/test-tracing.cc
index 0ca51c308982c395722e8f71a360afaa5a00ae15..66fa0e05a524186ee1e7cddaa553a44cca0e09c6 100644
--- a/test/cctest/libplatform/test-tracing.cc
+++ b/test/cctest/libplatform/test-tracing.cc
@@ -372,10 +372,23 @@ TEST(TracingObservers) {
CHECK_EQ(1, observer.enabled_count);
CHECK_EQ(0, observer.disabled_count);
+ TraceStateObserverImpl observer2;
+ default_platform->AddTraceStateObserver(&observer2);
+
+ CHECK_EQ(1, observer2.enabled_count);
+ CHECK_EQ(0, observer2.disabled_count);
+
+ default_platform->RemoveTraceStateObserver(&observer2);
+
+ CHECK_EQ(1, observer2.enabled_count);
+ CHECK_EQ(0, observer2.disabled_count);
+
tracing_controller.StopTracing();
CHECK_EQ(1, observer.enabled_count);
CHECK_EQ(1, observer.disabled_count);
+ CHECK_EQ(1, observer2.enabled_count);
+ CHECK_EQ(0, observer2.disabled_count);
default_platform->RemoveTraceStateObserver(&observer);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698