Bug 875986, part 4 - check no thumbnail file before capture. r=adw
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 09 Sep 2013 14:36:38 +1000
changeset 146136 81f13346eb7ca2ea12d046230eab8e6ad82ab544
parent 146135 5fa36cd1823d85e98ff906f6b1d1ddb6bc557d9a
child 146137 218d4334d29e5d55bcb70498bb66228d8b4463c5
child 146202 a160246e2f61a8df9d629530ed5442e8b37a2c45
push id25242
push useremorley@mozilla.com
push dateMon, 09 Sep 2013 12:13:52 +0000
treeherdermozilla-central@218d4334d29e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs875986
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 875986, part 4 - check no thumbnail file before capture. r=adw
toolkit/components/thumbnails/test/browser_thumbnails_background.js
--- a/toolkit/components/thumbnails/test/browser_thumbnails_background.js
+++ b/toolkit/components/thumbnails/test/browser_thumbnails_background.js
@@ -242,18 +242,19 @@ let tests = [
     });
     yield deferred.promise;
   },
 
   // check that if a page captured in the background attempts to set a cookie,
   // that cookie is not saved for subsequent requests.
   function noCookiesStored() {
     let url = testPageURL({ setRedCookie: true });
+    let file = fileForURL(url);
+    ok(!file.exists(), "Thumbnail file should not exist before capture.");
     yield capture(url);
-    let file = fileForURL(url);
     ok(file.exists(), "Thumbnail file should exist after capture.");
     file.remove(false);
     // now load it up in a browser - it should *not* be red, otherwise the
     // cookie above was saved.
     let tab = gBrowser.loadOneTab(url, { inBackground: false });
     let browser = tab.linkedBrowser;
     yield onPageLoad(browser);