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

Unified Diff: LayoutTests/fast/forms/pattern-attribute-invalid-regex.html

Issue 13896017: Switch RegularExpression from YARR to V8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review from adamk and abarth Created 7 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
Index: LayoutTests/fast/forms/pattern-attribute-invalid-regex.html
diff --git a/LayoutTests/fast/forms/pattern-attribute-invalid-regex.html b/LayoutTests/fast/forms/pattern-attribute-invalid-regex.html
new file mode 100644
index 0000000000000000000000000000000000000000..1352f4f6ed51584ec0d5cc848167e8dc0e166e04
--- /dev/null
+++ b/LayoutTests/fast/forms/pattern-attribute-invalid-regex.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+
+<script>
+description('Check if the pattern constraint is ignored when the regex is invalid.');
+
+var input = document.createElement('input');
+input.pattern = '[0-9'; // missing a ]
+input.value = '11';
+
+// pattern should have been ignored.
+shouldBe('input.validity.patternMismatch', 'false');
+</script>
+
+<script src="../../fast/js/resources/js-test-post.js"></script>

Powered by Google App Engine
This is Rietveld 408576698