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.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /*
5 * These tests ensure that the drop preview correctly arranges sites when
6 * dragging them around.
7 */
8 function runTests() {
9 // the first three sites are pinned - make sure they're re-arranged correctly
10 yield setLinks("0,1,2,3,4,5,6,7,8");
11 setPinnedLinks("0,1,2,,,5");
13 yield addNewTabPageTab();
14 checkGrid("0p,1p,2p,3,4,5p,6,7,8");
16 let cw = getContentWindow();
17 cw.gDrag._draggedSite = getCell(0).site;
18 let sites = cw.gDropPreview.rearrange(getCell(4));
19 cw.gDrag._draggedSite = null;
21 checkGrid("3,1p,2p,4,0p,5p,6,7,8", sites);
22 }