/* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ // Tests for b2g/components/SignInToWebsite.jsm "use strict"; XPCOMUtils.defineLazyModuleGetter(this, "MinimalIDService", "resource://gre/modules/identity/MinimalIdentity.jsm", "IdentityService"); XPCOMUtils.defineLazyModuleGetter(this, "SignInToWebsiteController", "resource://gre/modules/SignInToWebsite.jsm", "SignInToWebsiteController"); Cu.import("resource://gre/modules/identity/LogUtils.jsm"); function log(...aMessageArgs) { Logger.log.apply(Logger, ["test_signintowebsite"].concat(aMessageArgs)); } function test_overall() { do_check_neq(MinimalIDService, null); run_next_test(); } function objectContains(object, subset) { let objectKeys = Object.keys(object); let subsetKeys = Object.keys(subset); // can't have fewer keys than the subset if (objectKeys.length < subsetKeys.length) { return false; } let key; let success = true; if (subsetKeys.length > 0) { for (let i=0; i