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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp

Issue 2381163003: Handle cross origin with src attribution for descendants (Closed)
Patch Set: check for document() in addition to DOMWindow 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
Index: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp
index 066e35ba5fabba1a789e8daa14479f47dd0a5391..c0383b722d78423b8c600bc5939803b522e9eee7 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp
@@ -141,4 +141,16 @@ TEST_F(InspectorWebPerfAgentTest, SanitizedLongTaskName)
sanitizedLongTaskName(frameContextLocations, frame()));
}
+TEST_F(InspectorWebPerfAgentTest, SanitizedLongTaskName_CrossOrigin)
skobes 2016/09/30 21:45:01 As discussed offline I think it should not be too
panicker 2016/09/30 22:57:15 I tried this today (again), it adds non-trivial se
skobes 2016/09/30 23:00:16 Acknowledged.
+{
+ HeapHashSet<Member<Location>> frameContextLocations;
+ // Unable to attribute, when no execution contents are available.
+ EXPECT_EQ("unknown",
+ sanitizedLongTaskName(frameContextLocations, frame()));
+
+ frameContextLocations.add(Location::create(anotherFrame()));
+ EXPECT_EQ("cross-origin",
+ sanitizedLongTaskName(frameContextLocations, frame()));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698