Closed
Bug 945099
Opened 12 years ago
Closed 12 years ago
[Download API] Enhance basic download API mochitest with attribute checks
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 C1/1.4 S1(20dec)
People
(Reporter: jsmith, Assigned: jsmith)
References
Details
Attachments
(1 file, 1 obsolete file)
4.14 KB,
patch
|
aus
:
review+
|
Details | Diff | Splinter Review |
Enhance the existing basic download API mochitest with more attribute checks.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jsmith
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 8340873 [details] [diff] [review]
Patch v1
Here's a first pass at enhancing the basic download API mochitest with more attribute checks.
Some questions for feedback before I clean this up for review:
1. When I checked the value of download.path, I noticed that it matched serve_file.sjs, rather than the download attribute name of test.bin. Any ideas why?
2. Accessing startTime right at downloadStart apparently is firing NS_ERROR_UNEXPECTED. Any ideas why?
3. Accessing error right at downloadStart sometimes will also fire NS_ERROR_UNEXPECTED. Any ideas why?
4. The total bytes amount at download start is equal to zero, not 1024 bytes. Any ideas why?
Attachment #8340873 -
Flags: feedback?(aus)
Assignee | ||
Updated•12 years ago
|
Blocks: fxos-download-mgr
Comment 3•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #2)
> Comment on attachment 8340873 [details] [diff] [review]
> Patch v1
>
> Here's a first pass at enhancing the basic download API mochitest with more
> attribute checks.
>
> Some questions for feedback before I clean this up for review:
>
> 1. When I checked the value of download.path, I noticed that it matched
> serve_file.sjs, rather than the download attribute name of test.bin. Any
> ideas why?
Hm no, that should really do the right thing.
> 2. Accessing startTime right at downloadStart apparently is firing
> NS_ERROR_UNEXPECTED. Any ideas why?
>
> 3. Accessing error right at downloadStart sometimes will also fire
> NS_ERROR_UNEXPECTED. Any ideas why?
We probably fail to initialize these when creating the DOM download objects. Should be an easy fix.
> 4. The total bytes amount at download start is equal to zero, not 1024
> bytes. Any ideas why?
It seems that the backend sends us a downloadStarted event as soon as possible, including even before all the http headers are available. Note that in some cases we will never now the total bytes anyway, if the server doesn't set it.
Assignee | ||
Updated•12 years ago
|
Attachment #8340873 -
Flags: feedback?(aus)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #3)
> (In reply to Jason Smith [:jsmith] from comment #2)
> > Comment on attachment 8340873 [details] [diff] [review]
> > Patch v1
> >
> > Here's a first pass at enhancing the basic download API mochitest with more
> > attribute checks.
> >
> > Some questions for feedback before I clean this up for review:
> >
> > 1. When I checked the value of download.path, I noticed that it matched
> > serve_file.sjs, rather than the download attribute name of test.bin. Any
> > ideas why?
>
> Hm no, that should really do the right thing.
Okay. I filed bug 945323 to address that.
>
> > 2. Accessing startTime right at downloadStart apparently is firing
> > NS_ERROR_UNEXPECTED. Any ideas why?
> >
> > 3. Accessing error right at downloadStart sometimes will also fire
> > NS_ERROR_UNEXPECTED. Any ideas why?
>
> We probably fail to initialize these when creating the DOM download objects.
> Should be an easy fix.
Okay - bug 944682 & bug 945366 are filed for fixing that.
>
> > 4. The total bytes amount at download start is equal to zero, not 1024
> > bytes. Any ideas why?
>
> It seems that the backend sends us a downloadStarted event as soon as
> possible, including even before all the http headers are available. Note
> that in some cases we will never now the total bytes anyway, if the server
> doesn't set it.
Would we know the totalBytes by the time onstatechange fires (assuming the server sets it in the headers)?
Assignee | ||
Comment 5•12 years ago
|
||
What's existing here passed on try so far:
https://tbpl.mozilla.org/?tree=Try&rev=59c1bd61e390
Assignee | ||
Updated•12 years ago
|
Attachment #8340873 -
Attachment is obsolete: true
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 8345152 [details] [diff] [review]
Patch v2
Ready for review. Will kick off a try run shortly.
Attachment #8345152 -
Flags: review?(aus)
Assignee | ||
Comment 8•12 years ago
|
||
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #8)
> https://tbpl.mozilla.org/?tree=Try&rev=545f1ac4772e
Try run is green.
Comment 10•12 years ago
|
||
Comment on attachment 8345152 [details] [diff] [review]
Patch v2
Review of attachment 8345152 [details] [diff] [review]:
-----------------------------------------------------------------
Looks like a good addition to the current tests. We can land this on it's own or as part of the first set of fixes for accessing attributes. Either/or is fine with me. :)
Attachment #8345152 -
Flags: review?(aus) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 11•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Updated•12 years ago
|
Target Milestone: --- → 1.3 C1/1.4 S1(20dec)
Comment 13•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•