[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:23:35 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bd6974cf44f34f7751d75177e97f8270827c3bd3
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 11:42:13 2010 +0000

    2010-12-10  Dai Mikurube  <dmikurube at google.com>
    
            Reviewed by Kent Tamura.
    
            Refactor by merging tests for ValidityState (patternMismatch and customError)
            https://bugs.webkit.org/show_bug.cgi?id=50802
    
            * fast/forms/ValidityState-customError-expected.txt: Added.
            * fast/forms/ValidityState-customError.html: Added.
            * fast/forms/ValidityState-customError-001-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
            * fast/forms/ValidityState-customError-001.html: Removed. Merged to ValidityState-customError.html.
            * fast/forms/ValidityState-customError-002-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
            * fast/forms/ValidityState-customError-002.html: Removed. Merged to ValidityState-customError.html.
            * fast/forms/ValidityState-customError-003-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
            * fast/forms/ValidityState-customError-003.html: Removed. Merged to ValidityState-customError.html.
            * fast/forms/ValidityState-customError-004-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
            * fast/forms/ValidityState-customError-004.html: Removed. Merged to ValidityState-customError.html.
            * fast/forms/ValidityState-patternMismatch-expected.txt: Added.
            * fast/forms/ValidityState-patternMismatch.html: Added.
            * fast/forms/ValidityState-patternMismatch-001-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-001.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-002-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-002.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-003-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-003.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-004-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-004.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-005-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-005.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-006-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-006.html: Removed. Merged to ValidityState-patternMismatch.html.
            * fast/forms/ValidityState-patternMismatch-007-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
            * fast/forms/ValidityState-patternMismatch-007.html: Removed. Merged to ValidityState-patternMismatch.html.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f0f288c..991ee56 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,37 @@
+2010-12-10  Dai Mikurube  <dmikurube at google.com>
+
+        Reviewed by Kent Tamura.
+
+        Refactor by merging tests for ValidityState (patternMismatch and customError)
+        https://bugs.webkit.org/show_bug.cgi?id=50802
+
+        * fast/forms/ValidityState-customError-expected.txt: Added.
+        * fast/forms/ValidityState-customError.html: Added.
+        * fast/forms/ValidityState-customError-001-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
+        * fast/forms/ValidityState-customError-001.html: Removed. Merged to ValidityState-customError.html.
+        * fast/forms/ValidityState-customError-002-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
+        * fast/forms/ValidityState-customError-002.html: Removed. Merged to ValidityState-customError.html.
+        * fast/forms/ValidityState-customError-003-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
+        * fast/forms/ValidityState-customError-003.html: Removed. Merged to ValidityState-customError.html.
+        * fast/forms/ValidityState-customError-004-expected.txt: Removed. Merged to ValidityState-customError-expected.txt.
+        * fast/forms/ValidityState-customError-004.html: Removed. Merged to ValidityState-customError.html.
+        * fast/forms/ValidityState-patternMismatch-expected.txt: Added.
+        * fast/forms/ValidityState-patternMismatch.html: Added.
+        * fast/forms/ValidityState-patternMismatch-001-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-001.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-002-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-002.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-003-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-003.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-004-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-004.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-005-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-005.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-006-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-006.html: Removed. Merged to ValidityState-patternMismatch.html.
+        * fast/forms/ValidityState-patternMismatch-007-expected.txt: Removed. Merged to ValidityState-patternMismatch-expected.txt.
+        * fast/forms/ValidityState-patternMismatch-007.html: Removed. Merged to ValidityState-patternMismatch.html.
+
 2010-12-10  Joone Hur  <joone at kldp.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/forms/ValidityState-customError-001-expected.txt b/LayoutTests/fast/forms/ValidityState-customError-001-expected.txt
deleted file mode 100644
index da9498a..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-001-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-   
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-customError-001.html b/LayoutTests/fast/forms/ValidityState-customError-001.html
deleted file mode 100644
index 6571008..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-001.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<head>
-<title>setCustomValidity and customError</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        for (i = 0; i < v.length; i++) {
-            v[i].setCustomValidity("Custom validation message");
-            log(v[i].validity.customError ? "SUCCESS" : "FAILURE");
-        }
-    }
-</script>
-</head>
-<body onload="test()">
-<fieldset name="victim"></fieldset>
-<button name="victim"></button>
-<select name="victim"></select>
-<textarea name="victim"></textarea>
-<input name="victim" />
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-customError-002-expected.txt b/LayoutTests/fast/forms/ValidityState-customError-002-expected.txt
deleted file mode 100644
index da9498a..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-002-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-   
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-customError-002.html b/LayoutTests/fast/forms/ValidityState-customError-002.html
deleted file mode 100644
index 07d2624..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-002.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<html>
-<head>
-<title>setCustomValidity and customError 2</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        for (i = 0; i < v.length; i++)
-            v[i].setCustomValidity("Custom validation message");
-
-        for (i = 0; i < v.length; i++) {
-            v[i].setCustomValidity("");
-            log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
-        }
-    }
-</script>
-</head>
-<body onload="test()">
-<fieldset name="victim"></fieldset>
-<button name="victim"></button>
-<select name="victim"></select>
-<textarea name="victim"></textarea>
-<input name="victim" />
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-customError-003-expected.txt b/LayoutTests/fast/forms/ValidityState-customError-003-expected.txt
deleted file mode 100644
index da9498a..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-003-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-   
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-customError-003.html b/LayoutTests/fast/forms/ValidityState-customError-003.html
deleted file mode 100644
index d162b9f..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-003.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-<head>
-<title>setCustomValidity and customError 2</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        for (i = 0; i < v.length; i++)
-            log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<fieldset name="victim"></fieldset>
-<button name="victim"></button>
-<select name="victim"></select>
-<textarea name="victim"></textarea>
-<input name="victim" />
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-customError-004-expected.txt b/LayoutTests/fast/forms/ValidityState-customError-004-expected.txt
deleted file mode 100644
index 7e2a4b0..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-004-expected.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-   
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-customError-004.html b/LayoutTests/fast/forms/ValidityState-customError-004.html
deleted file mode 100644
index dfaa8fb..0000000
--- a/LayoutTests/fast/forms/ValidityState-customError-004.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html>
-<head>
-<title>setCustomValidity and customError 4</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-
-        // Blank
-        for (i = 0; i < v.length; i++) {
-            v[i].setCustomValidity("Custom string");
-            v[i].setCustomValidity();
-            log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
-            v[i].setCustomValidity("one", "two", "three");
-            log(v[i].validity.customError ? "SUCCESS" : "FAILURE");
-            v[i].setCustomValidity(null);
-            log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
-            v[i].setCustomValidity("Custom string");
-            v[i].setCustomValidity(undefined);
-            log(!v[i].validity.customError ? "SUCCESS" : "FAILURE");
-        }
-    }
-</script>
-</head>
-<body onload="test()">
-<fieldset name="victim"></fieldset>
-<button name="victim"></button>
-<select name="victim"></select>
-<textarea name="victim"></textarea>
-<input name="victim" />
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-customError-expected.txt b/LayoutTests/fast/forms/ValidityState-customError-expected.txt
new file mode 100644
index 0000000..940a3b7
--- /dev/null
+++ b/LayoutTests/fast/forms/ValidityState-customError-expected.txt
@@ -0,0 +1,77 @@
+This test checks validity.customError.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Set some value for customError.
+PASS customErrorFor("fieldset-set") is true
+PASS customErrorFor("button-set") is true
+PASS customErrorFor("button-button-set") is true
+PASS customErrorFor("button-reset-set") is true
+PASS customErrorFor("select-set") is true
+PASS customErrorFor("textarea-set") is true
+PASS customErrorFor("input-set") is true
+PASS customErrorFor("input-submit-set") is true
+
+Set some value for customError, and clear it.
+PASS customErrorFor("fieldset-set-and-empty") is false
+PASS customErrorFor("button-set-and-empty") is false
+PASS customErrorFor("button-button-set-and-empty") is false
+PASS customErrorFor("button-reset-set-and-empty") is false
+PASS customErrorFor("select-set-and-empty") is false
+PASS customErrorFor("textarea-set-and-empty") is false
+PASS customErrorFor("input-set-and-empty") is false
+PASS customErrorFor("input-submit-set-and-empty") is false
+
+Not any changes for customError.
+PASS customErrorFor("fieldset-no-changes") is false
+PASS customErrorFor("button-no-changes") is false
+PASS customErrorFor("button-button-no-changes") is false
+PASS customErrorFor("button-reset-no-changes") is false
+PASS customErrorFor("select-no-changes") is false
+PASS customErrorFor("textarea-no-changes") is false
+PASS customErrorFor("input-no-changes") is false
+PASS customErrorFor("input-submit-no-changes") is false
+
+Many changes for customError:
+Set some value, and set with no arguments.
+PASS customErrorFor("fieldset-many-changes") is false
+PASS customErrorFor("button-many-changes") is false
+PASS customErrorFor("button-button-many-changes") is false
+PASS customErrorFor("button-reset-many-changes") is false
+PASS customErrorFor("select-many-changes") is false
+PASS customErrorFor("textarea-many-changes") is false
+PASS customErrorFor("input-many-changes") is false
+PASS customErrorFor("input-submit-many-changes") is false
+Set with three arguments.
+PASS customErrorFor("fieldset-many-changes") is true
+PASS customErrorFor("button-many-changes") is true
+PASS customErrorFor("button-button-many-changes") is true
+PASS customErrorFor("button-reset-many-changes") is true
+PASS customErrorFor("select-many-changes") is true
+PASS customErrorFor("textarea-many-changes") is true
+PASS customErrorFor("input-many-changes") is true
+PASS customErrorFor("input-submit-many-changes") is true
+Set null.
+PASS customErrorFor("fieldset-many-changes") is false
+PASS customErrorFor("button-many-changes") is false
+PASS customErrorFor("button-button-many-changes") is false
+PASS customErrorFor("button-reset-many-changes") is false
+PASS customErrorFor("select-many-changes") is false
+PASS customErrorFor("textarea-many-changes") is false
+PASS customErrorFor("input-many-changes") is false
+PASS customErrorFor("input-submit-many-changes") is false
+Set some value, and set undefined.
+PASS customErrorFor("fieldset-many-changes") is false
+PASS customErrorFor("button-many-changes") is false
+PASS customErrorFor("button-button-many-changes") is false
+PASS customErrorFor("button-reset-many-changes") is false
+PASS customErrorFor("select-many-changes") is false
+PASS customErrorFor("textarea-many-changes") is false
+PASS customErrorFor("input-many-changes") is false
+PASS customErrorFor("input-submit-many-changes") is false
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+                           
diff --git a/LayoutTests/fast/forms/ValidityState-customError.html b/LayoutTests/fast/forms/ValidityState-customError.html
new file mode 100644
index 0000000..6de7a3c
--- /dev/null
+++ b/LayoutTests/fast/forms/ValidityState-customError.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<fieldset name="set" id="fieldset-set"></fieldset>
+<button   name="set" id="button-set"></button>
+<button   name="set" id="button-button-set" type="button"></button>
+<button   name="set" id="button-reset-set" type="reset"></button>
+<select   name="set" id="select-set"></select>
+<textarea name="set" id="textarea-set"></textarea>
+<input    name="set" id="input-set" />
+<input    name="set" id="input-submit-set" type="submit" />
+
+<fieldset name="set-and-empty" id="fieldset-set-and-empty"></fieldset>
+<button   name="set-and-empty" id="button-set-and-empty"></button>
+<button   name="set-and-empty" id="button-button-set-and-empty" type="button"></button>
+<button   name="set-and-empty" id="button-reset-set-and-empty" type="reset"></button>
+<select   name="set-and-empty" id="select-set-and-empty"></select>
+<textarea name="set-and-empty" id="textarea-set-and-empty"></textarea>
+<input    name="set-and-empty" id="input-set-and-empty" />
+<input    name="set-and-empty" id="input-submit-set-and-empty" type="submit" />
+
+<fieldset name="no-changes" id="fieldset-no-changes"></fieldset>
+<button   name="no-changes" id="button-no-changes"></button>
+<button   name="no-changes" id="button-button-no-changes" type="button"></button>
+<button   name="no-changes" id="button-reset-no-changes" type="reset"></button>
+<select   name="no-changes" id="select-no-changes"></select>
+<textarea name="no-changes" id="textarea-no-changes"></textarea>
+<input    name="no-changes" id="input-no-changes" />
+<input    name="no-changes" id="input-submit-no-changes" type="submit" />
+
+<fieldset name="many-changes" id="fieldset-many-changes"></fieldset>
+<button   name="many-changes" id="button-many-changes"></button>
+<button   name="many-changes" id="button-button-many-changes" type="button"></button>
+<button   name="many-changes" id="button-reset-many-changes" type="reset"></button>
+<select   name="many-changes" id="select-many-changes"></select>
+<textarea name="many-changes" id="textarea-many-changes"></textarea>
+<input    name="many-changes" id="input-many-changes" />
+<input    name="many-changes" id="input-submit-many-changes" type="submit" />
+
+<script language="JavaScript" type="text/javascript">
+function customErrorFor(id) {
+    return document.getElementById(id).validity.customError;
+}
+
+description("This test checks validity.customError.");
+
+debug('Set some value for customError.');
+v = document.getElementsByName("set");
+for (i = 0; i < v.length; i++)
+    v[i].setCustomValidity("Custom validation message");
+shouldBeTrue('customErrorFor("fieldset-set")');
+shouldBeTrue('customErrorFor("button-set")');
+shouldBeTrue('customErrorFor("button-button-set")');
+shouldBeTrue('customErrorFor("button-reset-set")');
+shouldBeTrue('customErrorFor("select-set")');
+shouldBeTrue('customErrorFor("textarea-set")');
+shouldBeTrue('customErrorFor("input-set")');
+shouldBeTrue('customErrorFor("input-submit-set")');
+
+debug('');
+debug('Set some value for customError, and clear it.');
+v = document.getElementsByName("set-and-empty");
+for (i = 0; i < v.length; i++)
+    v[i].setCustomValidity("Custom validation message");
+for (i = 0; i < v.length; i++)
+    v[i].setCustomValidity("");
+shouldBeFalse('customErrorFor("fieldset-set-and-empty")');
+shouldBeFalse('customErrorFor("button-set-and-empty")');
+shouldBeFalse('customErrorFor("button-button-set-and-empty")');
+shouldBeFalse('customErrorFor("button-reset-set-and-empty")');
+shouldBeFalse('customErrorFor("select-set-and-empty")');
+shouldBeFalse('customErrorFor("textarea-set-and-empty")');
+shouldBeFalse('customErrorFor("input-set-and-empty")');
+shouldBeFalse('customErrorFor("input-submit-set-and-empty")');
+
+debug('');
+debug('Not any changes for customError.');
+shouldBeFalse('customErrorFor("fieldset-no-changes")');
+shouldBeFalse('customErrorFor("button-no-changes")');
+shouldBeFalse('customErrorFor("button-button-no-changes")');
+shouldBeFalse('customErrorFor("button-reset-no-changes")');
+shouldBeFalse('customErrorFor("select-no-changes")');
+shouldBeFalse('customErrorFor("textarea-no-changes")');
+shouldBeFalse('customErrorFor("input-no-changes")');
+shouldBeFalse('customErrorFor("input-submit-no-changes")');
+
+debug('');
+debug('Many changes for customError:');
+debug('Set some value, and set with no arguments.');
+v = document.getElementsByName("many-changes");
+for (i = 0; i < v.length; i++) {
+    v[i].setCustomValidity("Custom string");
+    v[i].setCustomValidity();
+}
+shouldBeFalse('customErrorFor("fieldset-many-changes")');
+shouldBeFalse('customErrorFor("button-many-changes")');
+shouldBeFalse('customErrorFor("button-button-many-changes")');
+shouldBeFalse('customErrorFor("button-reset-many-changes")');
+shouldBeFalse('customErrorFor("select-many-changes")');
+shouldBeFalse('customErrorFor("textarea-many-changes")');
+shouldBeFalse('customErrorFor("input-many-changes")');
+shouldBeFalse('customErrorFor("input-submit-many-changes")');
+
+debug('Set with three arguments.');
+for (i = 0; i < v.length; i++)
+    v[i].setCustomValidity("one", "two", "three");
+shouldBeTrue('customErrorFor("fieldset-many-changes")');
+shouldBeTrue('customErrorFor("button-many-changes")');
+shouldBeTrue('customErrorFor("button-button-many-changes")');
+shouldBeTrue('customErrorFor("button-reset-many-changes")');
+shouldBeTrue('customErrorFor("select-many-changes")');
+shouldBeTrue('customErrorFor("textarea-many-changes")');
+shouldBeTrue('customErrorFor("input-many-changes")');
+shouldBeTrue('customErrorFor("input-submit-many-changes")');
+
+debug('Set null.');
+for (i = 0; i < v.length; i++)
+    v[i].setCustomValidity(null);
+shouldBeFalse('customErrorFor("fieldset-many-changes")');
+shouldBeFalse('customErrorFor("button-many-changes")');
+shouldBeFalse('customErrorFor("button-button-many-changes")');
+shouldBeFalse('customErrorFor("button-reset-many-changes")');
+shouldBeFalse('customErrorFor("select-many-changes")');
+shouldBeFalse('customErrorFor("textarea-many-changes")');
+shouldBeFalse('customErrorFor("input-many-changes")');
+shouldBeFalse('customErrorFor("input-submit-many-changes")');
+
+debug('Set some value, and set undefined.');
+for (i = 0; i < v.length; i++) {
+    v[i].setCustomValidity("Custom string");
+    v[i].setCustomValidity(undefined);
+}
+shouldBeFalse('customErrorFor("fieldset-many-changes")');
+shouldBeFalse('customErrorFor("button-many-changes")');
+shouldBeFalse('customErrorFor("button-button-many-changes")');
+shouldBeFalse('customErrorFor("button-reset-many-changes")');
+shouldBeFalse('customErrorFor("select-many-changes")');
+shouldBeFalse('customErrorFor("textarea-many-changes")');
+shouldBeFalse('customErrorFor("input-many-changes")');
+shouldBeFalse('customErrorFor("input-submit-many-changes")');
+
+debug('');
+
+var successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-001-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-001-expected.txt
deleted file mode 100644
index 423e4fc..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-001-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-There is an input type text with pattern attribute set to [0-9][A-Z]{3}, checking its validity.patternMismatch flag.
-
-
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-001.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-001.html
deleted file mode 100644
index 37c4a9d..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-001.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<p>There is an input type text with pattern attribute set to [0-9][A-Z]{3}, checking its validity.patternMismatch flag.</p>
-<input name="victim" pattern="[0-9][A-Z]{3}" value="0AAA"/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-002-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-002-expected.txt
deleted file mode 100644
index d162484..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-002-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-There is an input type text with no pattern attribute.
-
-
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-002.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-002.html
deleted file mode 100644
index a6071c2..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-002.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 2</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<p>There is an input type text with no pattern attribute.</p>
-<input name="victim" />
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-003-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-003-expected.txt
deleted file mode 100644
index 9a11495..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-003-expected.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-IP Address:  Email address:                  
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-003.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-003.html
deleted file mode 100644
index 358128f..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-003.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 3</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        for (i = 0; i < v.length; i++)
-            log(!v[i].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-IP Address:
-<input name="victim" type="text" pattern="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" value="127.0.0.1" />
-Email address:
-<input name="victim" type="text" pattern="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" value="someone at somewhere.com" />
-<input name="victim" type="text" pattern="\b(word1|word2|word3)(?:\W+\w+){1,6}?\W+(word1|word2|word3)\b" value="word1 near word2" />
-<input name="victim" type="text" pattern=".{5,}" value="12345" />
-<input name="victim" type="text" pattern=".{5,}" value="*(@$!" />
-<input name="victim" type="text" pattern=".{5,}" value="*(@^$!" />
-<input name="victim" type="text" pattern="0|1|2|3|4|5|6|7|8|" value="3" />
-<input name="victim" type="text" pattern="^(foo).*" value="foo"/>
-<input name="victim" type="text" pattern="^(foo).*" value="fooo"/>
-<input name="victim" type="text" pattern="\w" value="f"/>
-<input name="victim" type="text" pattern="\." value="."/>
-<input name="victim" type="text" pattern="\)\(" value=")("/>
-<input name="victim" type="text" pattern="ab" value="ab"/>
-<input name="victim" type="text" pattern="^ab" value="ab"/>
-<input name="victim" type="text" pattern="^\(" value="("/>
-<input name="victim" type="text" pattern="...\)\(..." value="aaa)(bbb"/>
-<input name="victim" type="text" pattern="^" value=""/>
-<input name="victim" type="text" pattern="$" value=""/>
-<input name="victim" type="text" pattern="foobar" value=""/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-004-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-004-expected.txt
deleted file mode 100644
index dfa0a36..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-004-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-004.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-004.html
deleted file mode 100644
index 14fcf1b..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-004.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 4</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-
-        log(v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-        v[0].value = "someone at somewhere.com";
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<input name="victim" type="text" pattern="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" value="Wrong!"/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-005-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-005-expected.txt
deleted file mode 100644
index 6d76630..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-005-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-005.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-005.html
deleted file mode 100644
index e2da0b9..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-005.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 5</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-
-        log(v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-        v[0].value = "gray";
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-        v[0].value = "grey";
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-        v[0].value = "";
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<input name="victim" type="text" pattern="gr[ae]y" value="Wrong!"/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-006-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-006-expected.txt
deleted file mode 100644
index 6390cdc..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-006-expected.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-                   
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-006.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-006.html
deleted file mode 100644
index acfdaf8..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-006.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 6</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-        for (i = 0; i < v.length; i++)
-            log(v[i].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<input name="victim" type="text" pattern="((4\.[0-3])|(2\.[0-3]))" value="Something 4.0"/>
-<input name="victim" type="text" pattern="\w" value="*"/>
-<input name="victim" type="email" pattern="[0-9]" value="something"/>
-<input name="victim" type="text" pattern=".{5,}" value="1234" />
-<input name="victim" type="text" pattern=".{5,}" value="*)$!" />
-<input name="victim" type="text" pattern=".{5,}" value="(^$!" />
-<input name="victim" type="text" pattern="0|1|2|3|4|5|6|7|8|" value="a" />
-<input name="victim" type="text" pattern="^(foo).*" value="a foo"/>
-<input name="victim" type="text" pattern="\w" value="134"/>
-<input name="victim" type="text" pattern="\." value="\."/>
-<input name="victim" type="text" pattern="\)\(" value=") ("/>
-<input name="victim" type="text" pattern="ab" value="a"/>
-<input name="victim" type="text" pattern="ab" value="b"/>
-<input name="victim" type="text" pattern="^ab" value="abc"/>
-<input name="victim" type="text" pattern="^\(" value="(something"/>
-<input name="victim" type="text" pattern="\)\\" value="something)\"/>
-<input name="victim" type="text" pattern="...\)\([b]{3}" value="adf)(bbbTEST"/>
-<input name="victim" type="text" pattern="foo\\" value="food"/>
-<input name="victim" type="text" pattern="^" value="wrong"/>
-<input name="victim" type="text" pattern="$" value="wrong"/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-007-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-007-expected.txt
deleted file mode 100644
index c1dcecc..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-007-expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-SUCCESS
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-007.html b/LayoutTests/fast/forms/ValidityState-patternMismatch-007.html
deleted file mode 100644
index d8c7ef6..0000000
--- a/LayoutTests/fast/forms/ValidityState-patternMismatch-007.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title>basic patternMismatch test 7</title>
-<script language="JavaScript" type="text/javascript">
-    function log(message) {
-        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
-    }
-
-    function test() {
-        if (window.layoutTestController)
-            layoutTestController.dumpAsText();
-
-        v = document.getElementsByName("victim");
-
-        log(!v[0].validity.patternMismatch ? "SUCCESS" : "FAILURE");
-    }
-</script>
-</head>
-<body onload="test()">
-<input name="victim" type="text" pattern="" value="Lorem Ipsum"/>
-<hr>
-<ol id="console"></ol>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch-expected.txt b/LayoutTests/fast/forms/ValidityState-patternMismatch-expected.txt
new file mode 100644
index 0000000..29687e4
--- /dev/null
+++ b/LayoutTests/fast/forms/ValidityState-patternMismatch-expected.txt
@@ -0,0 +1,57 @@
+This test checks validity.patternMismatch.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS patternMismatchFor("simple") is false
+PASS patternMismatchFor("no-pattern-and-no-value") is false
+PASS patternMismatchFor("ip-address") is false
+PASS patternMismatchFor("email-address") is false
+PASS patternMismatchFor("wrong-email-address") is true
+PASS patternMismatchFor("match-1") is false
+PASS patternMismatchFor("match-2") is false
+PASS patternMismatchFor("match-3") is false
+PASS patternMismatchFor("match-4") is false
+PASS patternMismatchFor("match-5") is false
+PASS patternMismatchFor("match-6") is false
+PASS patternMismatchFor("match-7") is false
+PASS patternMismatchFor("match-8") is false
+PASS patternMismatchFor("match-9") is false
+PASS patternMismatchFor("match-10") is false
+PASS patternMismatchFor("match-11") is false
+PASS patternMismatchFor("match-12") is false
+PASS patternMismatchFor("match-13") is false
+PASS patternMismatchFor("match-14") is false
+PASS patternMismatchFor("match-15") is false
+PASS patternMismatchFor("match-16") is false
+PASS patternMismatchFor("match-17") is false
+PASS patternMismatchFor("wrong-gray-or-grey") is true
+PASS patternMismatchFor("gray") is false
+PASS patternMismatchFor("grey") is false
+PASS patternMismatchFor("empty-gray-or-grey") is false
+PASS patternMismatchFor("mismatch-1") is true
+PASS patternMismatchFor("mismatch-2") is true
+PASS patternMismatchFor("mismatch-3") is true
+PASS patternMismatchFor("mismatch-4") is true
+PASS patternMismatchFor("mismatch-5") is true
+PASS patternMismatchFor("mismatch-6") is true
+PASS patternMismatchFor("mismatch-7") is true
+PASS patternMismatchFor("mismatch-8") is true
+PASS patternMismatchFor("mismatch-9") is true
+PASS patternMismatchFor("mismatch-10") is true
+PASS patternMismatchFor("mismatch-11") is true
+PASS patternMismatchFor("mismatch-12") is true
+PASS patternMismatchFor("mismatch-13") is true
+PASS patternMismatchFor("mismatch-14") is true
+PASS patternMismatchFor("mismatch-15") is true
+PASS patternMismatchFor("mismatch-16") is true
+PASS patternMismatchFor("mismatch-17") is true
+PASS patternMismatchFor("mismatch-18") is true
+PASS patternMismatchFor("mismatch-19") is true
+PASS patternMismatchFor("mismatch-20") is true
+PASS patternMismatchFor("empty-pattern") is false
+PASS patternMismatchFor("disabled") is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+                                                     
diff --git a/LayoutTests/fast/forms/ValidityState-patternMismatch.html b/LayoutTests/fast/forms/ValidityState-patternMismatch.html
new file mode 100644
index 0000000..1ec1816
--- /dev/null
+++ b/LayoutTests/fast/forms/ValidityState-patternMismatch.html
@@ -0,0 +1,132 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<input id="simple" pattern="[0-9][A-Z]{3}" value="0AAA"/>
+
+<input id="no-pattern-and-no-value" />
+
+<input id="ip-address" type="text" pattern="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" value="127.0.0.1" />
+<input id="email-address" type="text" pattern="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" value="someone at somewhere.com" />
+<input id="wrong-email-address" type="text" pattern="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" value="Wrong!"/>
+
+<input id="match-1" type="text" pattern="\b(word1|word2|word3)(?:\W+\w+){1,6}?\W+(word1|word2|word3)\b" value="word1 near word2" />
+<input id="match-2" type="text" pattern=".{5,}" value="12345" />
+<input id="match-3" type="text" pattern=".{5,}" value="*(@$!" />
+<input id="match-4" type="text" pattern=".{5,}" value="*(@^$!" />
+<input id="match-5" type="text" pattern="0|1|2|3|4|5|6|7|8|" value="3" />
+<input id="match-6" type="text" pattern="^(foo).*" value="foo"/>
+<input id="match-7" type="text" pattern="^(foo).*" value="fooo"/>
+<input id="match-8" type="text" pattern="\w" value="f"/>
+<input id="match-9" type="text" pattern="\." value="."/>
+<input id="match-10" type="text" pattern="\)\(" value=")("/>
+<input id="match-11" type="text" pattern="ab" value="ab"/>
+<input id="match-12" type="text" pattern="^ab" value="ab"/>
+<input id="match-13" type="text" pattern="^\(" value="("/>
+<input id="match-14" type="text" pattern="...\)\(..." value="aaa)(bbb"/>
+<input id="match-15" type="text" pattern="^" value=""/>
+<input id="match-16" type="text" pattern="$" value=""/>
+<input id="match-17" type="text" pattern="foobar" value=""/>
+
+<input id="wrong-gray-or-grey" type="text" pattern="gr[ae]y" value="Wrong!"/>
+<input id="gray" type="text" pattern="gr[ae]y" value="gray"/>
+<input id="grey" type="text" pattern="gr[ae]y" value="grey"/>
+<input id="empty-gray-or-grey" type="text" pattern="gr[ae]y" value=""/>
+
+<input id="mismatch-1" type="text" pattern="((4\.[0-3])|(2\.[0-3]))" value="Something 4.0"/>
+<input id="mismatch-2" type="text" pattern="\w" value="*"/>
+<input id="mismatch-3" type="email" pattern="[0-9]" value="something"/>
+<input id="mismatch-4" type="text" pattern=".{5,}" value="1234" />
+<input id="mismatch-5" type="text" pattern=".{5,}" value="*)$!" />
+<input id="mismatch-6" type="text" pattern=".{5,}" value="(^$!" />
+<input id="mismatch-7" type="text" pattern="0|1|2|3|4|5|6|7|8|" value="a" />
+<input id="mismatch-8" type="text" pattern="^(foo).*" value="a foo"/>
+<input id="mismatch-9" type="text" pattern="\w" value="134"/>
+<input id="mismatch-10" type="text" pattern="\." value="\."/>
+<input id="mismatch-11" type="text" pattern="\)\(" value=") ("/>
+<input id="mismatch-12" type="text" pattern="ab" value="a"/>
+<input id="mismatch-13" type="text" pattern="ab" value="b"/>
+<input id="mismatch-14" type="text" pattern="^ab" value="abc"/>
+<input id="mismatch-15" type="text" pattern="^\(" value="(something"/>
+<input id="mismatch-16" type="text" pattern="\)\\" value="something)\"/>
+<input id="mismatch-17" type="text" pattern="...\)\([b]{3}" value="adf)(bbbTEST"/>
+<input id="mismatch-18" type="text" pattern="foo\\" value="food"/>
+<input id="mismatch-19" type="text" pattern="^" value="wrong"/>
+<input id="mismatch-20" type="text" pattern="$" value="wrong"/>
+
+<input id="empty-pattern" type="text" pattern="" value="Lorem Ipsum"/>
+
+<input id="disabled" pattern="[0-9][A-Z]{3}" value="00AA" disabled />
+
+<script language="JavaScript" type="text/javascript">
+function patternMismatchFor(id) {
+    return document.getElementById(id).validity.patternMismatch;
+}
+
+description("This test checks validity.patternMismatch.");
+
+shouldBeFalse('patternMismatchFor("simple")');
+shouldBeFalse('patternMismatchFor("no-pattern-and-no-value")');
+shouldBeFalse('patternMismatchFor("ip-address")');
+shouldBeFalse('patternMismatchFor("email-address")');
+shouldBeTrue('patternMismatchFor("wrong-email-address")');
+
+shouldBeFalse('patternMismatchFor("match-1")');
+shouldBeFalse('patternMismatchFor("match-2")');
+shouldBeFalse('patternMismatchFor("match-3")');
+shouldBeFalse('patternMismatchFor("match-4")');
+shouldBeFalse('patternMismatchFor("match-5")');
+shouldBeFalse('patternMismatchFor("match-6")');
+shouldBeFalse('patternMismatchFor("match-7")');
+shouldBeFalse('patternMismatchFor("match-8")');
+shouldBeFalse('patternMismatchFor("match-9")');
+shouldBeFalse('patternMismatchFor("match-10")');
+shouldBeFalse('patternMismatchFor("match-11")');
+shouldBeFalse('patternMismatchFor("match-12")');
+shouldBeFalse('patternMismatchFor("match-13")');
+shouldBeFalse('patternMismatchFor("match-14")');
+shouldBeFalse('patternMismatchFor("match-15")');
+shouldBeFalse('patternMismatchFor("match-16")');
+shouldBeFalse('patternMismatchFor("match-17")');
+
+shouldBeTrue('patternMismatchFor("wrong-gray-or-grey")');
+shouldBeFalse('patternMismatchFor("gray")');
+shouldBeFalse('patternMismatchFor("grey")');
+shouldBeFalse('patternMismatchFor("empty-gray-or-grey")');
+
+shouldBeTrue('patternMismatchFor("mismatch-1")');
+shouldBeTrue('patternMismatchFor("mismatch-2")');
+shouldBeTrue('patternMismatchFor("mismatch-3")');
+shouldBeTrue('patternMismatchFor("mismatch-4")');
+shouldBeTrue('patternMismatchFor("mismatch-5")');
+shouldBeTrue('patternMismatchFor("mismatch-6")');
+shouldBeTrue('patternMismatchFor("mismatch-7")');
+shouldBeTrue('patternMismatchFor("mismatch-8")');
+shouldBeTrue('patternMismatchFor("mismatch-9")');
+shouldBeTrue('patternMismatchFor("mismatch-10")');
+shouldBeTrue('patternMismatchFor("mismatch-11")');
+shouldBeTrue('patternMismatchFor("mismatch-12")');
+shouldBeTrue('patternMismatchFor("mismatch-13")');
+shouldBeTrue('patternMismatchFor("mismatch-14")');
+shouldBeTrue('patternMismatchFor("mismatch-15")');
+shouldBeTrue('patternMismatchFor("mismatch-16")');
+shouldBeTrue('patternMismatchFor("mismatch-17")');
+shouldBeTrue('patternMismatchFor("mismatch-18")');
+shouldBeTrue('patternMismatchFor("mismatch-19")');
+shouldBeTrue('patternMismatchFor("mismatch-20")');
+
+shouldBeFalse('patternMismatchFor("empty-pattern")');
+
+shouldBeTrue('patternMismatchFor("disabled")');
+
+var successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list