Commit Graph

14990 Commits

Author SHA1 Message Date
Nathan Sobo
ebb03f022b Merge branch 'master' into ns-mock-animation-frames-in-editor-spec 2016-08-12 16:16:09 -06:00
Max Brunsfeld
bf644d1a6b Remove some unnecessary TextEditor accessor methods 2016-08-12 14:31:07 -07:00
Nathan Sobo
ced2174b5a Mock clock and animation frames in TextEditorComponent specs 2016-08-12 15:21:46 -06:00
Max Brunsfeld
a11a235ef1 Don't reset display layer twice in TextEditor constructor 2016-08-12 13:36:50 -07:00
Nathan Sobo
2710ce33d1 Merge pull request #12394 from atom/ns-as-switch-offset-test-to-mocha
Replace ChromeDriver integration tests main process Mocha tests
2016-08-12 14:17:16 -06:00
Max Brunsfeld
09d232ba41 Introduce TextEditorRegistry::build
This way, we can construct text editors with the right parameters from the start
2016-08-12 12:21:51 -07:00
Max Brunsfeld
65f385c0a4 Don't reset editor's display layer when setting identical invisibles 2016-08-12 12:21:03 -07:00
Antonio Scandurra
e02863e86e Destroy AtomEnvironment on window unload
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 18:15:51 +02:00
Antonio Scandurra
753db274fc Clear storage data after each AtomApplication test
This, along with using a temporary directory as the ATOM_HOME, will make
sure that tests won't share any state with one another, possibly
increasing the level of resiliency of the suite.
2016-08-12 15:20:58 +02:00
Antonio Scandurra
c422699c80 Call @config.load() in AtomApplication constructor
This is needed in order to test configuration settings like
`restorePreviousWindowsOnStart`. Even if this call has side effects, its
scope is pretty constrained because it affects only the temporary
directory we create before each atom-application test.
2016-08-12 11:21:37 +02:00
Antonio Scandurra
f287e8783f Return an AtomWindow array in loadState or null if no state is found 2016-08-12 10:49:46 +02:00
Antonio Scandurra
fff2ecd162 Extract a AtomApplication.prototype.launch method
...so that we can exercise loading previously opened windows stored
state after the application is restarted. In addition, this resembles
more what we run in production, and therefore allows us to have a better
coverage of the code paths we run in the real application.
2016-08-12 10:44:09 +02:00
Antonio Scandurra
a8c73f0529 Fix calling atom --version 2016-08-12 09:33:15 +02:00
Max Brunsfeld
f7baed515b Maintain grammar before maintaining config 2016-08-11 17:59:27 -07:00
Max Brunsfeld
ce379d4c9e Clear destroyed editor ids from TextEditorRegistry's grammar overrides 2016-08-11 16:48:58 -07:00
Max Brunsfeld
0a1834079f Rename getSoftWrapIndentLength -> getSoftWrapHangingIndentLength 2016-08-11 16:38:34 -07:00
Joe Fitzgerald
485cb71be7 🎨 envShouldBePatched > shouldGetEnvFromShell 2016-08-11 17:07:21 -06:00
Joe Fitzgerald
9ec63a8ffc 🎨 Cleanup
* shellShouldBePatched > envShouldBePatched
2016-08-11 16:45:19 -06:00
Max Brunsfeld
684952458f Remove new TextEditor setters; just use update 2016-08-11 15:34:54 -07:00
Nathan Sobo
dbfd0cc605 Move integration test of window persistence to main process tests 2016-08-11 15:28:11 -06:00
Max Brunsfeld
fc16eeadca Use TextEditor::update in TextEditorRegistry 2016-08-11 14:09:17 -07:00
Max Brunsfeld
ef94a940a9 Make the TextEditor setters call update() 2016-08-11 13:52:57 -07:00
Nathan Sobo
f1295d39a8 Close all windows in AtomApplication.destroy 2016-08-11 14:31:36 -06:00
Nathan Sobo
6994060e72 Use fat arrow where it is needed 2016-08-11 14:31:23 -06:00
Nathan Sobo
b5b3577d7c Fix null guard in StateStore 2016-08-11 14:31:08 -06:00
Nathan Sobo
2fe5027b57 Set the userData dir to a temp directory for main process tests
This ensures that the indexedDB is accessible even if another Atom is
running.
2016-08-11 14:30:52 -06:00
Nathan Sobo
324e8d6c7a Move env assignment into parseCommandLine
A bit of a misnomer but makes things more testable so I’ll accept it
until we can do more overhaul.
2016-08-11 14:30:22 -06:00
Max Brunsfeld
fb6b463818 Remove duplicate scrollPastEnd setter and getter 2016-08-11 12:14:11 -07:00
Joe Fitzgerald
b7a48967fa Fix Regression In #12317 For zsh
In Atom 1.7 and 1.8, the environment would be patched for users of the zsh shell on OS X. A whitelist of shells was established in #12317, which is extended here.
2016-08-11 12:45:02 -06:00
Nathan Sobo
847911f0fe Extract parseCommandLine from main.js to its own file for testing
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 12:44:20 -06:00
Max Brunsfeld
0c7750f560 🔥 ignoreInvisibles parameter to TextEditor
Now that the TextEditor doesn't depend on atom.config, showInvisibles
can always be configured independently of the config
2016-08-11 11:41:11 -07:00
Max Brunsfeld
11463ef00b Merge remote-tracking branch 'origin/as-introduce-editor-update' into ns-mb-detangle-editor 2016-08-11 11:36:48 -07:00
Nathan Sobo
502339b830 Replace chromedriver test of window offset with main process mocha test
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 10:33:12 -06:00
Nathan Sobo
d8b2a1f4b6 Break out constructor side effects into AtomApplication.initialize
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-08-11 08:15:00 -06:00
Antonio Scandurra
61a909b06e Remove config option editor.backUpBeforeSaving
After shipping #11828 Atom always creates a backup file in the
`~/.atom/recovery` directory, trying to restore it automatically via the
main process in case there is a hard crash on the renderer process. This
approach should be resilient enough to allow us to delete this config
option altogether.

