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

Unified Diff: chrome/test/data/extensions/api_test/wallpaper/test.js

Issue 1989653002: [Retry] Fix the browser crash when changing wallpaper with chrome.wallpaper API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/wallpaper/test.js
diff --git a/chrome/test/data/extensions/api_test/wallpaper/test.js b/chrome/test/data/extensions/api_test/wallpaper/test.js
index 9302d1bb617db3d40b028c8f69af2898f633a0ba..57d5b02b0c4400c58de2f119fffef973c52d58d5 100644
--- a/chrome/test/data/extensions/api_test/wallpaper/test.js
+++ b/chrome/test/data/extensions/api_test/wallpaper/test.js
@@ -74,6 +74,19 @@ chrome.test.getConfig(function(config) {
}
};
+ var testSetWallpaperThumbnail = function(relativeURL) {
+ var url = baseURL + relativeURL;
+ chrome.wallpaper.setWallpaper(
+ { 'url': url,
+ 'layout': 'CENTER_CROPPED',
+ 'filename': 'test',
+ 'thumbnail': true
+ }, pass(function(thumbnail) {
+ var buffer = new Uint8Array(thumbnail);
+ chrome.test.assertTrue(buffer.length > 0);
+ }));
+ };
+
chrome.test.runTests([
function setJpgWallpaperFromAppLocalFile() {
testSetWallpaperFromArrayBuffer('test.jpg');
@@ -104,6 +117,9 @@ chrome.test.getConfig(function(config) {
false,
'Set wallpaper was canceled.');
testSetWallpaperFromURL('test.jpg', true);
+ },
+ function getThumbnailAferSetWallpaper() {
+ testSetWallpaperThumbnail('test.jpg');
}
]);
});
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698