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

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

Issue 164933002: Expose details for appcache error events [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't leak details cross-origin 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "webkit/browser/appcache/appcache.h" 6 #include "webkit/browser/appcache/appcache.h"
7 #include "webkit/browser/appcache/appcache_host.h" 7 #include "webkit/browser/appcache/appcache_host.h"
8 #include "webkit/browser/appcache/mock_appcache_service.h" 8 #include "webkit/browser/appcache/mock_appcache_service.h"
9 9
10 namespace appcache { 10 namespace appcache {
11 11
12 namespace { 12 namespace {
13 13
14 class MockAppCacheFrontend : public AppCacheFrontend { 14 class MockAppCacheFrontend : public AppCacheFrontend {
15 public: 15 public:
16 virtual void OnCacheSelected( 16 virtual void OnCacheSelected(
17 int host_id, const appcache::AppCacheInfo& info) OVERRIDE {} 17 int host_id, const appcache::AppCacheInfo& info) OVERRIDE {}
18 virtual void OnStatusChanged(const std::vector<int>& host_ids, 18 virtual void OnStatusChanged(const std::vector<int>& host_ids,
19 Status status) OVERRIDE {} 19 Status status) OVERRIDE {}
20 virtual void OnEventRaised(const std::vector<int>& host_ids, 20 virtual void OnEventRaised(const std::vector<int>& host_ids,
21 EventID event_id) OVERRIDE {} 21 EventID event_id) OVERRIDE {}
22 virtual void OnProgressEventRaised( 22 virtual void OnProgressEventRaised(
23 const std::vector<int>& host_ids, 23 const std::vector<int>& host_ids,
24 const GURL& url, 24 const GURL& url,
25 int num_total, int num_complete) OVERRIDE {} 25 int num_total, int num_complete) OVERRIDE {}
26 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, 26 virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
27 const std::string& message) OVERRIDE {} 27 const appcache::ErrorDetails& details)
michaeln 2014/03/27 01:05:37 don't think appcache:: is needed (not sure why its
jsbell 2014/03/27 19:23:23 Done.
28 OVERRIDE {}
28 virtual void OnLogMessage(int host_id, LogLevel log_level, 29 virtual void OnLogMessage(int host_id, LogLevel log_level,
29 const std::string& message) OVERRIDE {} 30 const std::string& message) OVERRIDE {}
30 virtual void OnContentBlocked( 31 virtual void OnContentBlocked(
31 int host_id, const GURL& manifest_url) OVERRIDE {} 32 int host_id, const GURL& manifest_url) OVERRIDE {}
32 }; 33 };
33 34
34 } // namespace 35 } // namespace
35 36
36 class AppCacheTest : public testing::Test { 37 class AppCacheTest : public testing::Test {
37 }; 38 };
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 EXPECT_TRUE(star_greediness.IsMatch( 687 EXPECT_TRUE(star_greediness.IsMatch(
687 GURL("http://foo.com/a/b/01234567890abcdef/b"))); 688 GURL("http://foo.com/a/b/01234567890abcdef/b")));
688 EXPECT_TRUE(star_greediness.IsMatch( 689 EXPECT_TRUE(star_greediness.IsMatch(
689 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b"))); 690 GURL("http://foo.com/a/b/01234567890abcdef/b01234567890abcdef/b")));
690 EXPECT_TRUE(star_greediness.IsMatch( 691 EXPECT_TRUE(star_greediness.IsMatch(
691 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_" 692 GURL("http://foo.com/a/b/01234567890abcdef_eat_some_more_characters_"
692 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b"))); 693 "/and_even_more_for_the_heck_of_it/01234567890abcdef/b")));
693 } 694 }
694 695
695 } // namespace appacache 696 } // namespace appacache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698