Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 5 | "use strict"; |
michael@0 | 6 | |
michael@0 | 7 | //////////////////////////////////////////////////////////////////////////////// |
michael@0 | 8 | //// Globals |
michael@0 | 9 | |
michael@0 | 10 | Components.utils.import("resource://services-sync/main.js"); |
michael@0 | 11 | //////////////////////////////////////////////////////////////////////////////// |
michael@0 | 12 | //// Test(s) |
michael@0 | 13 | |
michael@0 | 14 | function test() { |
michael@0 | 15 | runTests(); |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | gTests.push({ |
michael@0 | 19 | desc: "Test sync tabs from other devices UI", |
michael@0 | 20 | run: function run() { |
michael@0 | 21 | if (BrowserUI.isStartTabVisible) |
michael@0 | 22 | return; |
michael@0 | 23 | |
michael@0 | 24 | yield addTab("about:start"); |
michael@0 | 25 | yield waitForCondition(() => BrowserUI.isStartTabVisible); |
michael@0 | 26 | yield hideContextUI(); |
michael@0 | 27 | |
michael@0 | 28 | is(Weave.Status.checkSetup(), Weave.CLIENT_NOT_CONFIGURED, "Sync should be disabled on start"); |
michael@0 | 29 | |
michael@0 | 30 | let vbox = Browser.selectedBrowser.contentDocument.getElementById("start-remotetabs"); |
michael@0 | 31 | ok(vbox.hidden, "remote tabs in the start page should be hidden when sync is not enabled"); |
michael@0 | 32 | |
michael@0 | 33 | Browser.selectedBrowser.contentWindow.RemoteTabsStartView._view.setUIAccessVisible(true); |
michael@0 | 34 | |
michael@0 | 35 | // start page grid should be visible |
michael@0 | 36 | ok(vbox, "remote tabs grid is present on start page"); |
michael@0 | 37 | is(vbox.hidden, false, "remote tabs should be visible in start page when sync is enabled"); |
michael@0 | 38 | |
michael@0 | 39 | Browser.selectedBrowser.contentWindow.RemoteTabsStartView._view.setUIAccessVisible(false); |
michael@0 | 40 | |
michael@0 | 41 | ok(vbox.hidden, "remote tabs in the start page should be hidden when sync is not enabled"); |
michael@0 | 42 | } |
michael@0 | 43 | }); |