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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc

Issue 11346016: Move remaining content test code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "webkit/blob/blob_url_request_job.h" 52 #include "webkit/blob/blob_url_request_job.h"
53 #include "webkit/fileapi/file_system_context.h" 53 #include "webkit/fileapi/file_system_context.h"
54 #include "webkit/fileapi/file_system_operation.h" 54 #include "webkit/fileapi/file_system_operation.h"
55 #include "webkit/fileapi/file_system_url.h" 55 #include "webkit/fileapi/file_system_url.h"
56 56
57 using content::BrowserContext; 57 using content::BrowserContext;
58 using content::BrowserThread; 58 using content::BrowserThread;
59 using content::DownloadItem; 59 using content::DownloadItem;
60 using content::DownloadManager; 60 using content::DownloadManager;
61 using content::DownloadPersistentStoreInfo; 61 using content::DownloadPersistentStoreInfo;
62 using content::URLRequestSlowDownloadJob;
62 63
63 namespace events = extensions::event_names; 64 namespace events = extensions::event_names;
64 65
65 namespace { 66 namespace {
66 67
67 // Comparator that orders download items by their ID. Can be used with 68 // Comparator that orders download items by their ID. Can be used with
68 // std::sort. 69 // std::sort.
69 struct DownloadIdComparator { 70 struct DownloadIdComparator {
70 bool operator() (DownloadItem* first, DownloadItem* second) { 71 bool operator() (DownloadItem* first, DownloadItem* second) {
71 return first->GetId() < second->GetId(); 72 return first->GetId() < second->GetId();
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 " \"state\": {" 2083 " \"state\": {"
2083 " \"previous\": \"in_progress\"," 2084 " \"previous\": \"in_progress\","
2084 " \"current\": \"complete\"}}]", 2085 " \"current\": \"complete\"}}]",
2085 result_id, 2086 result_id,
2086 GetFilename("on_record.txt.crdownload").c_str(), 2087 GetFilename("on_record.txt.crdownload").c_str(),
2087 GetFilename("on_record.txt").c_str()))); 2088 GetFilename("on_record.txt").c_str())));
2088 std::string disk_data; 2089 std::string disk_data;
2089 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data)); 2090 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data));
2090 EXPECT_STREQ(kPayloadData, disk_data.c_str()); 2091 EXPECT_STREQ(kPayloadData, disk_data.c_str());
2091 } 2092 }
OLDNEW
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/net/url_request_mock_link_doctor_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698