[Packaged build+tests] mochitest-plain: geolocation/geolocation_common.js doesn't work

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
Geolocation
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: catlee, Unassigned)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed by bug 489817])

(Reporter)

Description

8 years ago
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.
Will likely be fixed by bug 488542.
Depends on: 488542

Updated

8 years ago
Depends on: 489817
No longer depends on: 488542
(Reporter)

Updated

8 years ago
Blocks: 383136
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.
(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
[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
}
OS: Linux → All
Summary: geolocation/geolocation_common.js doesn't work when run from packaged builds → [Packaged build+tests] mochitest-plain: geolocation/geolocation_common.js doesn't work

Comment 5

8 years ago
Should get fixed by bug 489817, actually.
(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 :-)
Blocks: 496534
[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
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Flags: in-testsuite-
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Whiteboard: [fixed by bug 489817]
You need to log in before you can comment on or make changes to this bug.