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

Side by Side Diff: components/history/content/browser/content_history_backend_db_unittest.cc

Issue 2832223004: interrupt and resume download with CONTENT_LENGTH_MISMATCH errors (Closed)
Patch Set: fix tests Created 3 years, 7 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
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 // History unit tests come in two flavors: 5 // History unit tests come in two flavors:
6 // 6 //
7 // 1. The more complicated style is that the unit test creates a full history 7 // 1. The more complicated style is that the unit test creates a full history
8 // service. This spawns a background thread for the history backend, and 8 // service. This spawns a background thread for the history backend, and
9 // all communication is asynchronous. This is useful for testing more 9 // all communication is asynchronous. This is useful for testing more
10 // complicated things or end-to-end behavior. 10 // complicated things or end-to-end behavior.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 {"NETWORK_SERVER_DOWN", 23}, 69 {"NETWORK_SERVER_DOWN", 23},
70 {"NETWORK_INVALID_REQUEST", 24}, 70 {"NETWORK_INVALID_REQUEST", 24},
71 {"SERVER_FAILED", 30}, 71 {"SERVER_FAILED", 30},
72 {"SERVER_NO_RANGE", 31}, 72 {"SERVER_NO_RANGE", 31},
73 {"SERVER_PRECONDITION", 32}, 73 {"SERVER_PRECONDITION", 32},
74 {"SERVER_BAD_CONTENT", 33}, 74 {"SERVER_BAD_CONTENT", 33},
75 {"SERVER_UNAUTHORIZED", 34}, 75 {"SERVER_UNAUTHORIZED", 34},
76 {"SERVER_CERT_PROBLEM", 35}, 76 {"SERVER_CERT_PROBLEM", 35},
77 {"SERVER_FORBIDDEN", 36}, 77 {"SERVER_FORBIDDEN", 36},
78 {"SERVER_UNREACHABLE", 37}, 78 {"SERVER_UNREACHABLE", 37},
79 {"SERVER_CONTENT_LENGTH_MISMATCH", 38},
79 {"USER_CANCELED", 40}, 80 {"USER_CANCELED", 40},
80 {"USER_SHUTDOWN", 41}, 81 {"USER_SHUTDOWN", 41},
81 {"CRASH", 50}, 82 {"CRASH", 50},
82 }; 83 };
83 84
84 // Make sure no one has changed a DownloadInterruptReason we've previously 85 // Make sure no one has changed a DownloadInterruptReason we've previously
85 // persisted. 86 // persisted.
86 TEST_F(ContentHistoryBackendDBTest, 87 TEST_F(ContentHistoryBackendDBTest,
87 ConfirmDownloadInterruptReasonBackwardsCompatible) { 88 ConfirmDownloadInterruptReasonBackwardsCompatible) {
88 // Are there any cases in which a historical number has been repurposed 89 // Are there any cases in which a historical number has been repurposed
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 126 }
126 127
127 EXPECT_TRUE(found) 128 EXPECT_TRUE(found)
128 << "Error \"" << cur_reason.name << "\" not found in historical list." 129 << "Error \"" << cur_reason.name << "\" not found in historical list."
129 << std::endl 130 << std::endl
130 << "Please add it."; 131 << "Please add it.";
131 } 132 }
132 } 133 }
133 } // namespace 134 } // namespace
134 } // namespace history 135 } // namespace history
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/downloads.idl ('k') | content/browser/download/download_interrupt_reasons_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698