toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/**
     1.8 + * These tests ensure that capturing a sites's thumbnail, saving it and
     1.9 + * retrieving it from the cache works.
    1.10 + */
    1.11 +function runTests() {
    1.12 +  // Create a tab that shows an error page.
    1.13 +  let tab = gBrowser.addTab("http://127.0.0.1:1/");
    1.14 +  let browser = tab.linkedBrowser;
    1.15 +
    1.16 +  yield browser.addEventListener("DOMContentLoaded", function onLoad() {
    1.17 +    browser.removeEventListener("DOMContentLoaded", onLoad, false);
    1.18 +    executeSoon(next);
    1.19 +  }, false);
    1.20 +
    1.21 +  ok(!gBrowserThumbnails._shouldCapture(browser), "we're not going to capture an error page");
    1.22 +}

mercurial