OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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. |
| 4 |
| 5 chrome.extension.onRequest.addListener(function(msg, sender, responseFunc) { |
| 6 if (msg == "getApi") { |
| 7 responseFunc(chrome.test.getApiDefinitions()); |
| 8 } else if (msg == "pass") { |
| 9 chrome.test.notifyPass(); |
| 10 } else if (msg.substr(0, 3) == "log") { |
| 11 chrome.test.log(msg); |
| 12 } else { |
| 13 chrome.test.notifyFail("failed"); |
| 14 } |
| 15 }); |
| 16 |
| 17 // On first install, send a success message so the test can continue. |
| 18 chrome.test.notifyPass(); |
OLD | NEW |