michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function runTests() { michael@0: yield setLinks("0,1,2,3,4,5,6,7,8"); michael@0: setPinnedLinks(""); michael@0: michael@0: yield addNewTabPageTab(); michael@0: checkGrid("0,1,2,3,4,5,6,7,8"); michael@0: michael@0: let cell = getCell(0).node; michael@0: michael@0: sendDragEvent("drop", cell, "http://example.com/#99\nblank"); michael@0: is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", michael@0: "first cell is pinned and contains the dropped site"); michael@0: michael@0: yield whenPagesUpdated(); michael@0: checkGrid("99p,0,1,2,3,4,5,6,7"); michael@0: michael@0: sendDragEvent("drop", cell, ""); michael@0: is(NewTabUtils.pinnedLinks.links[0].url, "http://example.com/#99", michael@0: "first cell is still pinned with the site we dropped before"); michael@0: }