From cdb5e24d2fe8563f1a289dc8ff93ea100b8a9401 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 15 Nov 2013 00:10:43 +0800 Subject: [PATCH] Add spec for crash-reporter --- spec/api/crash-reporter.coffee | 17 +++++++++++++++++ spec/fixtures/api/crash.html | 14 ++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 spec/api/crash-reporter.coffee create mode 100644 spec/fixtures/api/crash.html diff --git a/spec/api/crash-reporter.coffee b/spec/api/crash-reporter.coffee new file mode 100644 index 0000000..9e09a70 --- /dev/null +++ b/spec/api/crash-reporter.coffee @@ -0,0 +1,17 @@ +assert = require 'assert' +path = require 'path' +http = require 'http' +remote = require 'remote' +BrowserWindow = remote.require 'browser-window' + +fixtures = path.resolve __dirname, '..', 'fixtures' + +describe 'crash-reporter module', -> + it 'should send minidump when renderer crashes', (done) -> + w = new BrowserWindow(show: false) + server = http.createServer (req, res) -> + res.end() + server.close() + done() + server.listen 901007, '127.0.0.1', -> + w.loadUrl 'file://' + path.join(fixtures, 'api', 'crash.html') diff --git a/spec/fixtures/api/crash.html b/spec/fixtures/api/crash.html new file mode 100644 index 0000000..88063bf --- /dev/null +++ b/spec/fixtures/api/crash.html @@ -0,0 +1,14 @@ + + + + + -- 2.7.4