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); |