add todo_is and todo_isnot to mochitest

RESOLVED FIXED

Status

Testing
Mochitest
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Created attachment 261739 [details] [diff] [review]
patch

Having a todo version of mochitest's is function would make writing a bunch of the style system tests easier.  It's really useful to use "is", since then I get the incorrect result in the error message.  But I'm writing tests that iterate over a property database and have a bunch of known failures, so I want to be able to write things like this:

    var func = is;
    if (property in gKnownFails &&
        gKnownFails[property].indexOf(badval) != -1)
      func = todo_is;

    func(gDeclaration.getPropertyValue(property), "",
         "invalid value '" + badval + "' not accepted for '" + property +
         "' property");

(This is in the version of layout/style/test/test_property_syntax_errors.html that's in my tree.)

Thus, I'd like the following patch.

I'm not sure if we're doing anything to track changes we make to mochitest or to contribute them back -- if we are, what should I be doing?
Attachment #261739 - Flags: review?(sayrer)
(Assignee)

Comment 1

11 years ago
Note that these are copies of is and isnot with "ok" replaced by "todo".  I should probably say that in a comment above them...

Updated

11 years ago
Attachment #261739 - Flags: review?(sayrer) → review+
(Assignee)

Comment 2

11 years ago
Checked in to trunk.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.