From 957e1d8e7ad141d5ed95e0206f0f66326cd6f042 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 20 Oct 2016 00:00:57 -0400 Subject: [PATCH] Make 'reset-form.html' test more granular. --- .../resetting-a-form/reset-form.html.ini | 6 +++--- .../forms/resetting-a-form/reset-form.html | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini b/tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini index c2ff574ea9f..7a0f14f6953 100644 --- a/tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/resetting-a-form/reset-form.html.ini @@ -1,11 +1,11 @@ [reset-form.html] type: testharness - [Resetting the form by calling the reset() method] + [Resetting by calling the reset() method] expected: FAIL - [Resetting the form by clicking the button in reset status] + [Resetting by clicking the button in reset status] expected: FAIL - [Resetting the form by clicking the input in reset status] + [Resetting by clicking the input in reset status] expected: FAIL diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html b/tests/wpt/web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html index b74b52c46e4..7654cedbeb1 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html @@ -87,10 +87,25 @@ function runTest(reset, description) { assert_false(document.getElementById("rd2").checked, "The checked attribute of the input element in radio should be false."); assert_true(document.getElementById("cb1").checked, "The checked attribute of the input element in checkbox should be true."); assert_false(document.getElementById("cb2").checked, "The checked attribute of the input element in checkbox should be false."); + }, "Resetting " + description); + + test(function() { + setPreconditions("Setting preconditions for resetting " + description); + reset(); assert_equals(document.getElementById("ta").value, document.getElementById("ta").textContent, "The value attribute of the textarea element should be reset."); assert_equals(document.getElementById("ta").value, "abc", "The value attribute of the textarea element should be 'abc'."); + }, "Resetting