Make dev tools work with specs

This commit is contained in:
Corey Johnson
2012-06-26 16:38:06 -07:00
parent 3efcc50a0d
commit 1059a6a495
5 changed files with 6 additions and 7 deletions

View File

@@ -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];

View File

@@ -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 ->

View File

@@ -7,7 +7,7 @@ Project = require 'project'
Directory = require 'directory'
RootView = require 'root-view'
require 'window'
window.showConsole()
$native.showDevTools()
requireStylesheet "jasmine.css"

View File

@@ -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()

View File

@@ -72,7 +72,7 @@ windowAdditions =
$native.toggleDevTools()
onerror: ->
@showConsole()
$native.showDevTools()
window[key] = value for key, value of windowAdditions
window.setUpKeymap()