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

Unified Diff: LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html

Issue 225023034: Make sure named item cache is always valid HTMLCollection::updateIdNameCache() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move constructor to cpp Created 6 years, 8 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 | LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html
diff --git a/LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html b/LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..c8ffd36e9f343c7d1fdf43dafddbfa3644797acf
--- /dev/null
+++ b/LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Makes sure HTMLCollection.namedItem() does not crash for collection of selected options.");
+debug("This test passes if it does not crash.");
+
+var select = document.createElement("select");
+var options = select.selectedOptions;
+select.length = 10;
+shouldBeNull('options.namedItem("test")');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/htmlcollection-selectedOptions-namedItem-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698