summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_update_job_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Turned job_factory into a pure virtual classshalev@chromium.org2012-08-241-13/+13
| | | | | | | | | | | | This makes it possible to create wrappers for job_factory that handle a particular job type, and forward the rest to the old job_factory. TBR=michaeln@chromium.org, brettw@chromium.org, davemoore@chromium.org, kalman@chromium.org, benjhayden@chromium.org, jochen@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/10836248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153241 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring: ProtocolHandler::MaybeCreateJob and other functions take ↵shalev@chromium.org2012-08-241-16/+30
| | | | | | | | | | | | | | NetworkDelegate as argument This change goes a long way to prepare for removing NetworkDelegate from URLRequestContext. TBR=sky@chromium.org, michaeln@chromium.org, benjhayden@chromium.org, brettw@chromium.org, ben@chromium.org, davemoore@chromium.org, zelidrag@chromium.org, mnissler@chromium.org, thestig@chromium.org, asargent@chromium.org, jhawkins@chromium.org, bulach@chromium.org BUG=crbug.com/142945 Review URL: https://chromiumcodereview.appspot.com/10855209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153133 0039d316-1c4b-4281-b951-d872f2087c98
* Stop refcounting URLRequestContext.willchan@chromium.org2012-05-111-5/+5
| | | | | | | | | | | | While doing so, fix a few issues with the code like ordering of URLRequestContext to ensure correct destruction order. Also fix const correctness in some places. BUG=58859 TEST=none TBR=willchan Review URL: https://chromiumcodereview.appspot.com/10299002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136497 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround for a crashing appcache bug seen on the crash servers. Add an UMA ↵michaeln@google.com2012-05-031-1/+49
| | | | | | | | | stat to see how often this happens. Also cleanup a renmant of base::Bind transition. BUG=95101 Review URL: https://chromiumcodereview.appspot.com/10207020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135186 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, webkit/rsleevi@chromium.org2012-04-281-0/+3
| | | | | | | | | | BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10066044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134449 0039d316-1c4b-4281-b951-d872f2087c98
* net::URLRequest: rename Simulate*Error with CancelWith*Errortoyoshim@chromium.org2012-03-131-4/+4
| | | | | | | | | | | | | | The method names SimulateError and SimulateSSLError are inconsistent with other Cancel methods. This CL renames these methods with CancelWithError and CancelWithSSLError. BUG=none TEST=test_shell_tests, net_unittests, and other existing unit tests Review URL: http://codereview.chromium.org/9694001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126511 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert most of webkit/appcache.jhawkins@chromium.org2011-12-211-33/+28
| | | | | | | | | | BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8991001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115353 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache INTERCEPT namespace.michaeln@google.com2011-12-131-14/+76
| | | | | | | | | | | | | | - Add support for a custom CHROMIUM CACHE MANIFEST signature. Other browsers should ignore files with this signature. - Parse intercept namespace entries out of the new CHROMIUM-INTERCEPT manifest section. Other browsers should ignore this entire section. - Store and retrieve the new kind of namespace records in the database layer. - Upgrade existing databases to the new schema. - Look for matches in the new namespaces when handling main and sub resource requests. - Add unit tests. BUG=101565 Review URL: http://codereview.chromium.org/8396013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114151 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Implement CancelableCallback to replace CancelableTask.jhawkins@chromium.org2011-11-241-1/+1
| | | | | | | | | | | | | Designed by groby,binji,csilv,jhawkins. BUG=96749 TEST=CancelableCallbackTest.* R=ajwong@chromium.org,darin@chromium.org Review URL: http://codereview.chromium.org/8673008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111493 0039d316-1c4b-4281-b951-d872f2087c98
* No longer check for a specific mime-type on appcache manifest files. The ↵michaeln@google.com2011-11-211-9/+21
| | | | | | | | | | spec was recently changed in this way. BUG=103939 TEST=appcache_update_job_unittest.cc Review URL: http://codereview.chromium.org/8566020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111000 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert most of webkit/appcache.jhawkins@chromium.org2011-11-111-7/+6
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8515019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109696 0039d316-1c4b-4281-b951-d872f2087c98
* Made application cache manifest URL always available for DevTools.vsevik@chromium.org2011-11-081-36/+36
| | | | | | | | | BUG=102680 TEST=None Review URL: http://codereview.chromium.org/8438043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109043 0039d316-1c4b-4281-b951-d872f2087c98
* Thread::Stop() must be called before any subclass's destructor completes.joi@chromium.org2011-11-021-2/+0
| | | | | | | | | | | Update base::Thread documentation, fix all subclasses I could find that had a problem, and remove no-longer-necessary suppressions. BUG=102134 Review URL: http://codereview.chromium.org/8427007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108296 0039d316-1c4b-4281-b951-d872f2087c98
* More groundwork for filestream based response storage.michaeln@google.com2011-10-211-7/+14
| | | | | | | | | | | | | | | | | | | | | | | This CL touches many files, but it amounts to mindless plumbing of a group_id value. This doesn't involve any new database or fileio or task scheduling. In order to read or write a response, callers now need to provide the group_id of the corresponding manifest, so the AppCacheStorage CreateRepsonseReader() and CreateResponseWriter() methods now take this additional parameter. The current disk_cache based impl doesn't use this param for anything, but the filestream based impl will use it to keep responses for a group in a particular subdirectory. When looking up the main resource for a page load via FindResponseForMainRequest, the group_id needs to be returned so the response may later be read, the AppCacheStorage::Delegate OnMainResponseFound() method has a param for that. A bunch of callsites, tests, and mocks are updated accordingly. BUG=78359 Review URL: http://codereview.chromium.org/8343018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106755 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-011-8/+8
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* Third-party appcache blocking.marja@chromium.org2011-09-081-103/+1
| | | | | | | | | | BUG=72586 TEST=AppCacheHostTest.SelectCacheAllowed, AppCacheHostTest.SelectCacheBlocked, AppCacheRequestHandlerTest.MainResource_Blocked Review URL: http://codereview.chromium.org/7720022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100131 0039d316-1c4b-4281-b951-d872f2087c98
* Log errors on the URLRequestTYPE_REQUEST_ALIVE end event,mmenke@chromium.org2011-08-171-1/+1
| | | | | | | | | | | | | as well as on URLRequestJob's NotifyDone event. The primary motivation of this change is to log CONTENT_DECODING_FAILED errors to the NetLog. BUG=89648 TEST=none Review URL: http://codereview.chromium.org/7604043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97227 0039d316-1c4b-4281-b951-d872f2087c98
* Remove explicit keyword from multi-argument (w/o default values) constructorsdilmah@chromium.org2011-07-261-3/+3
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7477008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94115 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-191-1/+1
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r91815, "Clean up RegisterProtocolFactory calls."willchan@chromium.org2011-07-081-95/+88
| | | | | | | | | | | | | | | | | | It had broken the mac canaries with the warning: cc1plus: warnings being treated as errors /b/build/slave/Webkit_Mac10_5__dbg__2_/build/src/webkit/appcache/appcache_update_job_unittest.cc:556: warning: 'appcache::AppCacheUpdateJobTest' has a field 'appcache::AppCacheUpdateJobTest::io_thread_' whose type uses the anonymous namespace This is the old gcc bug. I think the problem is Mac 10.5 vs 10.6. I'm working around by removing the anonymous namespace. BUG=none TEST=none Review URL: http://codereview.chromium.org/7328017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91836 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r91815, "Clean up RegisterProtocolFactory calls." (broke mac canaries)caseq@google.com2011-07-081-89/+92
| | | | | | | | | | BUG=none TEST=successful build on mac canaries TBR=willchan Review URL: http://codereview.chromium.org/7328015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91833 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up RegisterProtocolFactory calls.willchan@chromium.org2011-07-081-92/+89
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7248075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91815 0039d316-1c4b-4281-b951-d872f2087c98
* Appcache cross-origin HTTPS resources.michaeln@google.com2011-02-221-2/+96
| | | | | | | | | BUG=69594 TEST=updated unit tests Review URL: http://codereview.chromium.org/6526037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75622 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache URLFetcher refactoring. Just pulling the URLRequest handlingmichaeln@google.com2011-02-151-30/+30
| | | | | | | | | | | | | logic out of class AppCacheUpdateJob and into a seperate URLFetcher class. There should be no functional changes here, just refactoring for the sake of maintainability to (hopefully) make future work easier. BUG=none TEST=existing tests apply Review URL: http://codereview.chromium.org/6486010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74998 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up net unit testing code.erg@google.com2011-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | (Reapply r72562 with willchan's nits + locally tested shlib fixes + removing duplicate code that was partially responsible for the failure.) - Move code included from blah_unittest.h (where blah_unittest.cc has actual unittests) into their own files, often completely out-of-lining the definitions. - Remove anonymous namespaces from headers. - Reorder method declarations. - Make other unit test link against net_test_support instead of reaching in and including .h files in their targets directly. BUG=68682 TEST=compiles First Review URL: http://codereview.chromium.org/6264013 Review URL: http://codereview.chromium.org/6248021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72682 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Clean up net unit testing code." since it breaks the shlib builder.erg@google.com2011-01-251-1/+1
| | | | | | | | | | This reverts commit 006f377bbb65ece3490b7c76e58e0dc4cb330909 (r72562). BUG=68682 TEST=compiles TBR=thomasvl git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72564 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up net unit testing code.erg@google.com2011-01-251-1/+1
| | | | | | | | | | | | | | | | | - Move code included from blah_unittest.h (where blah_unittest.cc has actual unittests) into their own files, often completely out-of-lining the definitions. - Remove anonymous namespaces from headers. - Reorder method declarations. - Make other unit test link against net_test_support instead of reaching in and including .h files in their targets directly. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6264013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72562 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestContext URLRequestContext;tfarina@chromium.org2011-01-151-3/+3
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6338002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71522 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestTestJob URLRequestTestJob;tfarina@chromium.org2011-01-111-8/+9
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70966 0039d316-1c4b-4281-b951-d872f2087c98
* Move CancellationFlag and WaitableEvent to the synchronization subdirectory.brettw@chromium.org2011-01-021-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5977010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70369 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-011-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add namespace net to URLRequestErrorJob.tfarina@chromium.org2010-12-151-1/+1
| | | | | | | | | BUG=64263 TEST=compiled locally and trybots Review URL: http://codereview.chromium.org/5863001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69228 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestJob URLRequestJob;tfarina@chromium.org2010-12-111-8/+8
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5607004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68935 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequest URLRequest;tfarina@chromium.org2010-11-301-21/+22
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67762 0039d316-1c4b-4281-b951-d872f2087c98
* Make the error message more clear in the appcache console logging when an ↵michaeln@chromium.org2010-11-191-35/+2
| | | | | | | | | | | initial cache attempt fails due to a missing manifest file. BUG=none TEST=manual Review URL: http://codereview.chromium.org/5178003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66729 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-22/+22
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the FLAKY attribute from ↵michaeln@chromium.org2010-08-171-1/+1
| | | | | | | | | | | AppCacheUpdateJobTest.MasterEntryBadManifest. A lot has changed since then. BUG=50657 TEST=AppCacheUpdateJobTest.MasterEntryBadManifest Review URL: http://codereview.chromium.org/3183012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56275 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Start cleaning up net/erg@google.com2010-08-111-0/+1
| | | | | | | | | | | | url_request.h and http_response_info.h are some of the most included headers from net/ in chrome. Do what forward declaration we can in those headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/3150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55780 0039d316-1c4b-4281-b951-d872f2087c98
* Undo in memory changes made by an update job if the commit to disk fails. ↵michaeln@chromium.org2010-08-031-7/+72
| | | | | | | | | | Provide a more clear error message when the commit fails due to exceeding the quota. TEST=MasterEntryFailStoreNewestCacheTest BUG=50985 Review URL: http://codereview.chromium.org/2836075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54667 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of changes required to populate appcache resource list.kkanetkar@chromium.org2010-07-281-2/+2
| | | | | | | | | BUG = 2821005 TEST = Manually navigate. Review URL: http://codereview.chromium.org/3009005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53902 0039d316-1c4b-4281-b951-d872f2087c98
* Make conditional requests when updating the appcache.michaeln@chromium.org2010-07-211-3/+55
| | | | | | | | | TEST=altered existing tests to also cover this case BUG=49548 Review URL: http://codereview.chromium.org/3033003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53230 0039d316-1c4b-4281-b951-d872f2087c98
* New javascript console logging related to the appcache.michaeln@chromium.org2010-07-141-0/+5
| | | | | | | | | | | | | * Log an error message when an update job results in an error. * Log info messages for progress events and other update status changed events. * Consistently use "Application Cache" in the console messages. TEST=existing unit tests apply for functional correctness, manual testing to see the new console output BUG=none Review URL: http://codereview.chromium.org/2910007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52270 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52072. Pass notifications to the browser on access to the appcache ↵jochen@chromium.org2010-07-121-1/+1
| | | | | | | | | | | | main resource manifest. BUG=45230 TEST=browser_tests TBR=vandebo Review URL: http://codereview.chromium.org/2980001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52074 0039d316-1c4b-4281-b951-d872f2087c98
* Failed compile on Chromium builder dbgvandebo@chromium.org2010-07-121-1/+1
| | | | | | | | | | | | | | Revert 52072 - Pass notifications to the browser on access to the appcache main resource manifest. BUG=45230 TEST=browser_tests Review URL: http://codereview.chromium.org/2808046 TBR=jochen@chromium.org Review URL: http://codereview.chromium.org/2925008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52073 0039d316-1c4b-4281-b951-d872f2087c98
* Pass notifications to the browser on access to the appcache main resource ↵jochen@chromium.org2010-07-121-1/+1
| | | | | | | | | | | manifest. BUG=45230 TEST=browser_tests Review URL: http://codereview.chromium.org/2808046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52072 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache: add plumbing to deliver logging messages to the renderer process. ↵michaeln@chromium.org2010-06-181-0/+4
| | | | | | | | These messages will be plumbed thru to the console output for the page associated with 'host_id'.BUG=13685TEST=none Review URL: http://codereview.chromium.org/2861007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50197 0039d316-1c4b-4281-b951-d872f2087c98
* Add DISABLE_RUNNABLE_METHOD_REFCOUNT to make disabling refcounts in ↵ajwong@chromium.org2010-06-161-11/+3
| | | | | | | | | | | RunnableMethods easier. BUG=none TEST=none Review URL: http://codereview.chromium.org/2830006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49887 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 49081: AppCache: Use a MockHttpServer instead of starting a seperate ↵michaeln@chromium.org2010-06-071-117/+234
| | | | | | | | | | | http server for update job unittests. This should reduce flakiness and timing variance and the total time it takes to conduct these tests. BUG=45664 TEST=yes Review URL: http://codereview.chromium.org/2662006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49088 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49081 - AppCache: Use a MockHttpServer instead of starting a seperate ↵michaeln@google.com2010-06-071-232/+119
| | | | | | | | | | | | | | | http server for update job unittests. This should reduce flakiness and timing variance and the total time it takes to conduct these tests. BUG=45664 TEST=yes Review URL: http://codereview.chromium.org/2624003 TBR=michaeln@chromium.org Review URL: http://codereview.chromium.org/2669003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49084 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache: Use a MockHttpServer instead of starting a seperate http server ↵michaeln@chromium.org2010-06-071-119/+232
| | | | | | | | | | | | for update job unittests. This should reduce flakiness and timing variance and the total time it takes to conduct these tests. BUG=45664 TEST=yes Review URL: http://codereview.chromium.org/2624003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49081 0039d316-1c4b-4281-b951-d872f2087c98