Indrek Ardel
55f3311c01
Remove unused variables
2016-09-26 20:52:13 +03:00
Max Brunsfeld
fe480d8fa4
Do not add project directories that do not exist
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2016-09-14 13:48:17 -07:00
Max Brunsfeld
6ca1676bcb
Access auto-updater through new electron API in AtomEnvironment spec
2016-09-07 16:36:00 +02:00
Antonio Scandurra
0f6eadcfce
Wait for windows' state to be saved before closing the app or any window
...
Previously, we used to save the window's state in the renderer process
`beforeunload` event handler: because of the synchronous nature of event
handlers and the asynchronous design of IndexedDB, this could
potentially not save anything if windows close fast enough to prevent
IndexedDB from committing the pending transaction containing the state.
(Ref.: https://mzl.la/2bXCXDn )
With this commit, we will intercept the `before-quit` events on
`electron.app` and the `close` event on `BrowserWindow` (which will fire
respectively before quitting the application and before closing a
window), and prevent them from performing the default action. We will
then ask each renderer process to save its state and, finally, close the
window and/or the app.
2016-09-07 13:03:33 +02:00
Max Brunsfeld
637e525807
Use fake document & window in atom environment serialization spec
2016-08-08 16:32:58 -07:00
Max Brunsfeld
e8c834e483
Serialize & deserialize the TextEditorRegistry in AtomEnvironment
2016-08-08 15:38:17 -07:00
Antonio Scandurra
005022567b
Merge pull request #11348 from atom/wl-drewmnoel-electron
...
Update Electron to 0.36.12
2016-04-30 09:19:17 +02:00
Antonio Scandurra
c5a76d4a7d
Persist the entire state on reload
...
This fixes an annoying problem that prevented the state of marker layers
from being saved when the window was reloaded either via `Cmd+R` in
DevTools or via `Ctrl+Option+Cmd+L` in Atom.
The issue was that we were *always* scheduling `saveState` on an idle
callback: `window.onbeforeunload`, however, doesn't wait for that event
before closing the window, and thus that state was never saved in those
situations.
The solution is to use idle callbacks only during the critical code path
(i.e. on mousedown and keydown), but save it synchronously otherwise.
Saving something to IndexedDB is actually asynchronous too, but it seems
like Chrome fulfills `put` requests that get executed right during
`onbeforeunload`.
2016-04-29 14:41:34 +02:00
Damien Guard
99e716f9ed
Fix specs failures on Windows including paths
2016-04-15 11:25:05 -07:00
Drew Noel
fb5bfe1b3a
Fix old electron require syntax in specs
2016-04-01 22:17:00 -04:00
Antonio Scandurra
cbb911cde8
💚
2016-03-23 13:44:17 +01:00
Antonio Scandurra
c2242e46c2
Read state from StorageFolder when it can’t be found in StateStore
2016-03-23 10:31:26 +01:00
Antonio Scandurra
4b017759c9
Ensure project.serialize is called with atom.saveState options
...
This is because we have made the `project.serialize(options)` parameter optional
for backwards compatibility (i.e. #11111 ), and we want to make sure we don't
make the mistake of not passing it internally.
2016-03-10 09:41:50 +01:00
Antonio Scandurra
8caa9d0a95
🎨 Better wording on specs
2016-03-07 17:21:09 +01:00
Antonio Scandurra
a3bed908d7
Don't partially serialize after unloading editor window
2016-03-07 17:14:52 +01:00
Antonio Scandurra
12587073d2
🎨 isQuitting -> isUnloading
2016-03-07 10:52:16 +01:00
Antonio Scandurra
3d15b6e16b
Merge branch 'master' into as-serialize-history-without-snapshots
2016-03-07 10:33:52 +01:00
Antonio Scandurra
0fdc190989
Use isQuitting: false when saving state on key/mouse down
2016-03-04 17:08:32 +01:00
Ben Ogle
02368a9fc6
Add atom.getReleaseChannel
2016-03-01 15:09:05 -08:00
Arnaud Rinquin
53693b4d0f
Add the -a, --add CLI option
2016-02-19 08:54:17 +00:00
Max Brunsfeld
2e7101e5eb
Don't display an editor window in atom-environment-spec
2016-02-18 15:11:26 -08:00
Max Brunsfeld
43656a9861
Load packages before deserializing state
2016-02-18 09:17:34 -08:00
Katrina Uychaco
6f4936983e
Revert test since startEditorWindow no longer returns a promise
2016-02-11 15:40:04 -08:00
Katrina Uychaco
7b808257a6
Add test to check for indexedDB connection
2016-02-10 11:04:30 -08:00
Katrina Uychaco
6e0328b048
Refactor to use StateStore instead of StorageFolder
2016-02-04 21:45:00 -08:00
Katrina Uychaco
a54f4679af
Fix tests
2016-01-28 15:46:40 -07:00
Katrina Uychaco
54a03516bf
Save state asynchronously on mousedown and keydown events. Tests WIP
2016-01-28 00:58:58 -07:00
Katrina Uychaco
126baafda3
Assign debounce interval to property
2016-01-27 15:11:40 -07:00
Katrina Uychaco
df83078d74
Save state on mousedown or keypress events (debounce 1s). Tests WIP
2016-01-27 11:15:02 -07:00
case
8c5c795b35
Remove Duplicate Require Statements and Unify Syntax on '
2016-01-15 14:35:28 -06:00
Antonio Scandurra
9376738918
Make spec async because of Promise-based API
2015-11-24 12:28:31 +01:00
Nathan Sobo
e475065b45
Merge branch 'stable' into beta
2015-11-17 16:57:19 -08:00
Nathan Sobo
3b2c6afdaf
Fix removeListener calls
2015-11-17 16:23:38 -08:00
Nathan Sobo
29bb1bb31b
Add TextEditor-level marker layers and use them for selections
2015-11-09 00:35:31 -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
b58b3504f4
Only load/save AtomEnvironment state if persistence is enabled
2015-10-14 22:10:51 -06:00
Nathan Sobo
903ecca1f7
Parameterize document on AtomEnvironment
2015-10-13 19:48:56 -06:00
Nathan Sobo
65ae175e72
Pass explicit window global into AtomEnvironment on construction
2015-10-13 19:35:51 -06:00
Nathan Sobo
84aa8471b4
Pass AppDelegate to Workspace, Pane instead of bound functions
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com >
2015-10-13 18:54:48 -06:00
Nathan Sobo
432a59b8e5
Move tests from window-event-handler-spec for moved functionality
...
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com >
2015-10-13 17:53:01 -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
6459891c89
💚 Make sure to destroy AtomEnvironment in specs
2015-10-13 15:30:45 +02:00
Nathan Sobo
69e8b0cfb1
Prevent title change during specs
2015-10-12 15:19:55 -06:00
Antonio Scandurra
aebc1229f1
Always install uncaught error handler
2015-10-12 08:29:43 +02:00
Max Brunsfeld
7617c35856
Rename AtomEnvironment::removeEditorWindow -> ::destroy
2015-10-08 17:51:27 -07:00
Max Brunsfeld
19b07dbd97
Rename atom-spec -> atom-environment-spec
2015-10-08 11:54:54 -07:00