Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[test] test case for fast open&close devtools from #1391 #1408

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
17 tests/automatic_tests/fast_open_and_close_devtools/index.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Test Case For Fast Open&Close Devtools Crashes</title>
+</head>
+<body>
+ <script type="text/javascript">
+ var win = require('nw.gui').Window.get();
+ win.showDevTools();
+ win.closeDevTools();
+ win.showDevTools();
+ var gui = require('nw.gui');
+ gui.App.quit();
+ </script>
+</body>
+</html>
View
19 tests/automatic_tests/fast_open_and_close_devtools/mocha_test.js
@@ -0,0 +1,19 @@
+var path = require('path');
+var assert = require('assert');
+var spawn = require('child_process').spawn;
+var result = false;
+describe('Fast open&close devtools from #1391', function() {
+ before(function(done) {
+ this.timeout(0);
+ var app = spawn(process.execPath, [path.join(global.tests_dir, 'fast_open_and_close_devtools')]);
+ app.on('exit', function(code) {
+ if (code != null)
+ result = true;
+ done();
+ });
+ });
+
+ it('should not crash', function() {
+ assert.equal(result, true);
+ });
+});
View
4 tests/automatic_tests/fast_open_and_close_devtools/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "nw",
+ "main": "index.html"
+}
Something went wrong with that request. Please try again.