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

Unified Diff: chrome/test/data/extensions/api_test/downloads/test.js

Issue 7825035: Implement chrome.experimental.downloads.search() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rewrite Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/download/download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/downloads/test.js
diff --git a/chrome/test/data/extensions/api_test/downloads/test.js b/chrome/test/data/extensions/api_test/downloads/test.js
index dd04343f738a4068cf4157c933b76237ae9f4b3d..b8f95c2edba51cb3b52c0890d4e44a184f6d84f6 100644
--- a/chrome/test/data/extensions/api_test/downloads/test.js
+++ b/chrome/test/data/extensions/api_test/downloads/test.js
@@ -36,6 +36,47 @@ chrome.test.getConfig(function(testConfig) {
chrome.test.runTests([
// TODO(benjhayden): Test onErased using remove().
+ TODO Enable and complete this test function after 8060042.
+ function downloadSearch() {
+ chrome.experimental.downloads.download(
+ {"url": getURL("slow?0"), "filename": "abc"},
+ function(id) {
+ chrome.test.assertEq(getNextId(), id);
+ });
+ chrome.experimental.downloads.download(
+ {"url": getURL("slow?0"), "filename": "a"},
+ function(id) {
+ chrome.test.assertEq(getNextId(), id);
+ });
+ chrome.experimental.downloads.download(
+ {"url": getURL("slow?0"), "filename": "b"},
+ function(id) {
+ chrome.test.assertEq(getNextId(), id);
+ });
+ chrome.experimental.downloads.download(
+ {"url": getURL("slow?0"), "filename": "c"},
+ function(id) {
+ chrome.test.assertEq(getNextId(), id);
+ });
+ chrome.experimental.downloads.search(
+ {},
+ function(results) {
+ chrome.test.assertEq(4, results.length);
+ // TODO
+ });
+ chrome.experimental.downloads.search(
+ {filename: "abc"},
+ function(results) {
+ chrome.test.assertEq(1, results.length);
+ // TODO
+ });
+ chrome.experimental.downloads.search(
+ {filename: "b"},
+ function(results) {
+ chrome.test.assertEq(2, results.length);
+ // TODO
+ });
+ },
function downloadFilename() {
chrome.experimental.downloads.download(
{"url": SAFE_FAST_URL, "filename": "foo"},
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/download/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698