cout << "...failed, rv=0x" << hex << (int)rv << endl;
printf("...failed, rv=0x%x\n", (int)rv);
static void testResult( nsresult rv ) {    if ( NS_SUCCEEDED( rv ) ) {        cout << "...ok" << endl;    } else {        cout << "...failed, rv=0x" << hex << (int)rv << endl;    }    return;}