| 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 ]);
|
|
|