QA/Firefox3.5/XHR TestPlan: Difference between revisions

Jump to navigation Jump to search
Line 37: Line 37:
* Ensure no trusted data ever exposed of the resource
* Ensure no trusted data ever exposed of the resource
* {{done|test expiration of a access-control-max-age header from a result cache}}
* {{done|test expiration of a access-control-max-age header from a result cache}}
* test with access-control-allow-credentials as both true and false
* {{done|test with access-control-allow-credentials as both true and false}}
* {{done|use access-control-allow-methods to ensure only specified methods work}}
* {{done|use access-control-allow-methods to ensure only specified methods work}}
* {{done|do the same with *-headers.}}
* {{done|do the same with *-headers.}}
Line 50: Line 50:
* {{done|preflight false, REQ method GET && headers in whitelist --> work}}
* {{done|preflight false, REQ method GET && headers in whitelist --> work}}
* preflight false, REQ method HEAD && headers in whitelist --> work
* preflight false, REQ method HEAD && headers in whitelist --> work
** ensure we get the "success" status flag
** {{done|ensure we get the "success" status flag}}
* {{done|preflight false, REQ method GET && headers ! in whitelist --> preflight}}
* {{done|preflight false, REQ method GET && headers ! in whitelist --> preflight}}
* preflight false, REQ method HEAD && headers ! in whitelist --> preflight
* preflight false, REQ method HEAD && headers ! in whitelist --> preflight
* {{done|preflight false, REQ method POST && headers ! in whitelist -- preflight}}
* {{done|preflight false, REQ method POST && headers ! in whitelist -- preflight}}
* {{done|preflight false}}, REQ method POST && headers in whitelist && Header contains content-type but value of content-type != (application/x-www-form-urlencoded, multipart/form-dat, or text/plain) --> preflight
* {{done|preflight false, REQ method POST && headers in whitelist && Header contains content-type but value of content-type != (application/x-www-form-urlencoded, multipart/form-dat, or text/plain) --> preflight}}
** the above with content-type == to each of those three things --> work
** the above with content-type == to each of those three things --> work
*** {{done|content-type}} == text/plain
*** {{done|content-type == text/plain}}
*** content-type == application/x-www-form-urlencoded
*** content-type == application/x-www-form-urlencoded. I disagree with spec here. Should raise with spec editor.
*** content-type == multipart/form-data
*** content-type == multipart/form-data. I disagree with spec here. Should raise with spec editor.
* getResponseHeader() does not get access to cookie2 header and othe headers not in RESP whitelist
* getResponseHeader() does not get access to cookie2 header and othe headers not in RESP whitelist
* cause a user cancel and ensure abort steps followed
* cause a user cancel and ensure abort steps followed
Line 75: Line 75:
* {{done|test that multiple methods can be cached and retrieved}}
* {{done|test that multiple methods can be cached and retrieved}}
* {{done|test that both header and method are empty when they are not empty in the cache --> cache fail}}
* {{done|test that both header and method are empty when they are not empty in the cache --> cache fail}}
* can we make a preflight with credentials?  Should fail, should not be allowed
* can we make a preflight with credentials?  Should fail, should not be allowed. (JS: You can check if the preflight has cookies)
* can we make a preflight with an entity body? should fail, should not be allowed
* can we make a preflight with an entity body? should fail, should not be allowed. (JS: You can check if the preflight has body)
* {{skip|test redirect}}
* {{skip|test redirect}}
* {{done|test alternate ways of specifying the expiration time (white space, invalid values etc)}}
* {{done|test alternate ways of specifying the expiration time (white space, invalid values etc)}}
Line 95: Line 95:
=== cache matches ===
=== cache matches ===
* ensure that when testing for cache matches we fail when any of these conditions are met:
* ensure that when testing for cache matches we fail when any of these conditions are met:
** URL not == to REQ URL
** {{done|URL != REQ URL}}
** origin  != source origin
** origin  != source origin
** credentials != credentials flag
** credentials != credentials flag


