mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Make dev tools work with specs
This commit is contained in:
@@ -76,11 +76,11 @@
|
||||
[_devToolsView release];
|
||||
_devToolsView = nil;
|
||||
}
|
||||
else {
|
||||
else if (_clientHandler && _clientHandler->GetBrowser()) {
|
||||
NSRect frame = NSMakeRect(0, 0, _splitView.frame.size.height, _splitView.frame.size.height);
|
||||
_devToolsView = [[NSView alloc] initWithFrame:frame];
|
||||
[_splitView addSubview:_devToolsView];
|
||||
CefV8Context::GetCurrentContext()->GetBrowser()->ShowDevTools();
|
||||
_clientHandler->GetBrowser()->ShowDevTools();
|
||||
}
|
||||
|
||||
[_splitView adjustSubviews];
|
||||
|
||||
@@ -16,7 +16,7 @@ keymap.bindKeys '*',
|
||||
'meta-w': 'close'
|
||||
'alt-meta-i': 'show-console'
|
||||
$(document).on 'close', -> window.close()
|
||||
$(document).on 'show-console', -> window.showConsole()
|
||||
$(document).on 'show-console', -> $native.showDevTools()
|
||||
|
||||
defaultCount = 100
|
||||
window.pbenchmark = (args...) -> window.benchmark(args..., profile: true)
|
||||
@@ -33,7 +33,7 @@ window.benchmark = (args...) ->
|
||||
[fn, options] = args
|
||||
{ profile, focused } = (options ? {})
|
||||
|
||||
window.showConsole() if profile
|
||||
$native.showDevTools() if profile
|
||||
method = if focused then fit else it
|
||||
method description, ->
|
||||
total = measure ->
|
||||
|
||||
@@ -7,7 +7,7 @@ Project = require 'project'
|
||||
Directory = require 'directory'
|
||||
RootView = require 'root-view'
|
||||
require 'window'
|
||||
window.showConsole()
|
||||
$native.showDevTools()
|
||||
|
||||
requireStylesheet "jasmine.css"
|
||||
|
||||
|
||||
@@ -177,5 +177,4 @@ class RootView extends View
|
||||
require atom.userConfigurationPath if fs.exists(atom.userConfigurationPath)
|
||||
catch error
|
||||
console.error "Failed to load `#{atom.userConfigurationPath}`", error.message, error
|
||||
window.showConsole()
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ windowAdditions =
|
||||
$native.toggleDevTools()
|
||||
|
||||
onerror: ->
|
||||
@showConsole()
|
||||
$native.showDevTools()
|
||||
|
||||
window[key] = value for key, value of windowAdditions
|
||||
window.setUpKeymap()
|
||||
|
||||
Reference in New Issue
Block a user