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

Side by Side Diff: Source/core/editing/Position.h

Issue 1313283002: Re-introduce printers for Node, Position, PositionAnchorType in GTest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-26T14:32:13 Add comments for printers which are only for testing Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/core/editing/EditingTestBase.h ('k') | Source/core/input/EventHandlerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 { 383 {
384 return position; 384 return position;
385 } 385 }
386 386
387 template <> 387 template <>
388 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg y>(const Position& position) 388 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg y>(const Position& position)
389 { 389 {
390 return toPositionInComposedTree(position); 390 return toPositionInComposedTree(position);
391 } 391 }
392 392
393 // These printers are available only for testing in "webkit_unit_tests", and
394 // implemented in "core/testing/CoreTestPrinters.cpp".
395 std::ostream& operator<<(std::ostream&, const Node&);
396 std::ostream& operator<<(std::ostream&, const Node*);
397
398 std::ostream& operator<<(std::ostream&, PositionAnchorType);
399 std::ostream& operator<<(std::ostream&, const Position&);
400 std::ostream& operator<<(std::ostream&, const PositionInComposedTree&);
401
393 } // namespace blink 402 } // namespace blink
394 403
395 #ifndef NDEBUG 404 #ifndef NDEBUG
396 // Outside the WebCore namespace for ease of invocation from gdb. 405 // Outside the WebCore namespace for ease of invocation from gdb.
397 void showTree(const blink::Position&); 406 void showTree(const blink::Position&);
398 void showTree(const blink::Position*); 407 void showTree(const blink::Position*);
399 #endif 408 #endif
400 409
401 #endif // Position_h 410 #endif // Position_h
OLDNEW
« no previous file with comments | « Source/core/editing/EditingTestBase.h ('k') | Source/core/input/EventHandlerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698