| 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 "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/history/download_row.h" | |
| 11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/webui/downloads_dom_handler.h" | 12 #include "chrome/browser/ui/webui/downloads_dom_handler.h" |
| 14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 15 #include "chrome/test/base/in_process_browser_test.h" | 14 #include "chrome/test/base/in_process_browser_test.h" |
| 15 #include "components/history/core/browser/download_row.h" |
| 16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 17 #include "content/public/test/mock_download_item.h" | 17 #include "content/public/test/mock_download_item.h" |
| 18 #include "content/public/test/mock_download_manager.h" | 18 #include "content/public/test/mock_download_manager.h" |
| 19 #include "content/public/test/test_utils.h" | 19 #include "content/public/test/test_utils.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Reads |right_json| into a ListValue |left_list|; returns true if all | 23 // Reads |right_json| into a ListValue |left_list|; returns true if all |
| 24 // key-value pairs in in all dictionaries in |right_list| are also in the | 24 // key-value pairs in in all dictionaries in |right_list| are also in the |
| 25 // corresponding dictionary in |left_list|. Ignores keys in dictionaries in | 25 // corresponding dictionary in |left_list|. Ignores keys in dictionaries in |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record | 278 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record |
| 279 // calls can't access off-record items. | 279 // calls can't access off-record items. |
| 280 | 280 |
| 281 // TODO(benjhayden): Test that bad download ids incoming from the javascript are | 281 // TODO(benjhayden): Test that bad download ids incoming from the javascript are |
| 282 // dropped on the floor. | 282 // dropped on the floor. |
| 283 | 283 |
| 284 // TODO(benjhayden): Test that IsTemporary() downloads are not shown. | 284 // TODO(benjhayden): Test that IsTemporary() downloads are not shown. |
| 285 | 285 |
| 286 // TODO(benjhayden): Test that RemoveObserver is called on all download items, | 286 // TODO(benjhayden): Test that RemoveObserver is called on all download items, |
| 287 // including items that crossed IsTemporary() and back. | 287 // including items that crossed IsTemporary() and back. |
| OLD | NEW |