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

Unified Diff: third_party/WebKit/Source/core/dom/NodeTest.cpp

Issue 2078143002: Make plugin elements return false from canStartSelection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/dom/NodeTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/NodeTest.cpp b/third_party/WebKit/Source/core/dom/NodeTest.cpp
index 2a77ff339274a6b01f9e471773682730b71e217a..f826de199a3ac8edb2352b50f4346a4b78cc6301 100644
--- a/third_party/WebKit/Source/core/dom/NodeTest.cpp
+++ b/third_party/WebKit/Source/core/dom/NodeTest.cpp
@@ -36,6 +36,15 @@ TEST_F(NodeTest, canStartSelectionWithShadowDOM)
EXPECT_FALSE(one->firstChild()->canStartSelection());
}
+TEST_F(NodeTest, canStartSelectionWithPlugin)
+{
+ const char* bodyContent = "<embed id=one>";
+ setBodyContent(bodyContent);
+ Node* one = document().getElementById("one");
+
+ EXPECT_FALSE(one->canStartSelection());
+}
+
TEST_F(NodeTest, customElementState)
{
const char* bodyContent = "<div id=div></div>";

Powered by Google App Engine
This is Rietveld 408576698