mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 12:59:23 -10:00
68 lines
2.1 KiB
HTML
68 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf8">
|
|
<title></title>
|
|
|
|
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script>
|
|
<script type="application/javascript;version=1.8" src="head.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script type="application/javascript;version=1.8">
|
|
window.onload = function() {
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
Task.spawn(function* () {
|
|
let clClass = Components.classes["@mozilla.org/toolkit/command-line;1"].createInstance();
|
|
|
|
Cu.import("resource://gre/modules/devtools/dbg-server.jsm");
|
|
DebuggerServer.init(function () { return true; });
|
|
DebuggerServer.addBrowserActors();
|
|
|
|
let win = yield openWebIDE();
|
|
|
|
|
|
let packagedAppLocation = getTestFilePath("app");
|
|
|
|
let cli = "actions=addPackagedApp&location=" + packagedAppLocation;
|
|
yield win.handleCommandline(cli);
|
|
|
|
let project = win.AppManager.selectedProject;
|
|
is(project.location, packagedAppLocation, "Project imported");
|
|
|
|
win.AppManager.runtimeList.usb.push({
|
|
connect: function(connection) {
|
|
ok(connection, win.AppManager.connection, "connection is valid");
|
|
connection.host = null; // force connectPipe
|
|
connection.connect();
|
|
return promise.resolve();
|
|
},
|
|
getName: function() {
|
|
return "fakeRuntime";
|
|
}
|
|
});
|
|
|
|
yield win.handleCommandline("actions=connectToRuntime&runtimeType=usb");
|
|
|
|
is(win.AppManager.connection.status, "connected", "connected");
|
|
is(win.AppManager.selectedProject.name, "A name (in app directory)", "project imported");
|
|
|
|
yield removeAllProjects();
|
|
yield closeWebIDE(win);
|
|
DebuggerServer.destroy();
|
|
SimpleTest.finish();
|
|
|
|
});
|
|
}
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|