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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp

Issue 1732753004: ImageInputType::ensurePrimaryContent should recreate UA shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/forms/ImageInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
index ce818dfd24e17cb7f3871fad940f40706733abed..d08fff37583d05b585cc69ff32455230aa952898 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
@@ -70,4 +70,17 @@ TEST(HTMLInputElementTest, DefaultToolTip)
EXPECT_EQ(String(), inputWithForm->defaultToolTip());
}
+// crbug.com/589838
+TEST(HTMLInputElementTest, ImageTypeCrash)
+{
+ RefPtrWillBeRawPtr<Document> document = Document::create();
+ RefPtrWillBeRawPtr<HTMLInputElement> input = HTMLInputElement::create(*document, nullptr, false);
+ input->setAttribute(HTMLNames::typeAttr, "image");
+ input->ensureFallbackContent();
+ // Make sure ensurePrimaryContent() recreates UA shadow tree, and updating
+ // |value| doesn't crash.
+ input->ensurePrimaryContent();
+ input->setAttribute(HTMLNames::valueAttr, "aaa");
+}
+
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/forms/ImageInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698