- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / downloads_split / accept_danger.js
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 chrome.downloads.search({}, function(items) {
6   for (var i = 0; i < items.length; ++i) {
7     if (items[i].state == 'in_progress' &&
8         items[i].danger != 'safe' &&
9         items[i].danger != 'accepted') {
10       console.log(items[i].id);
11       chrome.downloads.acceptDanger(items[i].id);
12     }
13   }
14 });