=== cache & network steps ===
=== cache & network steps ===
* {{done|remove cache entries for source origin and URL - can we test that the entries get removed?}}
* remove cache entries for source origin and URL - can we test that the entries get removed? (JS: not done, and not yet implemented)
* return network error
* return network error


Line 111: Line 111:
=== abort steps ===
=== abort steps ===
* test that user cancel results in "abort" state being returned and the request stops
* test that user cancel results in "abort" state being returned and the request stops
* ensure no data passed back from an abort (necessary?)
* ensure no data passed back from an abort (necessary?) (JS: yes, necessary)


=== network error ===
=== network error ===
* ensure network error status and no data comes back to XHR (necessary?)
* ensure network error status and no data comes back to XHR (necessary?) (JS: yes, necessary)


=== cache steps ===
=== cache steps ===
* check that an entry fro a network error is not used for the next request (network and cache error should clear cache)
* check that an entry fro a network error is not used for the next request (network and cache error should clear cache)
* check that an preflight response that is a network error, but otherwise well formed, does not populate the cache or allow the REQ.


=== Access Control Check ===
=== Access Control Check ===
* test with 0 access-control-allow-origin headers --> fail
* test with 0 access-control-allow-origin headers --> fail (JS: I think done)
* test with > 1 access-control-allow-origin-headers --> fail
* test with > 1 access-control-allow-origin-headers --> fail
* test with access-control-allow-origin == * && credentials flag == false ---> return pass
* {{done|test with access-control-allow-origin == * && credentials flag == false ---> return pass}}
* test with access-control-allow-origin != source origin --> return fail
* {{done|test with access-control-allow-origin != source origin --> return fail}}
* test with credentials flag == true && 0 access-control-allow-origin hdr --> fail
* test with credentials flag == true && 0 access-control-allow-origin hdr --> fail (JS: I think done)
* test with credentials flag == true && >1 access-control-allow-origin hdr --> fail
* test with credentials flag == true && >1 access-control-allow-origin hdr --> fail
* {{done|test}} with credentials flag == true && access-control-allow-credentials is not true --> fail
* {{done|test with credentials flag == true && access-control-allow-credentials is not true __> fail}}
* test with credentials flag == true && access-control-allow-credentials == true && 0 access-control-allow-origin --> fail
* test with credentials flag == true && access-control-allow-credentials == true && 0 access-control-allow-origin --> fail  
* test with credentials flag == true && access-control-allow-credentials == true && >1 access-control-allow-origin --> fail
* test with credentials flag == true && access-control-allow-credentials == true && >1 access-control-allow-origin --> fail
* {{done|test}} with credentials flag == true && access-control-allow-credentials == true && 1 access-control-allow-origin --> pass
* {{done|test with credentials flag == true && access-control-allow-credentials == true && 1 access-control-allow-origin --> pass}}
* test with credentials flag == false && access-control-allow-credentials==true && 1 access-control-allow-origin --> pass (as per the spec, unspecified case)
* test with credentials flag == false && access-control-allow-credentials==true && 1 access-control-allow-origin --> pass (as per the spec, unspecified case) (JS: I think done)
* {{done|test}} with access-control-allow-origin == * && credentials flag == false && access-allow-credentials == true --> pass
* {{done|test with access-control-allow-origin == * && credentials flag == false && access-allow-credentials == true --> pass}}
* test with access-control-allow-origin == * && credentials flag == false && access-allow-credentials == false --> pass
* {{done|test with access-control-allow-origin == * && credentials flag == false && access-allow-credentials == false --> pass}}
* {{done|test}} with access-control-allow-origin == * && credentials flag == true && access-allow-credentials == true --> pass
* {{done|test with access-control-allow-origin == * && credentials flag == true && access-allow-credentials == true --> pass}}


=== Redirect Steps ===
=== Redirect Steps ===
Confirmed users
716

edits

Navigation menu