Closed Bug 1447941 Opened 6 years ago Closed 6 years ago

Replace promiseWaitForCondition with TestUtils.waitForCondition in browser_aboutHome_search_searchbar.js


(Firefox :: General, enhancement, P5)

60 Branch



Firefox 61
Tracking Status
firefox61 --- fixed


(Reporter: johannh, Assigned: is2ei, Mentored)


(Keywords: good-first-bug)


(1 file)

This is a good first bug for newcomers to Firefox development.

promiseWaitForCondition in the browser_aboutHome_search_searchbar.js test file can be replaced by the TestUtils.waitForCondition[0] utility function. We can also remove the function definition in the head.js file.

The code in question is here:

For instructions on how to get your local build of Firefox up and running and submit your patch, see

You can run this test with the ./mach mochitest command:

./mach mochitest browser/base/content/test/about/browser_aboutHome_search_searchbar.js

Please leave a comment if you would like to be assigned to this bug and feel free to ask questions here or via IRC if you're stuck.

Hello I was referred to this bug. Can I tackle this problem ?
Yup, thanks!
Assignee: nobody → kev.ftw595
Hi, are you still working on this? :)
Flags: needinfo?(kev.ftw595)
Assignee: kev.ftw595 → nobody
Flags: needinfo?(kev.ftw595)
Hi I'm Issei.
Could I work on this issue?
Hi, Could I ask you a question?
I tried the testing command and got errors.

$ ./mach mochitest browser/base/content/test/about/browser_aboutHome_search_searchbar.js
cat: No such file or directory
Build configuration changed. Regenerating backend.
Traceback (most recent call last):
  File "/Users/horie/oss/mozilla/mozilla-unified/build/", line 39, in <module>
  File "/Users/horie/oss/mozilla/mozilla-unified/build/", line 35, in gen_test_backend
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/backend/", line 126, in consume
    for obj in objs:
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/", line 172, in emit
    for out in output:
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/", line 899, in read_topsrcdir
    for r in self.read_mozbuild(path, self.config):
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/frontend/", line 1073, in read_mozbuild
    sys.exc_info()[2], sandbox_load_error=sle)

The error occurred while processing the following file:


The underlying problem is we referenced a path that does not exist. That path is:


Either create the file if it needs to exist or do not reference it.

make: *** [backend.TestManifestBackend] Error 1
Error running mach:

    ['mochitest', 'browser/base/content/test/about/browser_aboutHome_search_searchbar.js']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:

Exception: Process executed with non-0 exit code 2: [u'/usr/bin/make', u'-f', u'/Users/horie/oss/mozilla/mozilla-unified/build/', u'-j8', u'-s', u'backend.TestManifestBackend']

  File "/Users/horie/oss/mozilla/mozilla-unified/testing/mochitest/", line 353, in run_mochitest_general
    tests = mochitest.resolve_tests(test_paths, test_objects, cwd=self._mach_context.cwd)
  File "/Users/horie/oss/mozilla/mozilla-unified/testing/mochitest/", line 104, in resolve_tests
    resolver = self._spawn(TestResolver)
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/", line 741, in _spawn
  File "/Users/horie/oss/mozilla/mozilla-unified/testing/mozbase/moztest/moztest/", line 401, in __init__
    self.topsrcdir, 'build', ''),
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/", line 669, in _run_make
    return fn(**params)
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mozbuild/mozbuild/", line 724, in _run_command_in_objdir
    return self.run_process(cwd=self.topobjdir, **args)
  File "/Users/horie/oss/mozilla/mozilla-unified/python/mach/mach/mixin/", line 153, in run_process
    raise Exception('Process executed with non-0 exit code %d: %s' % (status, args))

Is there any instruction I missed?
Flags: needinfo?(jhofmann)
Sorry for the delay here, last week was pretty busy for me.

Hm, did you run

./mach bootstrap


./mach build


You can find more detailed build instructions here:

Please make sure to follow them :)
Assignee: nobody → is2ei.horie
Flags: needinfo?(jhofmann) → needinfo?(is2ei.horie)
(In reply to Johann Hofmann [:johannh] - back on May 2nd from comment #6)
> Sorry for the delay here, last week was pretty busy for me.
> Hm, did you run
> ./mach bootstrap
> and
> ./mach build
> ?
> You can find more detailed build instructions here:
> Build_Instructions/Simple_Firefox_build
> Please make sure to follow them :)


I tried to build and got an error...

I'm asking how to solve it on #build and #introduction channels.
Could you help me if you found that kind of error before?
Flags: needinfo?(is2ei.horie) → needinfo?(jhofmann)
The error has gone now.
I'll continue to work on this issue.
Thanks for your support!
I created a patch. Could you review it, please?
Attachment #8972198 - Flags: review?(jhofmann)
Comment on attachment 8972198 [details] [diff] [review]

Review of attachment 8972198 [details] [diff] [review]:

That looks great, thank you! I've given you the ability edit bugs now, so you can just set the checkin-needed flag on this one if you like to get it landed (in the "keywords" field).

We would usually do a try run ( but I assume you ran the test locally so we don't have to waste precious energy on it :)

Attachment #8972198 - Flags: review?(jhofmann) → review+
Flags: needinfo?(jhofmann)
Thanks! I have marked this for checkin.
Keywords: checkin-needed
Pushed by
Replace promiseWaitForCondition with TestUtils.waitForCondition in browser_aboutHome_search_searchbar.js r=johannh
Keywords: checkin-needed
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in before you can comment on or make changes to this bug.