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

Unified Diff: Source/core/editing/EditingTestBase.h

Issue 1204953002: Introduce EditingTestBase to share code among test files for editing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-24T15:31:52 Rebase for chaning bot(?) Created 5 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/editing/EditingTestBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingTestBase.h
diff --git a/Source/core/editing/EditingTestBase.h b/Source/core/editing/EditingTestBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5dd5a75bfbf67a6756f0e027814789802e0254c
--- /dev/null
+++ b/Source/core/editing/EditingTestBase.h
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EditingTestBase_h
+#define EditingTestBase_h
+
+#include "core/dom/Position.h"
+#include "core/testing/CoreTestHelpers.h"
+#include "wtf/Forward.h"
+#include <gtest/gtest.h>
+
+namespace blink {
+
+class DummyPageHolder;
+
+class EditingTestBase : public ::testing::Test {
+protected:
+ EditingTestBase();
+ ~EditingTestBase() override;
+
+ void SetUp() override;
+
+ Document& document() const;
+
+ static PassRefPtrWillBeRawPtr<ShadowRoot> createShadowRootForElementWithIDAndSetInnerHTML(TreeScope&, const char* hostElementID, const char* shadowRootContent);
+
+ void setBodyContent(const char*);
+ PassRefPtrWillBeRawPtr<ShadowRoot> setShadowContent(const char*);
+
+ static Position positionInDOMTree(Node& anchor, int offset);
+ static PositionInComposedTree positionInComposedTree(Node& anchor, int offset);
+
+private:
+ OwnPtr<DummyPageHolder> m_dummyPageHolder;
+};
+
+} // namespace blink
+
+#endif // EditingTestBase_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/editing/EditingTestBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698