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

Unified Diff: chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js

Issue 320043003: Fixes a typo in notifications that prevented large image scaling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/renderer/extensions/notifications_native_handler.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/notifications/api/basic_usage/background.js
diff --git a/chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js b/chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js
index 50fb49d11e8f8d48da41e98ffbcaf30349656640..e1d010605b9658fe419babbf6e19267c40df9d09 100644
--- a/chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js
+++ b/chrome/test/data/extensions/api_test/notifications/api/basic_usage/background.js
@@ -8,6 +8,17 @@ const red_dot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA" +
"AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO" +
"9TXL0Y4OHwAAAABJRU5ErkJggg==";
+function createBigImageUrl() {
+ var canvas = document.createElement('canvas');
+ canvas.width = 5000;
+ canvas.height = 5000;
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = "rgb(200, 0, 0)";
+ ctx.fillRect(10, 20, 30, 40);
+
+ return canvas.toDataURL();
+};
+
var basicNotificationOptions = {
type: "basic",
title: "Basic title",
@@ -300,6 +311,21 @@ function testProgress() {
}).then(fail, succeed);
}
+function testLargeImage() {
+ var testName = "testLargeImage";
+ console.log("Starting " + testName);
+ var succeed = succeedTest(testName);
+ var fail = failTest(testName);
+ var options = {
+ type: "basic",
+ title: "Basic title",
+ message: "Basic message",
+ iconUrl: createBigImageUrl(),
+ };
+ create("largeImage", options).then(succeed, fail);
+}
+
chrome.test.runTests([
- testIdUsage, testBaseFormat, testListItem, testGetAll, testProgress
+ testIdUsage, testBaseFormat, testListItem, testGetAll, testProgress,
+ testLargeImage
]);
« no previous file with comments | « chrome/renderer/extensions/notifications_native_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698