mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge branch 'master' of github.com:github/atom
This commit is contained in:
@@ -211,7 +211,7 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
{
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
std::cout << std::string(message) << "\n";
|
||||
std::cout << std::string(message) << "\n\t" << std::string(source) << ":" << line;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,15 @@
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
if ($bootstrapScript) require($bootstrapScript);
|
||||
try {
|
||||
if ($bootstrapScript) require($bootstrapScript);
|
||||
}
|
||||
catch (error) {
|
||||
$native.showDevTools()
|
||||
console.error(error.stack)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
App = require 'app'
|
||||
Atom = require 'atom'
|
||||
fs = require 'fs'
|
||||
|
||||
describe "App", ->
|
||||
describe "Atom", ->
|
||||
closeAllWindows = ->
|
||||
window.close() for window in atom.windows
|
||||
waitsFor "there to be no windows", ->
|
||||
@@ -34,18 +34,18 @@ describe "App", ->
|
||||
expect(newWindow.rootView.activeEditor().buffer.getText()).toEqual fs.read(filePath)
|
||||
|
||||
describe ".windowOpened(window)", ->
|
||||
app = null
|
||||
atom = null
|
||||
|
||||
beforeEach ->
|
||||
app = new App
|
||||
atom = new Atom
|
||||
|
||||
afterEach ->
|
||||
app.destroy()
|
||||
atom.destroy()
|
||||
|
||||
it "adds the window to the windows array if it isn't already present", ->
|
||||
app.windowOpened window
|
||||
app.windowOpened window
|
||||
expect(app.windows).toEqual [window]
|
||||
atom.windowOpened window
|
||||
atom.windowOpened window
|
||||
expect(atom.windows).toEqual [window]
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ _ = require 'underscore'
|
||||
require 'underscore-extensions'
|
||||
|
||||
module.exports =
|
||||
class App
|
||||
class Atom
|
||||
keymap: null
|
||||
windows: null
|
||||
tabText: null
|
||||
@@ -1,2 +1,2 @@
|
||||
App = require 'app'
|
||||
window.atom = new App(atom.loadPath, $native)
|
||||
Atom = require 'atom'
|
||||
window.atom = new Atom(atom.loadPath, $native)
|
||||
|
||||
@@ -2,7 +2,7 @@ paths = [
|
||||
"#{atom.loadPath}/spec"
|
||||
"#{atom.loadPath}/benchmark"
|
||||
"#{atom.loadPath}/src/stdlib"
|
||||
"#{atom.loadPath}/src/atom"
|
||||
"#{atom.loadPath}/src/app"
|
||||
"#{atom.loadPath}/src"
|
||||
"#{atom.loadPath}/vendor"
|
||||
"#{atom.loadPath}/static"
|
||||
@@ -110,7 +110,8 @@ __read = (path) ->
|
||||
try
|
||||
$native.read(path)
|
||||
catch e
|
||||
throw "require: can't read #{path}"
|
||||
console.error "Failed to read `#{path}`"
|
||||
throw e
|
||||
|
||||
__modules = { loaded : {} }
|
||||
__defines = []
|
||||
@@ -127,4 +128,4 @@ this.require.nameToUrl = (path) -> "#{path}.js"
|
||||
this.require.__modules = __modules
|
||||
|
||||
# issue #17
|
||||
this.require.noWorker = true
|
||||
this.require.noWorker = true
|
||||
Reference in New Issue
Block a user