[Webkit-unassigned] [Bug 16750] text field element fails to match :checked (Acid3 bug)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 5 14:20:22 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16750


eric at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|input element fails to match|text field element fails to
                   |:checked (Acid3 bug)        |match :checked (Acid3 bug)




------- Comment #1 from eric at webkit.org  2008-01-05 14:20 PDT -------
Test 43: FAIL (expected 0, got 1 - text field matched :checked)

The full test:
    function () {
      // test 43: :enabled, :disabled, :checked, etc
      selectorTest(function (doc, add, expect) {
        var input = doc.createElement('input');
        input.type = 'checkbox';
        doc.body.appendChild(input);
        var neither = 0;
        var both = add(":checked:enabled");
        var checked = add(":checked");
        var enabled = add(":enabled");
        expect(doc.body, neither, "control failure");
        expect(input, enabled, "input element didn't match :enabled");
        input.click();
        expect(input, both, "input element didn't match :checked");
        input.disabled = true;
        expect(input, checked, "failure 3");
        input.checked = false;
        expect(input, neither, "failure 4");
        expect(doc.body, neither, "failure 5");
      });
      selectorTest(function (doc, add, expect) {
        var input1 = doc.createElement('input');
        input1.type = 'radio';
        input1.name = 'radio';
        doc.body.appendChild(input1);
        var input2 = doc.createElement('input');
        input2.type = 'radio';
        input2.name = 'radio';
        doc.body.appendChild(input2);
        var checked = add(":checked");
        expect(input1, 0, "failure 6");
        expect(input2, 0, "failure 7");
        input2.checked = true;
        expect(input1, 0, "failure 6");
        expect(input2, checked, "failure 7");
        input1.checked = true;
        expect(input1, checked, "failure 8");
        expect(input2, 0, "failure 9");
        input2.setAttribute("checked", "checked"); // sets defaultChecked,
doesn't change actual state
        expect(input1, checked, "failure 9");
        expect(input2, 0, "failure 10");
        input1.type = "text";
        expect(input1, 0, "text field matched :checked");
      });
      selectorTest(function (doc, add, expect) {
        var input = doc.createElement('input');
        input.type = 'button';
        doc.body.appendChild(input);
        var neither = 0;
        var enabled = add(":enabled");
        var disabled = add(":disabled");
        add(":enabled:disabled");
        expect(input, enabled, "failure 12");
        input.disabled = true;
        expect(input, disabled, "failure 13");
        input.removeAttribute("disabled");
        expect(input, enabled, "failure 14");
        expect(doc.body, neither, "failure 15");
      });
      return 3;
    },


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list