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

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

Issue 956403003: Fix the issue that wallpaper changes twice when both "onChanged" and "onAlarm" are fired. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the failed wallpaper sync test. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js
diff --git a/chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js b/chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js
index 74d6795e4996b618267e6e2910aa62cb31177b81..143e6c339ec091a389481bedc6dc57bb3564f669 100644
--- a/chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js
+++ b/chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js
@@ -215,6 +215,15 @@ var chrome = {
},
sync: {
get: function(key, callback) {
+ var items = {};
+ switch (key) {
+ case Constants.AccessSurpriseMeEnabledKey:
+ items[Constants.AccessSurpriseMeEnabledKey] = true;
+ case Constants.AccessLastSurpriseWallpaperChangedDate:
+ items[Constants.AccessLastSurpriseWallpaperChangedDate] =
+ new Date().toDateString();
+ }
+ callback(items);
},
set: function(items, callback) {
}
« no previous file with comments | « chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698