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

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

Issue 114193009: [Download] Return DownloadInterruptReason from OnStartedCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 // 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 {"FILE_TOO_LARGE", 6}, 803 {"FILE_TOO_LARGE", 6},
804 {"FILE_VIRUS_INFECTED", 7}, 804 {"FILE_VIRUS_INFECTED", 7},
805 {"FILE_TRANSIENT_ERROR", 10}, 805 {"FILE_TRANSIENT_ERROR", 10},
806 {"FILE_BLOCKED", 11}, 806 {"FILE_BLOCKED", 11},
807 {"FILE_SECURITY_CHECK_FAILED", 12}, 807 {"FILE_SECURITY_CHECK_FAILED", 12},
808 {"FILE_TOO_SHORT", 13}, 808 {"FILE_TOO_SHORT", 13},
809 {"NETWORK_FAILED", 20}, 809 {"NETWORK_FAILED", 20},
810 {"NETWORK_TIMEOUT", 21}, 810 {"NETWORK_TIMEOUT", 21},
811 {"NETWORK_DISCONNECTED", 22}, 811 {"NETWORK_DISCONNECTED", 22},
812 {"NETWORK_SERVER_DOWN", 23}, 812 {"NETWORK_SERVER_DOWN", 23},
813 {"NETWORK_INVALID_REQUEST", 24},
813 {"SERVER_FAILED", 30}, 814 {"SERVER_FAILED", 30},
814 {"SERVER_NO_RANGE", 31}, 815 {"SERVER_NO_RANGE", 31},
815 {"SERVER_PRECONDITION", 32}, 816 {"SERVER_PRECONDITION", 32},
816 {"SERVER_BAD_CONTENT", 33}, 817 {"SERVER_BAD_CONTENT", 33},
817 {"USER_CANCELED", 40}, 818 {"USER_CANCELED", 40},
818 {"USER_SHUTDOWN", 41}, 819 {"USER_SHUTDOWN", 41},
819 {"CRASH", 50}, 820 {"CRASH", 50},
820 }; 821 };
821 822
822 // Make sure no one has changed a DownloadInterruptReason we've previously 823 // Make sure no one has changed a DownloadInterruptReason we've previously
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 std::vector<PageUsageData*> results; 1881 std::vector<PageUsageData*> results;
1881 db_->QuerySegmentUsage(segment_time, 10, &results); 1882 db_->QuerySegmentUsage(segment_time, 10, &results);
1882 ASSERT_EQ(1u, results.size()); 1883 ASSERT_EQ(1u, results.size());
1883 EXPECT_EQ(url, results[0]->GetURL()); 1884 EXPECT_EQ(url, results[0]->GetURL());
1884 EXPECT_EQ(segment_id, results[0]->GetID()); 1885 EXPECT_EQ(segment_id, results[0]->GetID());
1885 EXPECT_EQ(title, results[0]->GetTitle()); 1886 EXPECT_EQ(title, results[0]->GetTitle());
1886 STLDeleteElements(&results); 1887 STLDeleteElements(&results);
1887 } 1888 }
1888 1889
1889 } // namespace history 1890 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/plugins/plugin_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698