Closed Bug 938256 Opened 8 years ago Closed 8 years ago

mozPhoneNumberService fuzzyMatch is always returning true

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
1.3 C2/1.4 S2(17jan)

People

(Reporter: jmcf, Assigned: mikehenrty)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

Test Case:

  var req = navigator.mozPhoneNumberService.fuzzyMatch('983456789', '638883076');

  req.onsuccess = function() {
   if(req.result === true) {
     window.console.log('Failed');
   }
   else {
     window.console.log('Pass!');
   }
  req.onerror = function() {
    alert(req.error.name);
  }

Actually I have not found any test case that returns false, thus it seems there is some integration problem that makes it to return always true.
Whiteboard: [systemsfe]
Its green 20 out of 20: https://travis-ci.org/mozilla-b2g/gaia/builds/16899869
I think we should add these integration tests.
Comment on attachment 8334374 [details] [review]
Add fuzzyMatch integration tests

Julien, since you know a thing or two about the phoneNumberService, would you mind having a look at these integration tests?
Attachment #8334374 - Flags: review?(felash)
Jose, are you still able to reproduce this? Based on the integration tests, fuzzyMatch seems to be working.
Flags: needinfo?(jmcf)
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
Comment on attachment 8334374 [details] [review]
Add fuzzyMatch integration tests

r=me but please fix the comments first :)
Attachment #8334374 - Flags: review?(felash) → review+
(In reply to Julien Wajsberg [:julienw] from comment #5)
> Comment on attachment 8334374 [details] [review]
> Add fuzzyMatch integration tests
> 
> r=me but please fix the comments first :)

These files fail `make hint APP=sms`

apps/sms/test/marionette/phone_number_service_test.js: line 3, col 5, Redefinition of 'assert'.
apps/sms/test/marionette/phone_number_service_test.js: line 8, col 1, 'marionette' is not defined.
apps/sms/test/marionette/phone_number_service_test.js: line 9, col 16, 'marionette' is not defined.
apps/sms/test/marionette/phone_number_service_test.js: line 40, col 11, 'marionetteScriptFinished' is not defined.
apps/sms/test/marionette/phone_number_service_test.js: line 6, col 24, 'TARGET_APP_MANIFEST' is defined but never used.
Rick,

My fault! Thanks for your fix!

By the way, how does your patch fix redefinition of 'assert'?
.../phone_number_service_test.js: line 3, col 5, Redefinition of 'assert'.
Depends on: 959840
(In reply to Michael Henretty [:mhenretty] from comment #7)
> Rick,
> 
> My fault! Thanks for your fix!
> 
> By the way, how does your patch fix redefinition of 'assert'?
> .../phone_number_service_test.js: line 3, col 5, Redefinition of 'assert'.

You can keep this one, I'm removing "assert" from the list of globals in bug 937431.
(In reply to Michael Henretty [:mhenretty] from comment #7)
> Rick,
> 
> My fault! Thanks for your fix!
> 
> By the way, how does your patch fix redefinition of 'assert'?
> .../phone_number_service_test.js: line 3, col 5, Redefinition of 'assert'.

I removed it from the jshintrc that put in the marionette dir, but looks like julien has a different plan ;)
(In reply to Michael Henretty [:mhenretty] from comment #4)
> Jose, are you still able to reproduce this? Based on the integration tests,
> fuzzyMatch seems to be working.

Yes, I did a simple test and seems to be working

thanks!
Flags: needinfo?(jmcf)
oki, then I'm marking this fixed because we landed some integration tests.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.