mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add JavaScript binding example to cefclient.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@590 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "tests/unittests/test_handler.h"
|
||||
#include "include/cef_command_line.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/wrapper/cef_stream_resource_handler.h"
|
||||
@@ -114,3 +115,16 @@ void WaitForThread(CefThreadId thread_id) {
|
||||
CefPostTask(thread_id, NewCefRunnableFunction(&NotifyEvent, &event));
|
||||
event.Wait();
|
||||
}
|
||||
|
||||
bool TestFailed() {
|
||||
CefRefPtr<CefCommandLine> command_line =
|
||||
CefCommandLine::GetGlobalCommandLine();
|
||||
if (command_line->HasSwitch("single-process")) {
|
||||
// Check for a failure on the current test only.
|
||||
return ::testing::UnitTest::GetInstance()->current_test_info()->result()->
|
||||
Failed();
|
||||
} else {
|
||||
// Check for any global failure.
|
||||
return ::testing::UnitTest::GetInstance()->Failed();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user