Fix interference of V8 unittest setup with other tests (issue #712).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@836 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
2592b05444
commit
ca817dc4cd
|
@ -1592,8 +1592,8 @@ class V8RendererTest : public ClientApp::RenderDelegate {
|
||||||
if (!value.empty())
|
if (!value.empty())
|
||||||
test_mode_ = static_cast<V8TestMode>(atoi(value.ToString().c_str()));
|
test_mode_ = static_cast<V8TestMode>(atoi(value.ToString().c_str()));
|
||||||
}
|
}
|
||||||
EXPECT_GT(test_mode_, V8TEST_NONE);
|
if (test_mode_ > V8TEST_NONE)
|
||||||
RunStartupTest();
|
RunStartupTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnContextCreated(CefRefPtr<ClientApp> app,
|
virtual void OnContextCreated(CefRefPtr<ClientApp> app,
|
||||||
|
@ -1659,9 +1659,11 @@ class V8RendererTest : public ClientApp::RenderDelegate {
|
||||||
V8_PROPERTY_ATTRIBUTE_NONE));
|
V8_PROPERTY_ATTRIBUTE_NONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the test asynchronously.
|
if (test_mode_ > V8TEST_NONE) {
|
||||||
CefPostTask(TID_RENDERER,
|
// Run the test asynchronously.
|
||||||
NewCefRunnableMethod(this, &V8RendererTest::RunTest));
|
CefPostTask(TID_RENDERER,
|
||||||
|
NewCefRunnableMethod(this, &V8RendererTest::RunTest));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1775,6 +1777,7 @@ void CreateV8RendererTests(ClientApp::RenderDelegateSet& delegates) {
|
||||||
handler->ExecuteTest(); \
|
handler->ExecuteTest(); \
|
||||||
EXPECT_TRUE(handler->got_message_); \
|
EXPECT_TRUE(handler->got_message_); \
|
||||||
EXPECT_TRUE(handler->got_success_); \
|
EXPECT_TRUE(handler->got_success_); \
|
||||||
|
g_current_test_mode = V8TEST_NONE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define V8_TEST(name, test_mode) \
|
#define V8_TEST(name, test_mode) \
|
||||||
|
|
Loading…
Reference in New Issue