Closed
Bug 1248097
Opened 10 years ago
Closed 10 years ago
Add some more features to SpecialPowers.createFiles()
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(firefox47 fixed)
RESOLVED
FIXED
mozilla47
| Tracking | Status | |
|---|---|---|
| firefox47 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(4 files)
|
1.85 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
|
3.58 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
|
2.78 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
|
1.30 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
For bug 1243577 I need a couple of additional abilities for SpecialPowers.createFiles(). First, if a name is omitted, use createUnique to come up with one. Most (or maybe all) of the tests don't really care what the file name is. Second, the child should be able to pass in an "options" argument to be used as the second argument to the File constructor.
| Assignee | ||
Comment 1•10 years ago
|
||
I'm not sure what happened here.
try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2aa2a7e25c6a
Attachment #8720575 -
Flags: review?(jmaher)
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8720578 -
Flags: review?(jmaher)
| Assignee | ||
Comment 3•10 years ago
|
||
This is pretty trivial. It just passes through an additional argument to the WebIDL File constructor.
Attachment #8720579 -
Flags: review?(jmaher)
| Assignee | ||
Comment 4•10 years ago
|
||
This would cause us to not delete some created files if SpecialPowers.createFiles() is called multiple times in a single test.
I noticed this while I was looking at the code. There's no test because I'd have to change the removeFiles API (which is currently called automatically from finishTest() to do a callback when it finishes which seems like a bit of a pain. Leaving around a few files doesn't seem like a huge deal.
Attachment #8720580 -
Flags: review?(jmaher)
Comment 5•10 years ago
|
||
Comment on attachment 8720575 [details] [diff] [review]
part 1 - Fix indentation in SpecialPowersObserver.jsm.
Review of attachment 8720575 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/specialpowers/content/SpecialPowersObserver.jsm
@@ +266,5 @@
> outStream.write(request.data, request.data.length);
> outStream.close();
> }
> filePaths.push(new File(testFile.path));
> createdFiles.push(testFile);
I am not sure why we went from 2 space indentation to 6 space. Either way, these indentations are only half of the code inside the forEach.
Attachment #8720575 -
Flags: review?(jmaher) → review-
Updated•10 years ago
|
Attachment #8720578 -
Flags: review?(jmaher) → review+
Updated•10 years ago
|
Attachment #8720579 -
Flags: review?(jmaher) → review+
Updated•10 years ago
|
Attachment #8720580 -
Flags: review?(jmaher) → review+
| Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #5)
> I am not sure why we went from 2 space indentation to 6 space. Either way,
> these indentations are only half of the code inside the forEach.
Sorry, I'm not sure what you mean here. All of the code inside the forEach is correctly indented now. Did you mean to r- my patch? If so, what do I need to fix? Thanks.
Flags: needinfo?(jmaher)
Comment 7•10 years ago
|
||
Comment on attachment 8720575 [details] [diff] [review]
part 1 - Fix indentation in SpecialPowersObserver.jsm.
Review of attachment 8720575 [details] [diff] [review]:
-----------------------------------------------------------------
oh silly me, I read the patch backwards.
Attachment #8720575 -
Flags: review- → review+
Updated•10 years ago
|
Flags: needinfo?(jmaher)
Comment 9•10 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/170e7f4744fe
https://hg.mozilla.org/mozilla-central/rev/1cf13bbd3e20
https://hg.mozilla.org/mozilla-central/rev/5d422cabebc4
https://hg.mozilla.org/mozilla-central/rev/6e5ea6598f40
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•