| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.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/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/prefs/pref_service.h" | |
| 12 #include "base/values.h" | 11 #include "base/values.h" |
| 13 #include "chrome/browser/download/download_item_model.h" | 12 #include "chrome/browser/download/download_item_model.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/webui/downloads_dom_handler.h" | 15 #include "chrome/browser/ui/webui/downloads_dom_handler.h" |
| 17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
| 18 #include "components/prefs/pref_service.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "content/public/test/mock_download_item.h" | 20 #include "content/public/test/mock_download_item.h" |
| 21 #include "content/public/test/mock_download_manager.h" | 21 #include "content/public/test/mock_download_manager.h" |
| 22 #include "content/public/test/test_utils.h" | 22 #include "content/public/test/test_utils.h" |
| 23 #include "net/test/embedded_test_server/embedded_test_server.h" | 23 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Reads |right_json| into a ListValue |left_list|; returns true if all | 27 // Reads |right_json| into a ListValue |left_list|; returns true if all |
| 28 // key-value pairs in in all dictionaries in |right_list| are also in the | 28 // key-value pairs in in all dictionaries in |right_list| are also in the |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record | 321 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record |
| 322 // calls can't access off-record items. | 322 // calls can't access off-record items. |
| 323 | 323 |
| 324 // TODO(benjhayden): Test that bad download ids incoming from the javascript are | 324 // TODO(benjhayden): Test that bad download ids incoming from the javascript are |
| 325 // dropped on the floor. | 325 // dropped on the floor. |
| 326 | 326 |
| 327 // TODO(benjhayden): Test that IsTemporary() downloads are not shown. | 327 // TODO(benjhayden): Test that IsTemporary() downloads are not shown. |
| 328 | 328 |
| 329 // TODO(benjhayden): Test that RemoveObserver is called on all download items, | 329 // TODO(benjhayden): Test that RemoveObserver is called on all download items, |
| 330 // including items that crossed IsTemporary() and back. | 330 // including items that crossed IsTemporary() and back. |
| OLD | NEW |