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

Unified Diff: third_party/WebKit/Source/core/testing/CoreTestPrinters.cpp

Issue 1843403002: Move Position printer to Pointer.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/testing/CoreTestPrinters.cpp
diff --git a/third_party/WebKit/Source/core/testing/CoreTestPrinters.cpp b/third_party/WebKit/Source/core/testing/CoreTestPrinters.cpp
deleted file mode 100644
index f21b74bca6e684223e2671be51b57353cd7dae40..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/testing/CoreTestPrinters.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-#include "core/editing/Position.h"
-#include <ios>
-#include <ostream> // NOLINT
-
-namespace blink {
-
-namespace {
-
-template <typename PositionType>
-std::ostream& printPosition(std::ostream& ostream, const PositionType& position)
-{
- if (position.isNull())
- return ostream << "null";
- ostream << position.anchorNode() << "@";
- if (position.isOffsetInAnchor())
- return ostream << position.offsetInContainerNode();
- return ostream << position.anchorType();
-}
-
-} // namespace
-
-std::ostream& operator<<(std::ostream& ostream, PositionAnchorType anchorType)
-{
- switch (anchorType) {
- case PositionAnchorType::AfterAnchor:
- return ostream << "afterAnchor";
- case PositionAnchorType::AfterChildren:
- return ostream << "afterChildren";
- case PositionAnchorType::BeforeAnchor:
- return ostream << "beforeAnchor";
- case PositionAnchorType::BeforeChildren:
- return ostream << "beforeChildren";
- case PositionAnchorType::OffsetInAnchor:
- return ostream << "offsetInAnchor";
- }
- ASSERT_NOT_REACHED();
- return ostream << "anchorType=" << static_cast<int>(anchorType);
-}
-
-std::ostream& operator<<(std::ostream& ostream, const Position& position)
-{
- return printPosition(ostream, position);
-}
-
-std::ostream& operator<<(std::ostream& ostream, const PositionInFlatTree& position)
-{
- return printPosition(ostream, position);
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698