Last Comment Bug 491675 - [Packaged build+tests] mochitest-plain: geolocation/geolocation_common.js doesn't work
: [Packaged build+tests] mochitest-plain: geolocation/geolocation_common.js doe...
Status: RESOLVED FIXED
[fixed by bug 489817]
:
Product: Core
Classification: Components
Component: Geolocation (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.9.2a1
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 489817
Blocks: 383136 496534
  Show dependency treegraph
 
Reported: 2009-05-06 07:17 PDT by Chris AtLee [:catlee]
Modified: 2009-06-19 18:44 PDT (History)
6 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Chris AtLee [:catlee] 2009-05-06 07:17:13 PDT
geolocation/geolocation_common.js doesn't work when run from packaged builds.

It looks like the test is relying on TestGeolocationProvider.js to be present in firefox/components, but that file is not shipped with firefox.
Comment 1 :Gavin Sharp [email: gavin@gavinsharp.com] 2009-05-06 13:17:29 PDT
Will likely be fixed by bug 488542.
Comment 2 Mike Beltzner [:beltzner, not reading bugmail] 2009-05-19 14:51:53 PDT
Bug 488542 is WONTFIX as we apparently don't want to ship the component, which I think is probably right, so we shouldn't be packaging it in packaged builds unless we also have --enable-tests which selectively builds the appropriate component, but even that seems weird.

I think the right approach is bug 489817 which will migrate the tests to browser chrome.
Comment 3 John O'Duinn [:joduinn] (please use "needinfo?" flag) 2009-05-21 11:25:07 PDT
(In reply to comment #3)
> geolocation/geolocation_common.js doesn't work when run from packaged builds.
> 
> It looks like the test is relying on TestGeolocationProvider.js to be present
> in firefox/components, but that file is not shipped with firefox.

To clarify, geolocation *does* work when run as part of traditional "build-and-unittest". We only hit problems when running unittests separate from builds. For examples see: http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox-Unittest&maxdate=1242887044&hours=24&legend=0&norules=1
Comment 4 Serge Gautherie (:sgautherie) 2009-05-31 15:36:59 PDT
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090529 Minefield/3.6a1pre] (mozilla-central-win32-unittest/1243625438) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/e44d9c0f4805)

7 tests fail with the same error.

The first one is:
{
41728 INFO Running /tests/dom/tests/mochitest/geolocation/test_allowCurrent.html...
41729 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_allowCurrent.html | Error thrown during test: uncaught exception: [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIComponentManager.getClassObject]"  nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)"  location: "JS frame :: http://localhost:8888/tests/dom/tests/mochitest/geolocation/geolocation_common.js :: ensure_geolocationProvider :: line 9"  data: no] - got 0, expected 1
}
Comment 5 Robert Kaiser 2009-05-31 17:27:05 PDT
Should get fixed by bug 489817, actually.
Comment 6 Serge Gautherie (:sgautherie) 2009-05-31 19:37:54 PDT
(In reply to comment #0)
> It looks like the test is relying on TestGeolocationProvider.js to be present
> in firefox/components, but that file is not shipped with firefox.

Ftr, this file is included with the tests and copied by the Xpcshell-tests step.

Thus, locally, (manually) copying this file makes the (mochi)tests pass :-)
Comment 7 Serge Gautherie (:sgautherie) 2009-06-19 18:31:54 PDT
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090613 Minefield/3.6a1pre] (mozilla-central-win32-unittest/...) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/023b36497ca1)

R.Fixed

Note You need to log in before you can comment on or make changes to this bug.