Commit Graph

46 Commits

Author SHA1 Message Date
Michelle Tilley
e2583145aa Transpile packages with pack-specific transpiler during tests 2016-12-16 16:37:58 -08:00
Max Brunsfeld
97943a3432 Shorten redundant paths to electron-shims.js 2016-10-27 13:19:55 -07:00
Antonio Scandurra
18ddcf902b Statically assign a clipboard instance to the TextEditor class 2016-10-07 18:21:09 +02:00
Damien Guard
1a97f97a54 Specs runner dev tools should also be ctrl-shift-i on Linux/Windows 2016-10-04 15:26:24 -07:00
Max Brunsfeld
51a2360a9b Fix uses of call-window-method IPC channel in specs 2016-09-29 12:13:24 -07:00
Max Brunsfeld
e7444b1ebe Add shims for legacy electron APIs
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-07 16:33:52 +02:00
Damien Guard
22922dec96 CrashReporter should not run on UI thread on Win/Linux 2016-06-27 16:31:01 -07:00
Damien Guard
ea68cfe290 Enable copy shortcut on specs window 2016-06-01 16:08:29 -07:00
Wliu
9966dbc27f 🔥 Unnecessary audio hack
No longer needed with the `backgroundThrottling` option
2016-04-14 20:24:35 -04:00
Max Brunsfeld
4bc969d1df Merge branch 'master' into wl-electron-35 2016-02-16 13:16:13 -08:00
Max Brunsfeld
0ea06bad31 Merge branch 'master' into wl-electron-35 2016-02-12 12:57:54 -08:00
Max Brunsfeld
9b2c791c86 Don't emit window:loaded event until async window initialization completes
Signed-off-by: Katrina Uychaco <kuychaco@github.com>
2016-02-09 14:28:01 -08:00
Wliu
d75102f46d Set URL in the crash reporter 2015-12-22 18:01:26 -05:00
Wliu
ed96ac7daf browserWindow.restart -> .reload 2015-12-12 21:35:14 -05:00
Cheng Zhao
2150790596 Use the new style of remote 2015-12-11 10:21:46 +08:00
Cheng Zhao
1725b9bf54 Use require('electron') 2015-12-11 09:30:58 +08:00
Wliu
fec1507ff4 Require ipc-renderer where it belongs 2015-11-18 21:10:40 -05:00
Wliu
0945383d78 Merge remote-tracking branch 'refs/remotes/origin/master' into wl-electron-35 2015-11-18 16:11:49 -05:00
Thomas Johansen
a8147c09a2 🔥 Remove console.log shims 2015-11-18 17:46:20 +01:00
Wliu
6cd480b37e Fix Electron deprecations 2015-11-17 21:16:09 -05:00
Antonio Scandurra
967fca7214 🎨 2015-11-13 18:51:06 +01:00
Antonio Scandurra
c7ca50b2b6 Set initialLoadComplete to true only in test mode 2015-11-13 18:01:21 +01:00
Nathan Sobo
ab6f26368b Add link to comment 2015-11-11 12:15:14 -07:00
Nathan Sobo
d46cea9c41 Disable throttling in test windows via WebAudio hack
Throttling in test windows is annoying when tests run interactively,
and *seems* to cause issues with animation frames not firing even in
headless tests, though it’s difficult to fully confirm since this issue
is intermittent.
2015-11-07 16:01:20 -07:00
Antonio Scandurra
6290822067 Export a function in windowInitializationScript
...so that we can pass BlobStore to AtomEnvironment
2015-11-03 09:51:08 +01:00
Nathan Sobo
979b08f5fe Override console.log/error/warn in headless mode to log to stdout/stderr 2015-10-17 10:55:23 -06:00
Nathan Sobo
c35411cd29 🎨 2015-10-17 10:52:39 -06:00
Antonio Scandurra
edddb6516e Remove shim to remote.process
This doesn't seem to work as expected. I think it's just better to encourage
emitting an event like 'write-to-stdout' or using directly `remote.process`.

/cc: @nathansobo
2015-10-15 09:55:28 +02:00
Nathan Sobo
9df40b4f4e Remove unnecessary fat arrow 2015-10-14 19:53:16 -06:00
Nathan Sobo
82cbf01c5b Set useCapture to true when handling keydown events in test windows
Prevents these events from getting intercepted by other handlers.
2015-10-14 15:57:45 -06:00
Nathan Sobo
e92cb86335 Introduce ApplicationDelegate to AtomEnvironment
All external actions are performed via this delegate for test-isolation
purposes.
2015-10-13 15:42:57 -06:00
Antonio Scandurra
cf5d94f084 Return a promise in test runners 2015-10-13 09:02:37 +02:00
Nathan Sobo
69e8b0cfb1 Prevent title change during specs 2015-10-12 15:19:55 -06:00
Antonio Scandurra
304d35a300 Shim process stdout and stderr 2015-10-12 15:39:56 +02:00
Antonio Scandurra
4863b71fd7 Set timeout in the main process 2015-10-09 09:20:19 +02:00
Antonio Scandurra
5da32540b1 🎨 2015-10-08 11:54:11 +02:00
Antonio Scandurra
1d280e8d92 Introduce timeout option
The idea with this commit is to implement a timeout functionality that does not
rely on a system utility (such as unix `timeout`). Tests could hang because of a
CPU-bound task and, as a result, we need to handle timeouts in a separate
process.

An ideal implementation would first spawn the timeout, which in turn would spawn
the tests, acting as a supervisor and making sure they do not exceed the
supplied time. However, setting up such an environment would have been trickier,
thus the test process spawns the timeout cop before running any test. This, in
turn, invokes a `setTimeout` function and kills the parent process as soon as
the timeout gets triggered, logging to console the reason why the parent process
was killed (and exiting the parent process with code 130).

I haven't used `Task` because, in order to log stuff to the console, we need to
fork the ChildProcess from `remote`, as otherwise nothing gets written out.
2015-10-08 11:38:48 +02:00
Antonio Scandurra
52c43a71d3 Pass legacyTestRunner parameter 2015-10-07 15:25:06 -05:00
Nathan Sobo
dcb1d8296f Pass buildAtomEnvironment function to test runner
Don’t build an AtomEnvironment or assign it to the atom global until
this function is called by the runner.
2015-10-07 15:25:00 -05:00
Nathan Sobo
d9776abea6 Rename Atom to AtomEnvironment 2015-10-07 15:25:00 -05:00
Nathan Sobo
4a00d6ba35 Bind cmd/ctrl-w to close window in tests
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:55 -05:00
Nathan Sobo
a3e1b34e95 Add reload and toggle dev tools key bindings to test window
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:55 -05:00
Nathan Sobo
6c67f42eab Move state loading for Atom environment to an instance method 2015-10-07 15:24:54 -05:00
Nathan Sobo
2e54ae1e57 Allow a custom test runner path to be specified in package.json
If the nearest containing package.json of a test path has an
atomTestRunner field, we’ll require the specified file as a test runner
rather than the default jasmine runner.
2015-10-07 15:24:50 -05:00
Nathan Sobo
e4d64309b7 Allow multiple test paths to be specified as command line arguments 2015-10-07 15:24:50 -05:00
Nathan Sobo
e886d8b253 Rename “bootstrap” scripts
They’re just window initialization scripts, and this new naming makes
that a lot clearer.
2015-10-07 15:24:50 -05:00