We need a list of all the things that we need to test for about:newtab. Here's the list (brace yourself, it's a long one)
verify that hidden pre-loaded newts don’t allow background captures, and when unhidden, do allow background captures (using PageThumbs.jsm and firing "page-thumbnail:create" observer)
blocking/removing sites from the grid work. Pinned tabs shouldn’t be moved and gaps will be refilled if more sites available
includes removing pinned sites, removing last site on grid (in a pinned state), then first site on grid and seeing all cells but last one shift to the left and a new site fade in
includes testing that blocking the targeted site also removes its associated suggested tile
display the URL of the page on mouseover of thumbnails on about:newtab (verifying tooltip text)
clear internal links cache on 'browser:purge-session-history’ immediately and not the next time you open firefox (add fake visits to a fake site then sanitize history)
can't Hide/Show New Tab Page when closing left tab (test if newtab page is enabled/disabled by updating “browser.newtabpage.enabled” or through customization panel)
dragging and clicking on a thumbnail doesn’t freeze the thumbnail grid
New Tab Page should not respond to dragged bookmark folders
prevent already blocked sites from being removed from the grid
dropping blocked links onto the grid again should unblock them (ensure you unblock the link before pinning it on the grid when accepting an external drop)
make the number of rows and columns adjustable (verify “browser.newtabpage.rows” & “browser.newtabpage.columns” prefs update the length of grid properly)
ensure you cannot drop “bad data” from external links onto the grid. Ex of bad data: if "javascript:alert('h4ck0rz');\nbad stuff”; is the url of a link attempting to be dragged and dropped onto grid, do not allow for the drop to happen. only accept secure URLs
make sure that the changes made by unpinning a site are actually written to NewTabUtils' storage.
verify that middle clicks can happen on the tiles
make sure the grid has a computed cell margin, cell height, cell width, grid height, grid max-height, grid max-width (no weird tile placements on the grid)
verify that middle clicks on tiles don’t block the tiles
suggested tiles should not be pinned - they must become part of user history once pinned. pin a suggested tile and check the following:
link is of type history
link url points to the base domain
link doesn’t have an enhanced image
link title is now the base domain
link has been added to the internal list of pinned links
ensure that the pinned suggested tile doesn’t lose type “history” after it’s been clicked
make sure that the 'New Tab Page' feature can be disabled (no sites are rendered if newtab page is disabled and grid has “page-disabled” attribute)
make sure that dragging and dropping sites works as expected. Sites contained in the grid need to shift around to indicate the result of the drag-and-drop operation. If the grid is full and we're dragging a new site into it another one gets pushed out. Both for sites on grid and for dragging external sites onto the grid. Includes the following test cases:
drag a new site onto the grid and make sure that pinned cells don't get pushed out
drag a cell to its current cell and make sure it's not pinned afterwards
ensure that pinned pages aren't moved if that's not necessary
pinned sites should always be moved around as blocks. if a pinned site is moved around, neighboring pinned are affected as well
force the grid to be small enough that a pinned cell could be pushed out
drag a new site beneath a pinned cell and make sure the pinned cell is not moved
drag a new site onto a block of pinned sites and make sure they're shifted around accordingly
ensure that the drop preview correctly arranges sites when dragging them around.
make sure that focusing the 'New Tage Page' works as expected Focus count should be 30 (30 = 9 * 3 + 3 = 9 sites, each with link, pin and remove buttons; search bar; search button; and toggle button). Includes the following cases:
focus the urlbar and count how many focus stops to return again to the url bar with the enabled page
focus the urlbar and count how many focus stops to return again to the url bar with the disabled page
test that the intro is automatically shown on first opening of newtab page, and whenever newtab gets an update. Remember that the intro was shown and do not show the into on second opening. Test with both preload false and true with same behaviour expected
ensure that all changes made to the new tab page in private browsing mode are discarded after switching back to normal mode again. The private browsing mode should start with the current grid shown in normal mode
ensure that loading about:newtab doesn't cause uninterruptible reflows
test reportSitesAction
test search stuff
test that sponsored explanation is shown for sponsored tiles, and that dismissing the explanation no longer shows the explanation. Test with enhanced tiles as well
make sure the undo dialog works (clicks happen and the grid updates) as expected under the following test cases:
remove unpinned sites and undo it
remove a pinned site and undo it
remove a site and restore all
make sure unpinning works as expected under the following test cases:
we have a pinned link that is not anymore in the list of the most-visited links. this should disappear, the remaining links adjust their positions and a new link will appear at the end of the grid.
we have a pinned link that changed its position since it was pinned. it should be moved to its new position after being unpinned.
we have pinned link that changed its position since it was pinned. the link will disappear from the grid because it's now a much lower priority
test that newtab is updated as its links change by triggering a link change, adding some visits, opening a new page and checking the grid. Make sure that the added links have the right type “history”
test that you can send a “newtab-reflow” message
check that the enhanced feature works under the following test cases:
make the page have a directory link, enhanced link, and history link, and check that they are no enhanced, nor are there suggested explanations with history links. Then turn enhanced on and check that the directory link has an enhanced image and the history link is now an enhanced link
test the same with a pinned link
test that a pinned link with enhanced off ensures that the history link is not enhanced
test that a suggested tile is not enhanced by a directory tile (both with enhanced on, and off)
test that a suggested link was not enhanced by a directory link with the same domain
test override category/adgroup name
test server provided explanation string, both with and without category override
test with xml entities in category name and in explanation
We need a list of all the things that we need to test for about:newtab. Here's the list (brace yourself, it's a long one)