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

Unified Diff: chrome/test/data/extensions/api_test/notification/api/csp/background.js

Issue 12313115: Take notification API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict. Created 7 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
Index: chrome/test/data/extensions/api_test/notification/api/csp/background.js
diff --git a/chrome/test/data/extensions/api_test/notification/api/csp/background.js b/chrome/test/data/extensions/api_test/notification/api/csp/background.js
deleted file mode 100644
index 266de2da03ea3c413a190b455a9f807c4933e72d..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/notification/api/csp/background.js
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-const notification = chrome.experimental.notification;
-
-var idString = "foo";
-
-var testCSP = function() {
- var onCreateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.succeed();
- return;
- }
- chrome.test.fail();
- }
-
- var options = {
- templateType: "basic",
- iconUrl: "http://google.com/clearly-a-security-problem.png",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.create(idString, options, onCreateCallback);
-};
-
-function testDataURL() {
- chrome.runtime.lastError = undefined;
- var onCreateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.fail();
- return;
- }
- chrome.test.succeed();
- }
- var options = {
- templateType: "basic",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.create(idString, options, onCreateCallback);
-}
-
-function testCSPUpdateIconURL() {
- var onUpdateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.succeed();
- return;
- }
- chrome.test.fail();
- };
- var onCreateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.fail();
- return;
- }
- var options2 = {
- templateType: "basic",
- iconUrl: "http://www.google.com/favicon.ico",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.update(idString, options2, onUpdateCallback);
- }
- var options = {
- templateType: "basic",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.create(idString, options, onCreateCallback);
-}
-
-function testCSPUpdateImageURL() {
- var onUpdateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.succeed();
- return;
- }
- chrome.test.fail();
- };
- var onCreateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.fail();
- return;
- }
- var options2 = {
- templateType: "basic",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- imageUrl: "http://www.google.com/favicon.ico",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.update(idString, options2, onUpdateCallback);
- }
- var options = {
- templateType: "image",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- imageUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- title: "Attention!",
- message: "Check out Cirque du Soleil"
- };
- notification.create(idString, options, onCreateCallback);
-}
-
-function testCSPUpdateButtonIconURL() {
- var onUpdateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.succeed();
- return;
- }
- chrome.test.fail();
- };
- var onCreateCallback = function(id) {
- if (chrome.runtime.lastError) {
- chrome.test.fail();
- return;
- }
- var options2 = {
- templateType: "basic",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- title: "Attention!",
- buttons: [ {
- title: "Foo",
- iconUrl: "http://www.google.com/favicon.ico"
- } ],
- message: "Check out Cirque du Soleil"
- };
- notification.update(idString, options2, onUpdateCallback);
- }
- var options = {
- templateType: "basic",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg==",
- title: "Attention!",
- buttons: [ {
- title: "Foo",
- iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAA" +
- "CNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHw" +
- "AAAABJRU5ErkJggg=="
- } ],
- message: "Check out Cirque du Soleil"
- };
- notification.create(idString, options, onCreateCallback);
-}
-chrome.test.runTests([
- testCSP,
- testDataURL,
- testCSPUpdateIconURL,
- testCSPUpdateImageURL,
- testCSPUpdateButtonIconURL ]);

Powered by Google App Engine
This is Rietveld 408576698