Index: Source/core/rendering/RenderTableCellTest.cpp |
diff --git a/Source/web/tests/RenderTableCellTest.cpp b/Source/core/rendering/RenderTableCellTest.cpp |
similarity index 71% |
rename from Source/web/tests/RenderTableCellTest.cpp |
rename to Source/core/rendering/RenderTableCellTest.cpp |
index a0eeadcee11f6c8e521802b56e29cb36377fde83..bbf2a6dd991e4bff77d354d8fc939ba08e23b7d7 100644 |
--- a/Source/web/tests/RenderTableCellTest.cpp |
+++ b/Source/core/rendering/RenderTableCellTest.cpp |
@@ -27,11 +27,7 @@ |
#include "core/rendering/RenderTableCell.h" |
-#include "core/frame/LocalFrame.h" |
-#include "public/web/WebFrame.h" |
-#include "public/web/WebView.h" |
-#include "web/WebLocalFrameImpl.h" |
-#include "web/tests/FrameTestHelpers.h" |
+#include "core/testing/DummyPageHolder.h" |
#include <gtest/gtest.h> |
@@ -43,28 +39,10 @@ namespace { |
class RenderTableCellDeathTest : public testing::Test { |
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); |
- } |
- |
- static void TearDownTestCase() |
- { |
- delete s_webViewHelper; |
- } |
- |
- static Document* document() |
- { |
- return toWebLocalFrameImpl(s_webViewHelper->webView()->mainFrame())->frame()->document(); |
- } |
- |
virtual void SetUp() |
{ |
- m_cell = RenderTableCell::createAnonymous(document()); |
+ m_pageHolder = DummyPageHolder::create(IntSize(800, 600)); |
+ m_cell = RenderTableCell::createAnonymous(&m_pageHolder->document()); |
} |
virtual void TearDown() |
@@ -72,14 +50,10 @@ protected: |
m_cell->destroy(); |
} |
+ OwnPtr<DummyPageHolder> m_pageHolder; |
RenderTableCell* m_cell; |
- |
-private: |
- static FrameTestHelpers::WebViewHelper* s_webViewHelper; |
}; |
-FrameTestHelpers::WebViewHelper* RenderTableCellDeathTest::s_webViewHelper = 0; |
- |
TEST_F(RenderTableCellDeathTest, CanSetColumn) |
{ |
static const unsigned columnIndex = 10; |