Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: webkit/browser/appcache/appcache_update_job_unittest.cc

Issue 164933002: Expose details for appcache error events [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 it != update_hosts_.end(); ++it) { 236 it != update_hosts_.end(); ++it) {
237 AppCacheHost* host = *it; 237 AppCacheHost* host = *it;
238 update_->StartUpdate(host, 238 update_->StartUpdate(host,
239 (host ? host->pending_master_entry_url() : GURL())); 239 (host ? host->pending_master_entry_url() : GURL()));
240 } 240 }
241 update_hosts_.clear(); // only trigger once 241 update_hosts_.clear(); // only trigger once
242 } 242 }
243 } 243 }
244 244
245 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, 245 virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
246 const std::string& message) OVERRIDE { 246 const std::string& message,
247 appcache::ErrorReason reason,
248 const GURL& url,
249 int status) OVERRIDE {
247 error_message_ = message; 250 error_message_ = message;
248 OnEventRaised(host_ids, ERROR_EVENT); 251 OnEventRaised(host_ids, ERROR_EVENT);
249 } 252 }
250 253
251 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, 254 virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
252 const GURL& url, 255 const GURL& url,
253 int num_total, 256 int num_total,
254 int num_complete) OVERRIDE { 257 int num_complete) OVERRIDE {
255 if (!ignore_progress_events_) 258 if (!ignore_progress_events_)
256 OnEventRaised(host_ids, PROGRESS_EVENT); 259 OnEventRaised(host_ids, PROGRESS_EVENT);
(...skipping 3426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 3686
3684 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { 3687 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) {
3685 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); 3688 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest);
3686 } 3689 }
3687 3690
3688 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { 3691 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) {
3689 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); 3692 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest);
3690 } 3693 }
3691 3694
3692 } // namespace appcache 3695 } // namespace appcache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698