Last Comment Bug 371329 - XPI_NAME-built extensions not available to make check
: XPI_NAME-built extensions not available to make check
Status: NEW
:
Product: Testing
Classification: Components
Component: XPCShell Harness (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-22 19:48 PST by Robert Sayre
Modified: 2008-12-12 09:10 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Binary Extension that caused the make check error. (10.35 KB, application/octet-stream)
2007-02-22 20:11 PST, David Humphrey (:humph)
no flags Details

Description Robert Sayre 2007-02-22 19:48:30 PST
 
Comment 1 Robert Sayre 2007-02-22 19:49:50 PST
function run_test() {
  try {
    const cid = "@senecac.on.ca/firstxpcom;1";
    var obj = Components.classes[cid].createInstance();
    obj = obj.QueryInterface(Components.interfaces.IFirstXpcom);
  } catch (err) {
    do_throw(err);
    return;
}

  do_check_true(true);
}

$ make check

...
*** test pending
*** exiting
*** CHECK FAILED: TypeError: Components.classes[cid] has no properties
JS frame :: ../../../dist/bin/test-harness/xpcshell-simple/head.js :: do_throw :: line 98
JS frame :: ../../../dist/bin/test_firstxpcom/test_sample.js :: run_test :: line 52
JS frame :: ../../../dist/bin/test-harness/xpcshell-simple/tail.js :: <TOP_LEVEL> :: line 41
2147500036
*** FAIL ***
Comment 2 David Humphrey (:humph) 2007-02-22 20:11:46 PST
Created attachment 256131 [details]
Binary Extension that caused the make check error.

Here's my simple XPCOM example (mozilla/extensions/firstxpcom) from a tutorial I'm writing.
Comment 3 Robert Sayre 2007-02-22 21:02:07 PST
I get the same thing. Normally, Firefox will start up ExtensionManager, register these things, quit, and then start again. Not sure how to make xpcshell do this.
Comment 4 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2007-02-23 05:53:14 PST
xpcshell doesn't know anything about extensions, and can't really be taught. We could write a xulrunner-based xpcshell replacement that has the extension-management smarts.
Comment 5 Robert Sayre 2007-02-23 06:11:03 PST
Ah. bug 359830 seems to have something like that already.

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