diff -r 000000000000 -r 6474c204b198 browser/base/content/test/newtab/browser_newtab_bug725996.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/base/content/test/newtab/browser_newtab_bug725996.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,23 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +function runTests() { + yield setLinks("0,1,2,3,4,5,6,7,8"); + setPinnedLinks(""); + + yield addNewTabPageTab(); + checkGrid("0,1,2,3,4,5,6,7,8"); + + let cell = getCell(0).node; + + sendDragEvent("drop", cell, "http://example.com/#99\nblank"); + is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", + "first cell is pinned and contains the dropped site"); + + yield whenPagesUpdated(); + checkGrid("99p,0,1,2,3,4,5,6,7"); + + sendDragEvent("drop", cell, ""); + is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", + "first cell is still pinned with the site we dropped before"); +}