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

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

Issue 10332311: Remove remaining uses of v8Locale. Fix the call to v8Intl.DateTimeFormat(). (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
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 }, 722 },
723 723
724 closeWindow: function() { 724 closeWindow: function() {
725 this.popup_.parentNode.removeChild(this.popup_); 725 this.popup_.parentNode.removeChild(this.popup_);
726 this.popup_ = null; 726 this.popup_ = null;
727 } 727 }
728 }; 728 };
729 729
730 /** 730 /**
731 * TODO(olege): Remove once a Chrome with this interface available is released. 731 * TODO(olege): Remove once a Chrome with this interface available is released.
732 */ 732 */
Nebojša Ćirić 2012/05/23 15:57:38 Just a question - do you still need this section?
Oleg Eterevsky 2012/05/23 16:19:23 We are using these mocks to run file browser in a
733 var v8Intl = (function() { 733 var v8Intl = (function() {
734 734
735 var v8Intl = {}; 735 var v8Intl = {};
736 736
737 /** 737 /**
738 * Constructs v8Intl.DateTimeFormat object given optional locales and options 738 * Constructs v8Intl.DateTimeFormat object given optional locales and options
739 * parameters. 739 * parameters.
740 * 740 *
741 * @constructor 741 * @constructor
742 * @param {Array?} locales Unused in the mock. 742 * @param {Array?} locales Unused in the mock.
743 * @param {Object} options Unused in the mock. 743 * @param {Object} options Unused in the mock.
744 */ 744 */
745 v8Intl.DateTimeFormat = function(locales, options) { 745 v8Intl.DateTimeFormat = function(locales, options) {
746 return { 746 return {
747 format: function(dateValue) { 747 format: function(dateValue) {
748 return dateValue.toString(); 748 return dateValue.toString();
749 } 749 }
750 }; 750 };
751 }; 751 };
752 752
753 /**
754 * @constructor
755 * @param {Array?} locales Unused in the mock.
756 * @param {Object} options Unused in the mock.
757 */
758 v8Intl.Collator = function(locales, options) {
759 return {
760 compare: function(a, b) {
761 if (a > b) return 1;
762 if (a < b) return -1;
763 return 0;
764 }
765 };
766 };
767
753 return v8Intl; 768 return v8Intl;
754 }()); 769 }());
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698