|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
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"); |
|
12 |
|
13 yield addNewTabPageTab(); |
|
14 checkGrid("0p,1p,2p,3,4,5p,6,7,8"); |
|
15 |
|
16 let cw = getContentWindow(); |
|
17 cw.gDrag._draggedSite = getCell(0).site; |
|
18 let sites = cw.gDropPreview.rearrange(getCell(4)); |
|
19 cw.gDrag._draggedSite = null; |
|
20 |
|
21 checkGrid("3,1p,2p,4,0p,5p,6,7,8", sites); |
|
22 } |