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

Side by Side Diff: chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js

Issue 676403002: Sync wallpaper based on sync themes setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 5
6 var TestConstants = { 6 var TestConstants = {
7 wallpaperURL: 'https://test.com/test.jpg', 7 wallpaperURL: 'https://test.com/test.jpg',
8 // A dummy string which is used to mock an image. 8 // A dummy string which is used to mock an image.
9 image: '*#*@#&' 9 image: '*#*@#&'
10 }; 10 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }, 59 },
60 alarms: { 60 alarms: {
61 onAlarm: { 61 onAlarm: {
62 addListener: function(listener) { 62 addListener: function(listener) {
63 } 63 }
64 } 64 }
65 }, 65 },
66 wallpaperPrivate: { 66 wallpaperPrivate: {
67 getStrings: function(callback) { 67 getStrings: function(callback) {
68 callback({isExperimental: false}); 68 callback({isExperimental: false});
69 },
70 getSyncSetting: function(callback) {
71 callback({syncThemes: true});
69 } 72 }
70 } 73 }
71 }; 74 };
72 75
73 (function (exports) { 76 (function (exports) {
74 var originalXMLHttpRequest = window.XMLHttpRequest; 77 var originalXMLHttpRequest = window.XMLHttpRequest;
75 78
76 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status 79 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status
77 // equals to 200 in function |send|. 80 // equals to 200 in function |send|.
78 function MockXMLHttpRequest() { 81 function MockXMLHttpRequest() {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }; 129 };
127 130
128 function uninstallMockXMLHttpRequest() { 131 function uninstallMockXMLHttpRequest() {
129 window['XMLHttpRequest'] = originalXMLHttpRequest; 132 window['XMLHttpRequest'] = originalXMLHttpRequest;
130 }; 133 };
131 134
132 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; 135 exports.installMockXMLHttpRequest = installMockXMLHttpRequest;
133 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; 136 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest;
134 137
135 })(window); 138 })(window);
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/wallpaper_private.json ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698