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

Unified Diff: chrome/browser/ui/webui/downloads_ui_browsertest.js

Issue 253543002: web_dev_style: check webui browser tests as well. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 8 months 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
Index: chrome/browser/ui/webui/downloads_ui_browsertest.js
diff --git a/chrome/browser/ui/webui/downloads_ui_browsertest.js b/chrome/browser/ui/webui/downloads_ui_browsertest.js
index f4e43c82f45f6cc652ee6333d070b229d5f39b76..1cd786a13bc26139bb8d223454e85ed99c0d0030 100644
--- a/chrome/browser/ui/webui/downloads_ui_browsertest.js
+++ b/chrome/browser/ui/webui/downloads_ui_browsertest.js
@@ -56,30 +56,31 @@ BaseDownloadsWebUITest.prototype = {
/**
* Creates a download object to be passed to the page, following the expected
* backend format (see downloads_dom_handler.cc).
- * @param {Number} A unique ID for the download.
- * @param {Number} The time the download purportedly started.
+ * @param {number} A unique ID for the download.
+ * @param {number} The time the download purportedly started.
+ * @return {!Object} A fake download object.
+ * @private
*/
createDownload_: function(id, timestamp) {
- var download = {};
- download.id = id;
- download.started = timestamp;
- download.otr = false;
- download.state = Download.States.COMPLETE;
- download.retry = false;
- download.file_path = '/path/to/file';
- download.file_url = 'http://google.com/' + timestamp;
- download.file_name = 'download_' + timestamp;
- download.url = 'http://google.com/' + timestamp;
- download.file_externally_removed = false;
- download.danger_type = Download.DangerType.NOT_DANGEROUS;
- download.last_reason_text = '';
- download.since_string = 'today';
- download.date_string = 'today';
- download.percent = 100;
- download.progress_status_text = 'done';
- download.received = 128;
-
- return download;
+ return {
+ id: id,
+ started: timestamp,
+ otr: false,
+ state: Download.States.COMPLETE,
+ retry: false,
+ file_path: '/path/to/file',
+ file_url: 'http://google.com/' + timestamp,
+ file_name: 'download_' + timestamp,
+ url: 'http://google.com/' + timestamp,
+ file_externally_removed: false,
+ danger_type: Download.DangerType.NOT_DANGEROUS,
+ last_reason_text: '',
+ since_string: 'today',
+ date_string: 'today',
+ percent: 100,
+ progress_status_text: 'done',
+ received: 128,
+ };
},
/**
« no previous file with comments | « chrome/browser/test_presubmit.py ('k') | chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698