зеркало из https://github.com/mozilla/pluotsorbet.git
only register echo pipe when running tests
This commit is contained in:
Родитель
4737421d94
Коммит
b3c65bf3c2
7
index.js
7
index.js
|
@ -20,7 +20,8 @@ function loadScript(path) {
|
|||
var midletClassName = urlParams.midletClassName ? urlParams.midletClassName.replace(/\//g, '.') : "RunTests";
|
||||
var loadingPromises = [];
|
||||
if (midletClassName == "RunTests") {
|
||||
loadingPromises.push(loadScript("tests/contacts.js"));
|
||||
loadingPromises.push(loadScript("tests/contacts.js"),
|
||||
loadScript("tests/index.js"));
|
||||
}
|
||||
|
||||
Promise.all(loadingPromises).then(function() {
|
||||
|
@ -151,10 +152,6 @@ document.getElementById("mozbrowser").addEventListener("mozbrowsershowmodalpromp
|
|||
DumbPipe.handleEvent.bind(DumbPipe),
|
||||
true);
|
||||
|
||||
DumbPipe.registerOpener("echo", function(message, sender) {
|
||||
sender(message);
|
||||
});
|
||||
|
||||
DumbPipe.registerOpener("mobileInfo", function(message, sender) {
|
||||
// Initialize the object with the URL params and fallback placeholders
|
||||
// for testing/debugging on a desktop.
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
DumbPipe.registerOpener("echo", function(message, sender) {
|
||||
sender(message);
|
||||
});
|
Загрузка…
Ссылка в новой задаче