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

Unified Diff: third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp

Issue 2484213003: Convert performance monitor to the subscription model. (Closed)
Patch Set: core export Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp b/third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp
index ea83c27f1ea94fc8938e704c6c8ac9b11eac33f1..4dea09b19b6641ad3e27c426b9559204786db331 100644
--- a/third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp
+++ b/third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp
@@ -46,11 +46,6 @@ class PerformanceMonitorTest : public ::testing::Test {
String frameContextURL();
int numUniqueFrameContextsSeen();
- String sanitizedLongTaskName(HeapHashSet<Member<Frame>> frameContexts,
- Frame* observerFrame) {
- return m_monitor->sanitizedAttribution(frameContexts, observerFrame).first;
- }
-
Persistent<PerformanceMonitor> m_monitor;
std::unique_ptr<DummyPageHolder> m_pageHolder;
std::unique_ptr<DummyPageHolder> m_anotherPageHolder;
@@ -132,29 +127,4 @@ TEST_F(PerformanceMonitorTest, NoScriptInLongTask) {
EXPECT_EQ(0, numUniqueFrameContextsSeen());
}
-TEST_F(PerformanceMonitorTest, SanitizedLongTaskName) {
- HeapHashSet<Member<Frame>> frameContexts;
- // Unable to attribute, when no execution contents are available.
- EXPECT_EQ("unknown", sanitizedLongTaskName(frameContexts, frame()));
-
- // Attribute for same context (and same origin).
- frameContexts.add(frame());
- EXPECT_EQ("same-origin", sanitizedLongTaskName(frameContexts, frame()));
-
- // Unable to attribute, when multiple script execution contents are involved.
- frameContexts.add(anotherFrame());
- EXPECT_EQ("multiple-contexts", sanitizedLongTaskName(frameContexts, frame()));
-}
-
-TEST_F(PerformanceMonitorTest, SanitizedLongTaskName_CrossOrigin) {
- HeapHashSet<Member<Frame>> frameContexts;
- // Unable to attribute, when no execution contents are available.
- EXPECT_EQ("unknown", sanitizedLongTaskName(frameContexts, frame()));
-
- // Attribute for same context (and same origin).
- frameContexts.add(anotherFrame());
- EXPECT_EQ("cross-origin-unreachable",
- sanitizedLongTaskName(frameContexts, frame()));
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698