michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: "use strict"; michael@0: michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: //// Globals michael@0: michael@0: Components.utils.import("resource://services-sync/main.js"); michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: //// Test(s) michael@0: michael@0: function test() { michael@0: runTests(); michael@0: } michael@0: michael@0: gTests.push({ michael@0: desc: "Test sync tabs from other devices UI", michael@0: run: function run() { michael@0: if (BrowserUI.isStartTabVisible) michael@0: return; michael@0: michael@0: yield addTab("about:start"); michael@0: yield waitForCondition(() => BrowserUI.isStartTabVisible); michael@0: yield hideContextUI(); michael@0: michael@0: is(Weave.Status.checkSetup(), Weave.CLIENT_NOT_CONFIGURED, "Sync should be disabled on start"); michael@0: michael@0: let vbox = Browser.selectedBrowser.contentDocument.getElementById("start-remotetabs"); michael@0: ok(vbox.hidden, "remote tabs in the start page should be hidden when sync is not enabled"); michael@0: michael@0: Browser.selectedBrowser.contentWindow.RemoteTabsStartView._view.setUIAccessVisible(true); michael@0: michael@0: // start page grid should be visible michael@0: ok(vbox, "remote tabs grid is present on start page"); michael@0: is(vbox.hidden, false, "remote tabs should be visible in start page when sync is enabled"); michael@0: michael@0: Browser.selectedBrowser.contentWindow.RemoteTabsStartView._view.setUIAccessVisible(false); michael@0: michael@0: ok(vbox.hidden, "remote tabs in the start page should be hidden when sync is not enabled"); michael@0: } michael@0: });