10163 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"#
The explanation of this is the following.
First we install an app "Super Crazy Basic App" and then we install the same app but update the name "Wild and Crazy Basic App".
The problem is what we retrieved was the earlier stored copy, and not the copy we just installed.
This must be a timing issue.. with inserting , and the callback... as in it isn't guaranteed that things are written to the data store, before we attempt to retrieve the app.
Looking into a bit more

Looks to me Like the implmentation in Webapps.jsm writes asynchronously, and the callback isn't being used to determine when the write has been completed.. as such it is entirely possible to get the first app to be returned.
Would recommend rewriting:
187 let dir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id], true, true);
188 let manFile = dir.clone();
189 manFile.append("manifest.json");
190 this._writeFile(manFile, JSON.stringify(app.manifest));
191 this.webapps[id] = appObject;
192
when we write to the file I think the rest of the function should be executed after the callback calls success.
_writeFile: function ss_writeFile(aFile, aData, aCallbak) {

I significantly rewrote the test code in Firefox 18, currently in central, so failures with this particular signature will no longer occur there (although they may still occur in aurora and beta, as one did yesterday).
There are still orangefactors in the code, like bug 790152 and bug 792791, and it's possible that the same underlying failure will manifest with a different signature, but then folks'll probably file a new bug rather than tracing the issue back to this one.
So I'm resolving this bug fixed. But I'm also assigning it to myself so it's on my radar if we need to reopen it.