From c73e3e12a90bf90eba9455c6eeba1cf3384721df Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 7 Feb 2013 20:58:15 +0000 Subject: [PATCH] Fix V8 unit tests to support running multiple in single-process mode. git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1364@1084 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef3/tests/unittests/v8_unittest.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cef3/tests/unittests/v8_unittest.cc b/cef3/tests/unittests/v8_unittest.cc index d7c0ccd0d..2232de0d9 100644 --- a/cef3/tests/unittests/v8_unittest.cc +++ b/cef3/tests/unittests/v8_unittest.cc @@ -1628,7 +1628,8 @@ class V8RendererTest : public ClientApp::RenderDelegate { new Handler(&startup_test_success_)); } - virtual void OnWebKitInitialized(CefRefPtr app) { + virtual void OnBrowserCreated(CefRefPtr app, + CefRefPtr browser) { test_mode_ = g_current_test_mode; if (test_mode_ == V8TEST_NONE) { // Retrieve the test mode from the command line. @@ -1719,7 +1720,8 @@ class V8RendererTest : public ClientApp::RenderDelegate { V8_PROPERTY_ATTRIBUTE_NONE)); } - if (test_mode_ > V8TEST_NONE && url != kV8NavTestUrl) { + if (test_mode_ > V8TEST_NONE && url != kV8NavTestUrl && + url.find("http://tests/") != std::string::npos) { // Run the test asynchronously. CefPostTask(TID_RENDERER, NewCefRunnableMethod(this, &V8RendererTest::RunTest)); @@ -1734,7 +1736,7 @@ class V8RendererTest : public ClientApp::RenderDelegate { return; if (test_mode_ == V8TEST_CONTEXT_INVALID && - frame->GetURL().ToString() != kV8NavTestUrl) { + frame->GetURL().ToString() == kV8TestUrl) { test_context_ = browser_->GetMainFrame()->GetV8Context(); test_object_ = CefV8Value::CreateArray(10);