| Index: third_party/WebKit/Source/core/timing/PerformanceTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceTest.cpp
|
| index b4eb55006e2fbbad22dfcf723ba430cff15dc2de..07331252ea099a238762a2f4ea91be29cd36a4c4 100644
|
| --- a/third_party/WebKit/Source/core/timing/PerformanceTest.cpp
|
| +++ b/third_party/WebKit/Source/core/timing/PerformanceTest.cpp
|
| @@ -17,9 +17,7 @@ class PerformanceTest : public ::testing::Test {
|
| m_performance = Performance::create(&m_pageHolder->frame());
|
| }
|
|
|
| - bool hasLongTaskInspectorAgent() {
|
| - return m_performance->m_longTaskInspectorAgent;
|
| - }
|
| + bool observingLongTasks() { return m_performance->observingLongTasks(); }
|
|
|
| void addLongTaskObserver() {
|
| // simulate with filter options.
|
| @@ -37,21 +35,16 @@ class PerformanceTest : public ::testing::Test {
|
|
|
| TEST_F(PerformanceTest, LongTaskObserverInstrumentation) {
|
| m_performance->updateLongTaskInstrumentation();
|
| - EXPECT_FALSE(hasLongTaskInspectorAgent());
|
| + EXPECT_FALSE(observingLongTasks());
|
|
|
| // Adding LongTask observer (with filer option) enables instrumentation.
|
| addLongTaskObserver();
|
| m_performance->updateLongTaskInstrumentation();
|
| - EXPECT_TRUE(hasLongTaskInspectorAgent());
|
| -
|
| - // While LongTask observer is present, updateLongTaskInstrumentation has no
|
| - // effect.
|
| - m_performance->updateLongTaskInstrumentation();
|
| - EXPECT_TRUE(hasLongTaskInspectorAgent());
|
| + EXPECT_TRUE(observingLongTasks());
|
|
|
| // Removing LongTask observer disables instrumentation.
|
| removeLongTaskObserver();
|
| m_performance->updateLongTaskInstrumentation();
|
| - EXPECT_FALSE(hasLongTaskInspectorAgent());
|
| + EXPECT_FALSE(observingLongTasks());
|
| }
|
| }
|
|
|