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

Side by Side Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 10332272: Change modification date to include time and 'today' and 'yesterday' for appropriate dates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 function MockEventSource() { 5 function MockEventSource() {
6 this.listeners_ = []; 6 this.listeners_ = [];
7 } 7 }
8 8
9 /** 9 /**
10 * Add a listener. There is no remove. 10 * Add a listener. There is no remove.
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 RAR_ARCHIVE_FILE_TYPE: 'RAR archive', 607 RAR_ARCHIVE_FILE_TYPE: 'RAR archive',
608 TAR_ARCHIVE_FILE_TYPE: 'Tar archive', 608 TAR_ARCHIVE_FILE_TYPE: 'Tar archive',
609 TAR_BZIP2_ARCHIVE_FILE_TYPE: 'Bzip2 compressed tar archive', 609 TAR_BZIP2_ARCHIVE_FILE_TYPE: 'Bzip2 compressed tar archive',
610 TAR_GZIP_ARCHIVE_FILE_TYPE: 'Gzip compressed tar archive', 610 TAR_GZIP_ARCHIVE_FILE_TYPE: 'Gzip compressed tar archive',
611 PLAIN_TEXT_FILE_TYPE: 'Plain text file', 611 PLAIN_TEXT_FILE_TYPE: 'Plain text file',
612 PDF_DOCUMENT_FILE_TYPE: 'PDF document', 612 PDF_DOCUMENT_FILE_TYPE: 'PDF document',
613 WORD_DOCUMENT_FILE_TYPE: 'Word document', 613 WORD_DOCUMENT_FILE_TYPE: 'Word document',
614 POWERPOINT_PRESENTATION_FILE_TYPE: 'PowerPoint presentation', 614 POWERPOINT_PRESENTATION_FILE_TYPE: 'PowerPoint presentation',
615 EXCEL_FILE_TYPE: 'Excel spreadsheet', 615 EXCEL_FILE_TYPE: 'Excel spreadsheet',
616 616
617 SEARCH_NO_MATCHING_FILES: 'No files match <b>"$1"</b>' 617 SEARCH_NO_MATCHING_FILES: 'No files match <b>"$1"</b>',
618
619 TIME_TODAY: 'Today $1',
620 TIME_YESTERDAY: 'Yesterday $1'
618 }); 621 });
619 } 622 }
620 }; 623 };
621 624
622 /** 625 /**
623 * Mock object for |chrome.extension|. 626 * Mock object for |chrome.extension|.
624 */ 627 */
625 chrome.extension = { 628 chrome.extension = {
626 /** 629 /**
627 * @param {string} path Extension-relative path. 630 * @param {string} path Extension-relative path.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 719
717 setWindowHeight: function(height) { 720 setWindowHeight: function(height) {
718 this.popup_.style.height = height + 'px'; 721 this.popup_.style.height = height + 'px';
719 }, 722 },
720 723
721 closeWindow: function() { 724 closeWindow: function() {
722 this.popup_.parentNode.removeChild(this.popup_); 725 this.popup_.parentNode.removeChild(this.popup_);
723 this.popup_ = null; 726 this.popup_ = null;
724 } 727 }
725 }; 728 };
729
730 /**
731 * TODO(olege): Remove once a Chrome with this interface available is released.
732 */
733 var v8Intl = (function() {
734
735 var v8Intl = {};
736
737 /**
738 * Constructs v8Intl.DateTimeFormat object given optional locales and options
739 * parameters.
740 *
741 * @constructor
742 * @param {Array?} locales Unused in the mock.
743 * @param {Object} options Unused in the mock.
744 */
745 v8Intl.DateTimeFormat = function(locales, options) {
746 return {
747 format: function(dateValue) {
748 return dateValue.toString();
749 }
750 };
751 };
752
753 return v8Intl;
754 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698