mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Running tests or benchmarks cause app to exit when finished.
This commit is contained in:
parent
638c0c625b
commit
1b1e81c6cf
@ -116,14 +116,22 @@
|
||||
|
||||
- (void)loadEnd {
|
||||
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--benchmark"]) {
|
||||
CefRefPtr<CefV8Context> context = _clientHandler->GetBrowser()->GetMainFrame()->GetV8Context();
|
||||
context->Enter();
|
||||
CefRefPtr<CefV8Value> atom = context->GetGlobal()->GetValue("atom");
|
||||
atom->SetValue("exitOnCompletion", CefV8Value::CreateBool(YES), V8_PROPERTY_ATTRIBUTE_NONE);
|
||||
context->Exit();
|
||||
[self modifyJavaScript:^(CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Value> global) {
|
||||
CefRefPtr<CefV8Value> atom = context->GetGlobal()->GetValue("atom");
|
||||
atom->SetValue("exitAfterSpecs", CefV8Value::CreateBool(YES), V8_PROPERTY_ATTRIBUTE_NONE);
|
||||
}];
|
||||
|
||||
[self runBenchmarks:self];
|
||||
}
|
||||
|
||||
if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--test"]) {
|
||||
[self modifyJavaScript:^(CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Value> global) {
|
||||
CefRefPtr<CefV8Value> atom = context->GetGlobal()->GetValue("atom");
|
||||
atom->SetValue("exitAfterSpecs", CefV8Value::CreateBool(YES), V8_PROPERTY_ATTRIBUTE_NONE);
|
||||
}];
|
||||
|
||||
[self runSpecs:self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user