mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add CefURLRequest support (issue #517).
- Add CefBrowserProcessHandler interface (issue #650). - Internally re-register supported schemes with CefCookieManager after changing the storage path (issue #651). - Add CefResourceHandler callbacks for blocking cookie loading and saving (issue #652). - Allow custom scheme handlers for requests that do not originate from browser content (issue #653). - Use 'int' instead of 'RequestFlags' for CefRequest::GetFlags and SetFlags (issue #654). - Rename cef_request.h CreateObject methods to Create (issue #655). - Add #ifdef guards to cef_tuple.h to allow the use of both cef_runnable.h and base/bind.h in the same unit test source file. - Retrieve cookieable schemes as part of ClientApp::RegisterCustomSchemes and register with the global cookie manager. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@697 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/threading/thread.h"
|
||||
|
||||
// Include after base/bind.h to avoid name collisions with cef_tuple.h.
|
||||
#include "include/cef_runnable.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// Thread used to run the test suite.
|
||||
@@ -25,13 +28,7 @@ class CefTestThread : public base::Thread {
|
||||
retval_ = test_suite_->Run();
|
||||
|
||||
// Quit the CEF message loop.
|
||||
class QuitTask : public CefTask {
|
||||
public:
|
||||
QuitTask() {}
|
||||
virtual void Execute(CefThreadId threadId) { CefQuitMessageLoop(); }
|
||||
IMPLEMENT_REFCOUNTING(QuitTask);
|
||||
};
|
||||
CefPostTask(TID_UI, new QuitTask());
|
||||
CefPostTask(TID_UI, NewCefRunnableFunction(CefQuitMessageLoop));
|
||||
}
|
||||
|
||||
int retval() { return retval_; }
|
||||
@@ -41,6 +38,13 @@ class CefTestThread : public base::Thread {
|
||||
int retval_;
|
||||
};
|
||||
|
||||
// Called on the UI thread.
|
||||
void RunTests(CefTestThread* thread) {
|
||||
// Run the test suite on the test thread.
|
||||
thread->message_loop()->PostTask(FROM_HERE,
|
||||
base::Bind(&CefTestThread::RunTests, base::Unretained(thread)));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -88,9 +92,9 @@ int main(int argc, char* argv[]) {
|
||||
if (!thread->Start())
|
||||
return 1;
|
||||
|
||||
// Run the test suite on the test thread.
|
||||
thread->message_loop()->PostTask(FROM_HERE,
|
||||
base::Bind(&CefTestThread::RunTests, base::Unretained(thread.get())));
|
||||
// Start the tests from the UI thread so that any pending UI tasks get a
|
||||
// chance to execute first.
|
||||
CefPostTask(TID_UI, NewCefRunnableFunction(RunTests, thread.get()));
|
||||
|
||||
// Run the CEF message loop.
|
||||
CefRunMessageLoop();
|
||||
|
Reference in New Issue
Block a user