summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp b/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
index 5236bf468ff..5e9b5b01cad 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
@@ -11821,6 +11821,20 @@ TEST_P(WebFrameSimTest, ScrollOriginChangeUpdatesLayerPositions) {
EXPECT_EQ(0, area->LayerForScrolling()->GetPosition().X());
}
+TEST_P(WebFrameSimTest, NamedLookupIgnoresEmptyNames) {
+ SimRequest main_resource("https://example.com/main.html", "text/html");
+ LoadURL("https://example.com/main.html");
+ main_resource.Complete(R"HTML(
+ <body>
+ <iframe name="" src="data:text/html,"></iframe>
+ </body>)HTML");
+
+ EXPECT_EQ(nullptr, MainFrame().GetFrame()->Tree().ScopedChild(""));
+ EXPECT_EQ(nullptr,
+ MainFrame().GetFrame()->Tree().ScopedChild(AtomicString()));
+ EXPECT_EQ(nullptr, MainFrame().GetFrame()->Tree().ScopedChild(g_empty_atom));
+}
+
TEST_P(ParameterizedWebFrameTest, NoLoadingCompletionCallbacksInDetach) {
class LoadingObserverFrameClient
: public FrameTestHelpers::TestWebFrameClient {