Closed Bug 420324 Opened 16 years ago Closed 16 years ago

reftest should show progress in titlebar

Categories

(Testing :: Reftest, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

References

Details

(Keywords: fixed1.9.0.12)

Attachments

(2 files)

Running reftest manually doesn't give you any indication of how far along it is. Mochitest counts tests run (although doesn't show you a total or percentage). It would be nice if reftest updated the titlebar to show progress, and a percentage complete.
Pretty simple, but useful.
Assignee: nobody → ted.mielczarek
Status: NEW → ASSIGNED
Attachment #330399 - Flags: review?(dbaron)
Comment on attachment 330399 [details] [diff] [review]
add progress to the titlebar

>bug 420324 - reftest should show progress in titlebar
>+    gCurrentTest++;
>     // make sure we don't run tests that are expected to kill the browser
>     while (gURLs.length > 0 && gURLs[0].expected == EXPECTED_DEATH) {
>         dump("REFTEST TEST-KNOWN-FAIL | " + gURLs[0].url1.spec + " | (SKIP)\n");
>         gURLs.shift();
>+        gCurrentTest++;

It seems like you don't need the second gCurrentTest++.

That said, why bother with gCurrentTest at all?  You can just use
  var currentTest = gTotalTests - gURLs.length();
and avoid the problem of having to keep different pieces of code synced.

>+        window.title = "reftest: " + gCurrentTest + " / " + gTotalTests +
>+            " (" + Math.round(100 * (gCurrentTest / gTotalTests)) + "%)";

Might Math.floor make more sense?

r=dbaron with those
Attachment #330399 - Flags: review?(dbaron) → review+
Pushed to mozilla-central in changeset d54d857e173c.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Blocks: 448932
Component: Layout: Misc Code → Reftest
Product: Core → Testing
Version: Trunk → unspecified
I want this on branch too! The patch includes Bernd's s/window/document/ change from bug 448932.

From IRC:
<ted> [#developers] smontagu: it's a pretty simple patch, if you port it yourself to 1.9.0 you can have a=me to land it
Yeah, test-harness-only, you should be fine to land on branch.
Checking in layout/tools/reftest/reftest.js;
/cvsroot/mozilla/layout/tools/reftest/reftest.js,v  <--  reftest.js
new revision: 1.38; previous revision: 1.37
done
Keywords: fixed1.9.0.12
What about showing the file name of the reftest too in the title bar? If you run all of those it's a bit hard to find the corresponding test if an assertion occur and you want to run this single reftest again. Is there an already existing bug or is it not wanted?
Feel free to file a new bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: