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

Side by Side Diff: chrome/browser/history/history_unittest.cc

Issue 351863002: Added SERVER_UNAUTHORIZED download interrupt reason. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup for history_unittest Created 6 years, 5 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 {"FILE_TOO_SHORT", 13}, 911 {"FILE_TOO_SHORT", 13},
912 {"NETWORK_FAILED", 20}, 912 {"NETWORK_FAILED", 20},
913 {"NETWORK_TIMEOUT", 21}, 913 {"NETWORK_TIMEOUT", 21},
914 {"NETWORK_DISCONNECTED", 22}, 914 {"NETWORK_DISCONNECTED", 22},
915 {"NETWORK_SERVER_DOWN", 23}, 915 {"NETWORK_SERVER_DOWN", 23},
916 {"NETWORK_INVALID_REQUEST", 24}, 916 {"NETWORK_INVALID_REQUEST", 24},
917 {"SERVER_FAILED", 30}, 917 {"SERVER_FAILED", 30},
918 {"SERVER_NO_RANGE", 31}, 918 {"SERVER_NO_RANGE", 31},
919 {"SERVER_PRECONDITION", 32}, 919 {"SERVER_PRECONDITION", 32},
920 {"SERVER_BAD_CONTENT", 33}, 920 {"SERVER_BAD_CONTENT", 33},
921 {"SERVER_UNAUTHORIZED", 34},
922 {"SERVER_CERT_PROBLEM", 35},
921 {"USER_CANCELED", 40}, 923 {"USER_CANCELED", 40},
922 {"USER_SHUTDOWN", 41}, 924 {"USER_SHUTDOWN", 41},
923 {"CRASH", 50}, 925 {"CRASH", 50},
924 }; 926 };
925 927
926 // Make sure no one has changed a DownloadInterruptReason we've previously 928 // Make sure no one has changed a DownloadInterruptReason we've previously
927 // persisted. 929 // persisted.
928 TEST_F(HistoryBackendDBTest, 930 TEST_F(HistoryBackendDBTest,
929 ConfirmDownloadInterruptReasonBackwardsCompatible) { 931 ConfirmDownloadInterruptReasonBackwardsCompatible) {
930 // Are there any cases in which a historical number has been repurposed 932 // Are there any cases in which a historical number has been repurposed
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 std::vector<PageUsageData*> results; 1861 std::vector<PageUsageData*> results;
1860 db_->QuerySegmentUsage(segment_time, 10, &results); 1862 db_->QuerySegmentUsage(segment_time, 10, &results);
1861 ASSERT_EQ(1u, results.size()); 1863 ASSERT_EQ(1u, results.size());
1862 EXPECT_EQ(url, results[0]->GetURL()); 1864 EXPECT_EQ(url, results[0]->GetURL());
1863 EXPECT_EQ(segment_id, results[0]->GetID()); 1865 EXPECT_EQ(segment_id, results[0]->GetID());
1864 EXPECT_EQ(title, results[0]->GetTitle()); 1866 EXPECT_EQ(title, results[0]->GetTitle());
1865 STLDeleteElements(&results); 1867 STLDeleteElements(&results);
1866 } 1868 }
1867 1869
1868 } // namespace history 1870 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc ('k') | chrome/common/extensions/api/downloads.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698