| Index: Source/web/tests/RenderTableCellTest.cpp
|
| diff --git a/Source/web/tests/RenderTableCellTest.cpp b/Source/web/tests/RenderTableCellTest.cpp
|
| index fa0bcc8f1b6622ac5617cff6c0f228365b77ce5f..eca741101117393accc52dedb376ee2a4a927703 100644
|
| --- a/Source/web/tests/RenderTableCellTest.cpp
|
| +++ b/Source/web/tests/RenderTableCellTest.cpp
|
| @@ -43,23 +43,22 @@ namespace WebCore {
|
| namespace {
|
|
|
| class RenderTableCellDeathTest : public testing::Test {
|
| - // It's unfortunate that we have to get the whole browser stack to test one RenderObject
|
| - // but the code needs it.
|
| - static Frame* frame()
|
| - {
|
| - static WebView* webView;
|
| -
|
| - if (webView)
|
| - return toWebFrameImpl(webView->mainFrame())->frame();
|
| + protected:
|
| + static void SetUpTestCase() {
|
| + // It's unfortunate that we have to get the whole browser stack to test one RenderObject
|
| + // but the code needs it.
|
| + s_webViewHelper = new FrameTestHelpers::WebViewHelper();
|
| + s_webViewHelper->initializeAndLoad("about:blank");
|
| + s_webViewHelper->webView()->setFocus(true);
|
| + }
|
|
|
| - webView = FrameTestHelpers::createWebViewAndLoad("about:blank");
|
| - webView->setFocus(true);
|
| - return toWebFrameImpl(webView->mainFrame())->frame();
|
| + static void TearDownTestCase() {
|
| + delete s_webViewHelper;
|
| }
|
|
|
| static Document* document()
|
| {
|
| - return frame()->document();
|
| + return toWebFrameImpl(s_webViewHelper->webView()->mainFrame())->frame()->document();
|
| }
|
|
|
| virtual void SetUp()
|
| @@ -72,10 +71,14 @@ class RenderTableCellDeathTest : public testing::Test {
|
| m_cell->destroy();
|
| }
|
|
|
| -protected:
|
| RenderTableCell* m_cell;
|
| +
|
| +private:
|
| + static FrameTestHelpers::WebViewHelper* s_webViewHelper;
|
| };
|
|
|
| +FrameTestHelpers::WebViewHelper* RenderTableCellDeathTest::s_webViewHelper = 0;
|
| +
|
| TEST_F(RenderTableCellDeathTest, CanSetColumn)
|
| {
|
| static const unsigned columnIndex = 10;
|
|
|