Closed Bug 642704 Opened 13 years ago Closed 13 years ago

Integrate the BrowserScope richtext2 test suite into our automated testing framework

Categories

(Core :: DOM: Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(3 files, 1 obsolete file)

I'm filing this bug to track the addition of the richtext2 test suite into our mochitest suite.
Assignee: nobody → ehsan
Whiteboard: [post-2.0]
Gerv, is it OK to have Apache-licensed tests in our tree?
(In reply to comment #2)
> Gerv, is it OK to have Apache-licensed tests in our tree?

I'll let Gerv weigh in here, but FWIW I had sent him an email on last March when I was integrating the richtext test suite in our tree (which is released under the same license), and he said that it's OK.
This patch adds a test driver to run the richtext2 test suite.  The currentStatus.js file is generated by setting the UPDATE_TEST_RESULTS variable to true.  The exact steps have been documented in README.Mozilla.
Attachment #520137 - Flags: review?(roc)
The richtext2 suite includes a file named test_set.py.  Files starting with "test_" have a special meaning to our mochitest runner, and this file confuses it, and mochitest runner tries to run it as a mochitest.

This patch removes files with names beginning with "test_",  This is fine, since this file is not needed to run the test suite.
Attachment #520138 - Flags: review?(roc)
The test driver doesn't call todo() at all. How are we going to support tests that we don't pass yet?

The stuff these tests test is not very well specified. How confident are you that the tests are all correct?
We can't (until we finish, and if we adopt, MPL2) ship Apache code in our binaries, but looks like we have a precedent for taking Apache-licensed tests, so that's fine :-)

Gerv
Depends on: 642823
(In reply to comment #6)
> The test driver doesn't call todo() at all. How are we going to support tests
> that we don't pass yet?

We use the data encoded in currentStatus.js.  The current contents of the file represent our current state in terms of test failures.

I did it this way because this test suite is mostly intended to catch regressions.  Whenever I fix something which makes us pass one of the richtext2 tests that we used to fail on, I'll get a test failure when running this locally, and I will investigate and change currentStatus.js to reflect the new status.

> The stuff these tests test is not very well specified. How confident are you
> that the tests are all correct?

I've been involved in the decision making process for some of the things that this suite tests.  But I haven't read every test in this suite.  But I think that's fine, since I'm not going to spend time to just make us score higher on this test.

The main reason I'm integrating this test into our suite is to make sure that we don't change editor APIs unexpectedly.  This is a much needed coverage which we don't currently have.  If I find a test which is incorrect, I'll fix it in our tree and will upstream the fix to the browserscope project.

Does that make sense?
(In reply to comment #8)
> We use the data encoded in currentStatus.js.  The current contents of the file
> represent our current state in terms of test failures.
> 
> I did it this way because this test suite is mostly intended to catch
> regressions.  Whenever I fix something which makes us pass one of the richtext2
> tests that we used to fail on, I'll get a test failure when running this
> locally, and I will investigate and change currentStatus.js to reflect the new
> status.

So currently the tests that are "expected fail", we'll report as "pass". Would it be hard to report them as "todo" instead?
(In reply to comment #9)
> (In reply to comment #8)
> > We use the data encoded in currentStatus.js.  The current contents of the file
> > represent our current state in terms of test failures.
> > 
> > I did it this way because this test suite is mostly intended to catch
> > regressions.  Whenever I fix something which makes us pass one of the richtext2
> > tests that we used to fail on, I'll get a test failure when running this
> > locally, and I will investigate and change currentStatus.js to reflect the new
> > status.
> 
> So currently the tests that are "expected fail", we'll report as "pass". Would
> it be hard to report them as "todo" instead?

Yes.  I modified the suite to differentiate between pass, todo, unexpected-pass and regressions.
Attachment #520137 - Attachment is obsolete: true
Attachment #520137 - Flags: review?(roc)
Attachment #520468 - Flags: review?(roc)
Comment on attachment 520468 [details] [diff] [review]
Part 2: Add a test driver for the richtext2 suite

+                // Skip the knwon properties

known
Attachment #520468 - Flags: review?(roc) → review+
Depends on: post2.0
http://hg.mozilla.org/mozilla-central/rev/744bd77a56c6
http://hg.mozilla.org/mozilla-central/rev/ab05f1da44fb
http://hg.mozilla.org/mozilla-central/rev/16ff3ab0d1ff
Status: NEW → RESOLVED
Closed: 13 years ago
No longer depends on: post2.0
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [post-2.0]
Target Milestone: --- → mozilla2.2
Depends on: 842156
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: