1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/newtab/browser_newtab_bug725996.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,23 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +function runTests() { 1.8 + yield setLinks("0,1,2,3,4,5,6,7,8"); 1.9 + setPinnedLinks(""); 1.10 + 1.11 + yield addNewTabPageTab(); 1.12 + checkGrid("0,1,2,3,4,5,6,7,8"); 1.13 + 1.14 + let cell = getCell(0).node; 1.15 + 1.16 + sendDragEvent("drop", cell, "http://example.com/#99\nblank"); 1.17 + is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", 1.18 + "first cell is pinned and contains the dropped site"); 1.19 + 1.20 + yield whenPagesUpdated(); 1.21 + checkGrid("99p,0,1,2,3,4,5,6,7"); 1.22 + 1.23 + sendDragEvent("drop", cell, ""); 1.24 + is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", 1.25 + "first cell is still pinned with the site we dropped before"); 1.26 +}