1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 function testUnregister() {
7 var senderIds = ["Sender1", "Sender2"];
8 chrome.gcm.register(senderIds, function(registrationId) {
9 if (chrome.runtime.lastError)
11 chrome.gcm.unregister(function() {
12 if (chrome.runtime.lastError)
15 chrome.test.succeed();
19 function testUnregisterWithServerError() {
20 chrome.gcm.unregister(function() {
21 if (chrome.runtime.lastError != undefined &&
22 chrome.runtime.lastError.message == "Server error occurred.") {
23 chrome.test.succeed();