Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: Source/core/rendering/RenderTableCellTest.cpp

Issue 361633003: Move the table death tests to core/rendering/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/RenderTableRowTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/RenderTableRowTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698