Fix NFC marionette testcase fail

RESOLVED FIXED in Firefox 41

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dimi, Assigned: dimi)

Tracking

unspecified
2.2 S13 (29may)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

4 years ago
We have done a lots of refactoring on NFC but we didn't update testcase accordingly.
This bug is used to fix those testcases fail.
(Assignee)

Updated

4 years ago
Depends on: 1163952
(Assignee)

Comment 1

4 years ago
Created attachment 8605699 [details] [diff] [review]
Patch v1
Attachment #8605699 - Flags: review?(allstars.chh)
Comment on attachment 8605699 [details] [diff] [review]
Patch v1

Review of attachment 8605699 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/nfc/tests/marionette/head.js
@@ +200,5 @@
>  
> +  // In bug 1109592, nfcd will only run when nfc is enabled
> +  // The way we activate/deactivate nfcd is by using set property "ctl.start" & "ctl.stop"
> +  // In emulator it seems sometimes enable/disable NFC too quick will cause nfcd won't start
> +  // So here is just a simple workaround too delay enable or disable

file a bug

::: dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js
@@ +50,5 @@
>  function testWithSessionTokenWithTarget() {
>    log('testWithSessionTokenWithTarget');
>    toggleNFC(true)
> +  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0, false))
> +  .then(waitTechDiscovered)

waitForTechDiscovered

@@ +71,5 @@
>    log('testWithSessionTokenNoTarget');
>    toggleNFC(true)
> +  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0, false))
> +  .then(waitTechDiscovered)
> +  .then(() => nfc.checkP2PRegistration(FAKE_MANIFEST_URL))

should use MANIFEST_URL, as the original code does

::: dom/nfc/tests/marionette/test_nfc_error_messages.js
@@ +138,5 @@
>    NCI.deactivate();
>    return deferred.promise;
>  }
>  
> +function waitTechDiscovered() {

move this to head.js ?
Attachment #8605699 - Flags: review?(allstars.chh) → review+
(Assignee)

Updated

4 years ago
Blocks: 1164786
(Assignee)

Comment 3

4 years ago
Created attachment 8605736 [details] [diff] [review]
Patch v2

Address yoshi's comment
Attachment #8605699 - Attachment is obsolete: true
Attachment #8605736 - Flags: review+
(Assignee)

Comment 4

4 years ago
Created attachment 8607428 [details] [diff] [review]
Patch v3

I have update testcases as discussed that tech lost will be triggered by testcase itself
Attachment #8605736 - Attachment is obsolete: true
Attachment #8607428 - Flags: review?(allstars.chh)
Comment on attachment 8607428 [details] [diff] [review]
Patch v3

Review of attachment 8607428 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/nfc/tests/marionette/test_nfc_read_tag.js
@@ +15,5 @@
>    let payload = url;
>  
>    sysMsgHelper.waitForTechDiscovered(function(msg) {
>      log("Received \'nfc-manager-tech-ndiscovered\'");
> +    ok(msg.peer === undefined, "check for correct message type");

the message needs to be updated
Attachment #8607428 - Flags: review?(allstars.chh) → review+
(Assignee)

Comment 6

4 years ago
Created attachment 8607501 [details] [diff] [review]
Patch v4

Address yoshi's comment
Attachment #8607428 - Attachment is obsolete: true
Attachment #8607501 - Flags: review+
(Assignee)

Comment 7

4 years ago
This patch only update marionette-webapi test,
try result:
https://treeherder.allizom.org/#/jobs?repo=try&revision=b00b4fb24cab
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1f529b19f295
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S13 (29may)

Updated

4 years ago
Blocks: 1090359
You need to log in before you can comment on or make changes to this bug.