Index: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
index 46c4fd278adfa5bc72e953f58325a645ee5455e3..dccd9db617a517e67eab087aa1dad1136fbbd1ec 100644 |
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp |
@@ -214,4 +214,12 @@ TEST_F(FrameSelectionTest, setNonDirectionalSelectionIfNeeded) |
EXPECT_EQ(PositionInComposedTree(bottom, 3), visibleSelectionInComposedTree().end()); |
} |
+TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot) |
+{ |
+ RefPtrWillBeRawPtr<Element> select = document().createElement("select", ASSERT_NO_EXCEPTION); |
+ document().replaceChild(select.get(), document().documentElement()); |
+ selection().selectAll(); |
+ EXPECT_TRUE(selection().isNone()) << "Nothing should be selected if the content of the documentElement is not selctable."; |
+} |
+ |
} // namespace blink |