We can still keep it for a while in text-buffer, in case we need to use
it again at some point, but it's probably fine to remove it from there
too at some point in the future.
2016-08-11 09:23:43 +02:00
Max Brunsfeld
ea50d4fe8c 🚱 Fix leak in Workspace::buildTextEditor 2016-08-10 13:57:04 -07:00
Max Brunsfeld
6d4e0f9b0a 🚱 Stop maintaining destroyed editors' grammar and config 2016-08-10 13:54:37 -07:00
Max Brunsfeld
09b1d402d5 📝 Fix typo in setAutoIndent{,OnPaste} docs 2016-08-10 13:28:06 -07:00
Max Brunsfeld
38849474d0 Merge branch 'master' into ns-mb-detangle-editor 2016-08-10 13:23:32 -07:00
Antonio Scandurra
23f421154e Delete TokenizedBuffer.prototype.onDidChange
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-10 17:52:49 +02:00
Antonio Scandurra
6ae263aed4 Register text decoration layer when initializing TokenizedBuffer 2016-08-10 11:47:07 +02:00
Max Brunsfeld
5d24bcf19e Merge pull request #12237 from zertosh/cleanup-activation-hook-subscrtiptions
Cleanup activationHookSubscriptions when deactivating package
2016-08-09 17:08:49 -07:00
Max Brunsfeld
b97f317cd1 Remove fallbacks for scoped properties in TextEditor
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-09 15:20:00 -07:00
Max Brunsfeld
29096bde31 Don't update ATOM_HOME env var after launch
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-09 14:38:19 -07:00
Max Brunsfeld
3103682efd Bypass aliases when running env shell command 2016-08-09 14:25:25 -07:00
Nathan Sobo
e6514bf3d8 Merge pull request #12377 from atom/ns-stringify-temp-window-state
Stringify/parse temporary window state to avoid nulling out references
2016-08-09 15:20:30 -06:00
Nathan Sobo
dfc0910023 Stringify/parse temporary window state to avoid nulling out references
If the object passed via IPC contains any keys of the same reference,
all but one of these keys will be nulled out. Converting to/from a
string avoids this problem.
2016-08-09 14:43:38 -06:00
Max Brunsfeld
16a22b9f28 Merge branch 'master' into ns-mb-detangle-editor 2016-08-09 13:36:46 -07:00
Max Brunsfeld
52af31c511 Trigger grammar-used hooks no matter how text editors are created 2016-08-09 12:04:01 -07:00
Max Brunsfeld
2c506840a5 📝 Document new editor configuration methods 2016-08-09 11:14:12 -07:00