Benchmarks are run when atom is run with --benchmark argument

This commit is contained in:
Corey Johnson
2012-03-12 14:24:06 -07:00
parent 338d4e7ad5
commit 98bc29cdce
3 changed files with 14 additions and 0 deletions

View File

@@ -113,6 +113,13 @@
context->Exit();
}
- (void)loadEnd {
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--benchmark"]) {
NSLog(@"Running Benchmarks");
[self runBenchmarks:self];
}
}
@end
// Returns the application settings based on command line arguments.

View File

@@ -6,6 +6,7 @@
@optional
- (void)afterCreated;
- (void)loadStart;
- (void)loadEnd;
- (bool)keyEventOfType:(cef_handler_keyevent_type_t)type code:(int)code modifiers:(int)modifiers isSystemKey:(bool)isSystemKey isAfterJavaScript:(bool)isAfterJavaScript;
@end

View File

@@ -82,6 +82,12 @@ void ClientHandler::OnLoadEnd(CefRefPtr<CefBrowser> browser,
int httpStatusCode)
{
REQUIRE_UI_THREAD();
if ([m_delegate respondsToSelector:@selector(loadEnd)]) {
[m_delegate loadEnd];
}
}
bool ClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser,