Chromium Code Reviews| Index: Source/core/editing/FrameSelectionTest.cpp |
| diff --git a/Source/core/editing/FrameSelectionTest.cpp b/Source/core/editing/FrameSelectionTest.cpp |
| index 39b8957fbe3b9715d048b3f39cba35b0226effe1..1668d4410bdb4f1b0e82610197f9c4f367b4d578 100644 |
| --- a/Source/core/editing/FrameSelectionTest.cpp |
| +++ b/Source/core/editing/FrameSelectionTest.cpp |
| @@ -8,10 +8,12 @@ |
| #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/Element.h" |
| +#include "core/dom/NodeList.h" |
| #include "core/dom/Text.h" |
| #include "core/frame/FrameView.h" |
| #include "core/html/HTMLBodyElement.h" |
| #include "core/html/HTMLDocument.h" |
| +#include "core/html/HTMLTextFormControlElement.h" |
| #include "core/testing/DummyPageHolder.h" |
| #include "wtf/OwnPtr.h" |
| #include "wtf/PassRefPtr.h" |
| @@ -138,4 +140,16 @@ TEST_F(FrameSelectionTest, PaintCaretShouldNotLayout) |
| EXPECT_EQ(startCount, layoutCount()); |
| } |
| +TEST_F(FrameSelectionTest, UpdateAppearanceOnTextArea) |
| +{ |
| + document().documentElement()->setInnerHTML("<body><textarea id=textarea>text\ntext</textarea></body>", ASSERT_NO_EXCEPTION); |
| + document().view()->updateLayoutAndStyleIfNeededRecursive(); |
| + HTMLTextFormControlElement* textform = toHTMLTextFormControlElement(document().getElementById("textarea")); |
| + RefPtrWillBeRawPtr<NodeList> nodeList = textform->innerEditorElement()->childNodes(); |
| + EXPECT_EQ(3, nodeList->length()); |
| + Node* node = nodeList->item(2); |
| + node->setRenderer(nullptr); |
|
Yuta Kitamura
2014/10/01 08:19:48
I'm almost certain that you shouldn't simply call
Yuta Kitamura
2014/10/01 08:49:32
I have little knowledge around this, but you could
|
| + textform->setSelectionRange(2, 7); |
| +} |
| + |
| } |