From efd2bbbede90c4667a1eb219f6c05940969e8f1b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 29 Aug 2013 18:03:14 +0800 Subject: [PATCH] :lipstick: Avoid duplicate temporary file names. --- spec/api/window.coffee | 4 +++- spec/fixtures/api/close.html | 2 +- spec/fixtures/api/unload.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/api/window.coffee b/spec/api/window.coffee index cd832e9618b0..d4a4b79fea06 100644 --- a/spec/api/window.coffee +++ b/spec/api/window.coffee @@ -14,7 +14,7 @@ describe 'window module', -> if (!isLoading) w.close() w.on 'destroyed', -> - test = path.join(fixtures, 'api', 'test') + test = path.join(fixtures, 'api', 'unload') content = fs.readFileSync(test) fs.unlinkSync(test) assert.equal String(content), 'unload' @@ -41,8 +41,10 @@ describe 'window module', -> assert.equal isLoading, true else if count == 1 assert.equal isLoading, false + w.close() done() else + w.close() assert false ++count diff --git a/spec/fixtures/api/close.html b/spec/fixtures/api/close.html index 0b6e4f361318..24846f722836 100644 --- a/spec/fixtures/api/close.html +++ b/spec/fixtures/api/close.html @@ -2,7 +2,7 @@ diff --git a/spec/fixtures/api/unload.html b/spec/fixtures/api/unload.html index 9490c56d1566..da749641f9d6 100644 --- a/spec/fixtures/api/unload.html +++ b/spec/fixtures/api/unload.html @@ -2,7 +2,7 @@