OLD | NEW |
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/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/prefs/pref_service.h" |
11 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
12 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
13 #include "chrome/browser/download/download_file_icon_extractor.h" | 14 #include "chrome/browser/download/download_file_icon_extractor.h" |
14 #include "chrome/browser/download/download_service.h" | 15 #include "chrome/browser/download/download_service.h" |
15 #include "chrome/browser/download/download_service_factory.h" | 16 #include "chrome/browser/download/download_service_factory.h" |
16 #include "chrome/browser/download/download_test_file_activity_observer.h" | 17 #include "chrome/browser/download/download_test_file_activity_observer.h" |
17 #include "chrome/browser/extensions/api/downloads/downloads_api.h" | 18 #include "chrome/browser/extensions/api/downloads/downloads_api.h" |
18 #include "chrome/browser/extensions/event_names.h" | 19 #include "chrome/browser/extensions/event_names.h" |
19 #include "chrome/browser/extensions/extension_apitest.h" | 20 #include "chrome/browser/extensions/extension_apitest.h" |
20 #include "chrome/browser/extensions/extension_function_test_utils.h" | 21 #include "chrome/browser/extensions/extension_function_test_utils.h" |
21 #include "chrome/browser/history/download_row.h" | 22 #include "chrome/browser/history/download_row.h" |
22 #include "chrome/browser/net/url_request_mock_util.h" | 23 #include "chrome/browser/net/url_request_mock_util.h" |
23 #include "chrome/browser/prefs/pref_service.h" | |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
26 #include "chrome/browser/ui/browser_tabstrip.h" | 26 #include "chrome/browser/ui/browser_tabstrip.h" |
27 #include "chrome/common/chrome_notification_types.h" | 27 #include "chrome/common/chrome_notification_types.h" |
28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
29 #include "chrome/test/base/in_process_browser_test.h" | 29 #include "chrome/test/base/in_process_browser_test.h" |
30 #include "chrome/test/base/ui_test_utils.h" | 30 #include "chrome/test/base/ui_test_utils.h" |
31 #include "content/public/browser/browser_context.h" | 31 #include "content/public/browser/browser_context.h" |
32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/download_item.h" | 33 #include "content/public/browser/download_item.h" |
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 " \"state\": {" | 2130 " \"state\": {" |
2131 " \"previous\": \"in_progress\"," | 2131 " \"previous\": \"in_progress\"," |
2132 " \"current\": \"complete\"}}]", | 2132 " \"current\": \"complete\"}}]", |
2133 result_id, | 2133 result_id, |
2134 GetFilename("on_record.txt.crdownload").c_str(), | 2134 GetFilename("on_record.txt.crdownload").c_str(), |
2135 GetFilename("on_record.txt").c_str()))); | 2135 GetFilename("on_record.txt").c_str()))); |
2136 std::string disk_data; | 2136 std::string disk_data; |
2137 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data)); | 2137 EXPECT_TRUE(file_util::ReadFileToString(item->GetFullPath(), &disk_data)); |
2138 EXPECT_STREQ(kPayloadData, disk_data.c_str()); | 2138 EXPECT_STREQ(kPayloadData, disk_data.c_str()); |
2139 } | 2139 } |
OLD | NEW |