waitForFocus in browser chrome tests uses SimpleTest ok(), rather than browser-test one.

RESOLVED FIXED in mozilla1.9.3a4

Status

defect
RESOLVED FIXED
9 years ago
a year ago

People

(Reporter: mak, Assigned: mak)

Tracking

(Blocks 1 bug)

Trunk
mozilla1.9.3a4
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

9 years ago
We should override it, to do so it should avoid using the global var, as other utils in that file.
(Assignee)

Comment 1

9 years ago
Posted patch patch v1.0 (obsolete) — Splinter Review
Attachment #433301 - Flags: review?(enndeakin)
Attachment #433301 - Flags: feedback?
(Assignee)

Updated

9 years ago
Attachment #433301 - Attachment is patch: true
Attachment #433301 - Attachment mime type: application/octet-stream → text/plain
Attachment #433301 - Flags: feedback? → feedback?(dao)
(Assignee)

Comment 2

9 years ago
i tested this with a b-c test, and now waitForFocus really logs information.
Ideally they should be looged to an info() but simpleTest does not have such a thing.
(Assignee)

Updated

9 years ago
Blocks: 521233
Comment on attachment 433301 [details] [diff] [review]
patch v1.0

Looks ok to me, assuming it works.

>+    // Override SimpleTest methods with our own.
>+    ["ok", "is", "isnot", "todo", "todo_is", "todo_isnot"].forEach(function(m) {
>+      this.currentTest.scope.SimpleTest[m] = this.currentTest.scope[m];
>+    }, this);

How about:

    ...
      this.SimpleTest[m] = this[m];
    }, this.currentTest.scope);
Attachment #433301 - Flags: feedback?(dao) → feedback+
(Assignee)

Comment 4

9 years ago
well it works, at least in the b-c test i built to check that i was getting TEST-PASS: waiting for focus and so on.

about the code change, nice trick, will do.

Updated

9 years ago
Attachment #433301 - Flags: review?(enndeakin) → review+
(Assignee)

Updated

9 years ago
Summary: WaitForFocus uses the global SimpleTest scope ok, rather than our own → WaitForFocus uses the global SimpleTest scope ok(), rather than our own
(Assignee)

Comment 5

9 years ago
Posted patch patch v1.1Splinter Review
added dao's suggestion. thanks.
Attachment #433301 - Attachment is obsolete: true
(Assignee)

Updated

9 years ago
Summary: WaitForFocus uses the global SimpleTest scope ok(), rather than our own → waitForFocus in browser chrome tests uses SimpleTest ok(), rather than browser-test one.
(Assignee)

Comment 6

9 years ago
http://hg.mozilla.org/mozilla-central/rev/bdb90006f262

so, i hope this can help figuring out remaining waitForFocus hangs.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
Component: BrowserTest → Mochitest
Product: Testing → Testing
You need to log in before you can comment on or make changes to this bug.