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:
Marshall Greenblatt 2012-10-03 21:35:04 +00:00
parent 2592b05444
commit ca817dc4cd
1 changed files with 8 additions and 5 deletions

View File

@ -1592,7 +1592,7 @@ class V8RendererTest : public ClientApp::RenderDelegate {
if (!value.empty())
test_mode_ = static_cast<V8TestMode>(atoi(value.ToString().c_str()));
}
EXPECT_GT(test_mode_, V8TEST_NONE);
if (test_mode_ > V8TEST_NONE)
RunStartupTest();
}
@ -1659,10 +1659,12 @@ class V8RendererTest : public ClientApp::RenderDelegate {
V8_PROPERTY_ATTRIBUTE_NONE));
}
if (test_mode_ > V8TEST_NONE) {
// Run the test asynchronously.
CefPostTask(TID_RENDERER,
NewCefRunnableMethod(this, &V8RendererTest::RunTest));
}
}
protected:
// Return from the test.
@ -1775,6 +1777,7 @@ void CreateV8RendererTests(ClientApp::RenderDelegateSet& delegates) {
handler->ExecuteTest(); \
EXPECT_TRUE(handler->got_message_); \
EXPECT_TRUE(handler->got_success_); \
g_current_test_mode = V8TEST_NONE; \
}
#define V8_TEST(name, test_mode) \