| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/timing/PerformanceObserver.h" | 5 #include "core/timing/PerformanceObserver.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/PerformanceObserverCallback.h" | 7 #include "bindings/core/v8/PerformanceObserverCallback.h" |
| 8 #include "bindings/core/v8/V8BindingForTesting.h" | 8 #include "bindings/core/v8/V8BindingForTesting.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/dom/TaskRunnerHelper.h" | 10 #include "core/dom/TaskRunnerHelper.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 Persistent<PerformanceEntry> entry = PerformanceMark::Create("m", 1234); | 93 Persistent<PerformanceEntry> entry = PerformanceMark::Create("m", 1234); |
| 94 EXPECT_EQ(0, NumPerformanceEntries()); | 94 EXPECT_EQ(0, NumPerformanceEntries()); |
| 95 | 95 |
| 96 observer_->EnqueuePerformanceEntry(*entry); | 96 observer_->EnqueuePerformanceEntry(*entry); |
| 97 EXPECT_EQ(1, NumPerformanceEntries()); | 97 EXPECT_EQ(1, NumPerformanceEntries()); |
| 98 | 98 |
| 99 observer_->disconnect(); | 99 observer_->disconnect(); |
| 100 EXPECT_FALSE(IsRegistered()); | 100 EXPECT_FALSE(IsRegistered()); |
| 101 EXPECT_EQ(0, NumPerformanceEntries()); | 101 EXPECT_EQ(0, NumPerformanceEntries()); |
| 102 } | 102 } |
| 103 } | 103 } // namespace blink |
| OLD | NEW |