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

Side by Side Diff: content/browser/download/download_id_unittest.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 "content/public/browser/download_id.h" 5 #include "content/public/browser/download_id.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 // Sort by pointer value. 31 // Sort by pointer value.
32 std::sort(managers.begin(), managers.end()); 32 std::sort(managers.begin(), managers.end());
33 // Assign to |download_managers_|. 33 // Assign to |download_managers_|.
34 for (i = 0; i < num_managers_; ++i) { 34 for (i = 0; i < num_managers_; ++i) {
35 download_managers_[i] = managers[i]; 35 download_managers_[i] = managers[i];
36 managers[i] = NULL; 36 managers[i] = NULL;
37 } 37 }
38 } 38 }
39 39
40 ~DownloadIdTest() { 40 virtual ~DownloadIdTest() {
41 for (size_t i = 0; i < num_managers_; ++i) 41 for (size_t i = 0; i < num_managers_; ++i)
42 download_managers_[i] = NULL; // Releases & deletes. 42 download_managers_[i] = NULL; // Releases & deletes.
43 } 43 }
44 44
45 protected: 45 protected:
46 scoped_refptr<DownloadManager> download_managers_[2]; 46 scoped_refptr<DownloadManager> download_managers_[2];
47 MessageLoopForUI message_loop_; 47 MessageLoopForUI message_loop_;
48 // Necessary to delete |DownloadManager|s. 48 // Necessary to delete |DownloadManager|s.
49 BrowserThreadImpl ui_thread_; 49 BrowserThreadImpl ui_thread_;
50 size_t num_managers_; 50 size_t num_managers_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 last = map.end(); 142 last = map.end();
143 EXPECT_FALSE(last == map.find(id1)); 143 EXPECT_FALSE(last == map.find(id1));
144 EXPECT_FALSE(last == map.find(id2)); 144 EXPECT_FALSE(last == map.find(id2));
145 EXPECT_FALSE(last == map.find(id3)); 145 EXPECT_FALSE(last == map.find(id3));
146 146
147 EXPECT_FALSE(id1 == id2); 147 EXPECT_FALSE(id1 == id2);
148 EXPECT_LT(id1, id2); 148 EXPECT_LT(id1, id2);
149 } 149 }
150 150
151 } // namespace content 151 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_file_unittest.cc ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698