Status: Accepted
Owner: gears.team.michaeln
Labels: Type-Defect Priority-Medium Component-LocalServer

New issue 782 by gears.team.michaeln: captureBlob() unit test failure on safari/leopard
http://code.google.com/p/gears/issues/detail?id=782

The test case is consistently failing in Safari/Leopard (while Safari/Tiger is purring like a kitten). The test that fails is below... looks like the content-type header value stored in the localserver.db doesn't get reflected when GHR'ing the
resource.

function testCaptureBlob() {
 startAsync();
 var url = '/testcases/test_file_1024.txt';
 httpGetAsRequest(url, function(request) {
   var store = getFreshStore();
   var captureUrl = '/captured.txt';
   var responseBlob = request.responseBlob;

   store.captureBlob(responseBlob, captureUrl);
   assertBlobProbablyEqual(store.getAsBlob(captureUrl), responseBlob);
   assertEqual('application/octet-stream',
               store.getHeader(captureUrl, 'Content-Type'));

   var contentType = request.getResponseHeader('Content-Type');
   store.captureBlob(responseBlob, captureUrl, contentType);
   assertBlobProbablyEqual(store.getAsBlob(captureUrl), responseBlob);
   assertEqual(contentType, store.getHeader(captureUrl, 'Content-Type'));

   httpGetAsRequest(captureUrl, function(request2) {
     assertBlobProbablyEqual(responseBlob, request2.responseBlob);
assertEqual(contentType, request2.getResponseHeader('Content-Type')); <---- FAILS HERE
     completeAsync();
   });
 });

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to