xpcshell test uriloader/exthandler/tests/unit/test_handlerService.js fails on Android

NEW
Unassigned

Status

()

7 years ago
7 years ago

People

(Reporter: gbrown, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mobile-testing][xpcshell])

(Reporter)

Description

7 years ago
With patches for bug 668349 and 668351, xpcshell tests can be run on an Android device, and the majority of tests pass. 

However, uriloader/exthandler/tests/unit/test_handlerService.js consistently fails when run on Android.
(Reporter)

Updated

7 years ago
Whiteboard: [mobile-testing][xpcshell]
(Reporter)

Comment 1

7 years ago
geoff@geoff-MacBookPro:~/src/mozilla-central/objdir-droid$ make SOLO_FILE=test_handlerService.js -C uriloader/exthandler/tests check-one-remote
make: Entering directory `/home/geoff/src/mozilla-central/objdir-droid/uriloader/exthandler/tests'
/usr/bin/python2.6 -u ../../../../config/pythonpath.py \
	  -I../../../../build \
	  -I../../../../build/mobile \
	  ../../../../testing/xpcshell/remotexpcshelltests.py \
	  --symbols-path=../../../dist/crashreporter-symbols \
	  --build-info-json=../../../mozinfo.json \
	  --test-path=test_handlerService.js \
	  --profile-name=fennec \
	  --verbose \
	   \
	  --dm_trans=adb \
	  --deviceIP= \
	  --objdir=../../.. \
	  --apk=../../../dist/fennec-8.0a1.en-US.eabi-arm.apk \
          --noSetup \
	  ../../../_tests/xpcshell/uriloader/exthandler/tests/unit ../../../_tests/xpcshell/uriloader/exthandler/tests/unit_ipc
package set: org.mozilla.fennec_unofficial
chmod /data/local/tests/xpcshell/p
TEST-INFO | profile dir is /data/local/tests/xpcshell/p
TEST-INFO | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/uriloader/exthandler/tests/unit/test_handlerService.js | running test ...
cd /data/local/tests/xpcshell/uriloader/exthandler/tests/unit; LD_LIBRARY_PATH=/data/local/tests/xpcshell/b; export CACHE_PATH=/data/local/tests/xpcshell/b; export GRE_HOME=/data/data/org.mozilla.fennec_unofficial; export XPCSHELL_TEST_PROFILE_DIR=/data/local/tests/xpcshell/p; /data/local/tests/xpcshell/b/xpcshell -r /data/local/tests/xpcshell/c/httpd.manifest --greomni /data/local/tests/xpcshell/b/fennec-8.0a1.en-US.eabi-arm.apk -j -s -e 'const _HTTPD_JS_PATH = "/data/local/tests/xpcshell/c/httpd.js";' -e 'const _HEAD_JS_PATH = "/data/local/tests/xpcshell/head.js";' -f /data/local/tests/xpcshell/head.js -e 'const _SERVER_ADDR = "localhost"' -e 'const _HEAD_FILES = ["head_handlerService.js"];' -e 'const _TAIL_FILES = ["tail_handlerService.js"];' -e 'const _TEST_FILE = ["test_handlerService.js"];' -e '_execute_test(); quit(0);'
TEST-KNOWN-FAIL | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/uriloader/exthandler/tests/unit/test_handlerService.js | test passed
>>>>>>>
WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/geoff/src/mozilla-central/xpcom/base/nsTraceRefcntImpl.cpp, line 172
WARNING: No default pref files found.: file /home/geoff/src/mozilla-central/modules/libpref/src/Preferences.cpp, line 923
WARNING: GetIsLinkUp is not supported without a bridge connection: file /home/geoff/src/mozilla-central/netwerk/system/android/nsAndroidNetworkLinkService.cpp, line 61
*** HandlerServiceTest: getFile: requesting UMimTyp
*** HandlerServiceTest: getFile: requesting CurProcD
*** HandlerServiceTest: the following NS_ERROR_FAILURE exception in nsIDirectoryServiceProvider::getFile is expected, as we don't provide the 'CurProcD' file

TEST-INFO | (xpcshell/head.js) | test 1 pending
*** HandlerServiceTest: getFile: requesting ProfLDS
*** HandlerServiceTest: the following NS_ERROR_FAILURE exception in nsIDirectoryServiceProvider::getFile is expected, as we don't provide the 'ProfLDS' file
JS Component Loader: ERROR (null):0
                     uncaught exception: 2147500037
*** HandlerServiceTest: getFile: requesting TmpD
*** HandlerServiceTest: the following NS_ERROR_FAILURE exception in nsIDirectoryServiceProvider::getFile is expected, as we don't provide the 'TmpD' file
*** HandlerServiceTest: getFile: requesting ProfLDS
*** HandlerServiceTest: the following NS_ERROR_FAILURE exception in nsIDirectoryServiceProvider::getFile is expected, as we don't provide the 'ProfLDS' file
JS Component Loader: ERROR (null):0
                     uncaught exception: 2147500037
###!!! ASSERTION: no extension: '!aExtension.IsEmpty()', file /home/geoff/src/mozilla-central/uriloader/exthandler/android/nsMIMEInfoAndroid.cpp, line 341

TEST-PASS | test_handlerService.js | [run_test : 118] true == true

TEST-PASS | test_handlerService.js | [run_test : 120] nonexistent/type == nonexistent/type

TEST-PASS | test_handlerService.js | [run_test : 123] nonexistent/type == nonexistent/type

TEST-UNEXPECTED-FAIL | test_handlerService.js | 2 == 0 - See following stack:
JS frame :: /data/local/tests/xpcshell/head.js :: do_throw :: line 445
JS frame :: /data/local/tests/xpcshell/head.js :: _do_check_eq :: line 539
JS frame :: /data/local/tests/xpcshell/head.js :: do_check_eq :: line 560
JS frame :: test_handlerService.js :: run_test :: line 126
JS frame :: /data/local/tests/xpcshell/head.js :: _execute_test :: line 326
JS frame :: -e :: <TOP_LEVEL> :: line 1

TEST-INFO | (xpcshell/head.js) | exiting test
WARNING: nsExceptionService ignoring thread destruction after shutdown: file /home/geoff/src/mozilla-central/xpcom/base/nsExceptionService.cpp, line 197
WARNING: unable to Flush() diry datasource during XPCOM shutdown: file /home/geoff/src/mozilla-central/rdf/base/src/nsRDFXMLDataSource.cpp, line 776
WARNING: OOPDeinit() without successful OOPInit(): file /home/geoff/src/mozilla-central/toolkit/crashreporter/nsExceptionHandler.cpp, line 1830
nsStringStats
 => mAllocCount:           1604
 => mReallocCount:           22
 => mFreeCount:            1604
 => mShareCount:           7080
 => mAdoptCount:             73
 => mAdoptFreeCount:         73
WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/geoff/src/mozilla-central/xpcom/base/nsTraceRefcntImpl.cpp, line 172
<<<<<<<
INFO | Result summary:
INFO | Passed: 0
INFO | Failed: 0
INFO | Todo: 1
make: Leaving directory `/home/geoff/src/mozilla-central/objdir-droid/uriloader/exthandler/tests'
(Reporter)

Comment 2

7 years ago
The failing test calls:

var handlerInfo = mimeSvc.getFromTypeAndExtension("nonexistent/type", null);

and fails because handlerInfo.preferredAction != Ci.nsIHandlerInfo.saveToDisk.

I suspect that the assertion about a non-empty extension is inappropriate. From nsIMIMEService:

"One of aMIMEType and aFileExt can be an empty string. At least one of aMIMEType and aFileExt must be nonempty."
You need to log in before you can comment on or make changes to this bug.