directoryService.get "ProfD" not working for B2G mochitests

RESOLVED FIXED

Status

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: onecyrenus, Assigned: onecyrenus)

Tracking

unspecified
x86
macOS
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 5 obsolete attachments)

ProfD is currently not set in B2G. 

This is one of the issues causing several mochitests to fail

content/base/test/fileutils.js
content/base/test/test_websocket.html
content/base/test/websocket_hybi/test_send-blob.html
content/base/test/test_bug403852.html
content/base/test/test_XHRSendData.html
content/base/test/test_fileapi.html
content/html/content/test/forms/test_min_attribute.html
content/html/content/test/forms/test_required_attribute.html
content/html/content/test/forms/test_max_attribute.html
content/html/content/test/forms/test_step_attribute.html
content/html/content/test/test_bug590353-2.html
content/html/content/test/test_bug523771.html
content/html/content/test/test_bug598643.html
dom/apps/tests/test_signed_pkg_launch.html
dom/file/test/test_archivereader_zip_in_zip.html
dom/file/test/test_archivereader_nonUnicode.html
dom/file/test/test_archivereader.html
dom/file/test/test_archivereader.html
security/manager/ssl/tests/mochitest/mixedcontent/test_bug383369.html
Posted patch Directory Service patch (obsolete) — Splinter Review
directoryService patch to enable ProfD, basically I am selecting the active profile, and obtaining it's directory. 
I couldn't think of a better mechanism for setting this value.
Comment on attachment 770444 [details] [diff] [review]
Directory Service patch

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

Fly-by commit

::: b2g/components/DirectoryProvider.js
@@ +61,5 @@
>        persistent.value = true;
>        return file;
>      }
> +    if (prop == "ProfD") {
> +      let profSvc = Cc["@mozilla.org/toolkit/profile-service;1"].getService(Ci.nsIToolkitProfileServ

This line seems to be missng something at the end?
Bah - I meant Fly-by comment
Posted patch Updated patch using hg (obsolete) — Splinter Review
Attachment #770444 - Attachment is obsolete: true
Would like to add a comment here that with this patch.  I am able to get the file handle but whenever I attempt an operation like .append("foo") I get an NS_ERROR_FAILURE

3274 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/file/test/test_archivereader_zip_in_zip.html | uncaught exception - NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get] at chrome://specialpowers/content/specialpowersAPI.js:87
Posted file Working patch for ProfD problem (obsolete) —
I bypassed this by just hardcoding the value, which is consistent with the rest of the library. 

~3700 more tests in the nightly run.. attached is the hg patch
Attachment #770708 - Attachment is obsolete: true
Attachment #771747 - Flags: review?(dhylands)
Running the patch through the try server to verify all tests pass, just hold off on the review until then.
Posted patch Directory Service patch (obsolete) — Splinter Review
Comment on attachment 771757 [details] [diff] [review]
Directory Service patch

I am waiting on getting my new rsa key up on hg so i can run through try server.
Attachment #771757 - Attachment is patch: true
Attachment #771757 - Attachment mime type: text/x-patch → text/plain
Attachment #771747 - Attachment is obsolete: true
Attachment #771747 - Flags: review?(dhylands)
Attachment #771757 - Flags: review?(dhylands)
Attachment #771757 - Flags: review?(dhylands) → review+
Keywords: checkin-needed
https://hg.mozilla.org/projects/birch/rev/c881d9e4a406
Assignee: nobody → dclarke
Flags: in-testsuite+
Keywords: checkin-needed
Ryan, 
  I think that this needs a closer look, is it possible the marionette test timeouts were due to some transient network issue.
Your Try run isn't running the Marionette tests in question. The failures were in the B2G suite, and they most definitely didn't go away until I backed you out (note the times of the comments - it took me all day to narrow it down to yours).
Flags: needinfo?(ryanvm)
Ryan, 
  Unsure how to run the marionette tests in question. I thought below command would run all the tests? 

– try: -b o -p all -u all -t none
Flags: needinfo?(ryanvm)
Posted patch Directory Service patch (obsolete) — Splinter Review
Found the problem with marionette tests, and was able to rectify in the patch. 

Basically marionette is expecting a null object to be returned, so now I just check to see if there is a profile directory, and if there is not, return null.
Attachment #771757 - Attachment is obsolete: true
Attachment #774841 - Flags: review?(dhylands)
Attachment #774841 - Flags: review?(dhylands) → review+
Attachment #774841 - Attachment is obsolete: true
Attachment #775827 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/aa90caa3271c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.