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

Side by Side Diff: Source/core/dom/shadow/ComposedTreeTraversalTest.cpp

Issue 1257203002: Fix ODR violation that can break WTF::String pretty printing in tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really fix 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/dom/shadow/ComposedTreeTraversal.h" 6 #include "core/dom/shadow/ComposedTreeTraversal.h"
7 7
8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
11 #include "core/dom/Node.h" 11 #include "core/dom/Node.h"
12 #include "core/dom/NodeTraversal.h" 12 #include "core/dom/NodeTraversal.h"
13 #include "core/dom/shadow/ShadowRoot.h" 13 #include "core/dom/shadow/ShadowRoot.h"
14 #include "core/frame/FrameView.h" 14 #include "core/frame/FrameView.h"
15 #include "core/html/HTMLDocument.h" 15 #include "core/html/HTMLDocument.h"
16 #include "core/html/HTMLElement.h" 16 #include "core/html/HTMLElement.h"
17 #include "core/testing/DummyPageHolder.h" 17 #include "core/testing/DummyPageHolder.h"
18 #include "platform/geometry/IntSize.h" 18 #include "platform/geometry/IntSize.h"
19 #include "wtf/Compiler.h" 19 #include "wtf/Compiler.h"
20 #include "wtf/OwnPtr.h" 20 #include "wtf/OwnPtr.h"
21 #include "wtf/PassRefPtr.h" 21 #include "wtf/PassRefPtr.h"
22 #include "wtf/RefPtr.h" 22 #include "wtf/RefPtr.h"
23 #include "wtf/StdLibExtras.h" 23 #include "wtf/StdLibExtras.h"
24 #include "wtf/Vector.h" 24 #include "wtf/Vector.h"
25 #include "wtf/testing/WTFTestHelpers.h"
26 #include <gtest/gtest.h> 25 #include <gtest/gtest.h>
27 26
28 namespace blink { 27 namespace blink {
29 28
30 class ComposedTreeTraversalTest : public ::testing::Test { 29 class ComposedTreeTraversalTest : public ::testing::Test {
31 protected: 30 protected:
32 HTMLDocument& document() const; 31 HTMLDocument& document() const;
33 32
34 // Sets |mainHTML| to BODY element with |innerHTML| property and attaches 33 // Sets |mainHTML| to BODY element with |innerHTML| property and attaches
35 // shadow root to child with |shadowHTML|, then update distribution for 34 // shadow root to child with |shadowHTML|, then update distribution for
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 EXPECT_EQ(*m2, ComposedTreeTraversal::lastWithinOrSelf(*m2)); 318 EXPECT_EQ(*m2, ComposedTreeTraversal::lastWithinOrSelf(*m2));
320 319
321 EXPECT_EQ(s11->firstChild(), ComposedTreeTraversal::lastWithin(*s11)); 320 EXPECT_EQ(s11->firstChild(), ComposedTreeTraversal::lastWithin(*s11));
322 EXPECT_EQ(*s11->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s11)) ; 321 EXPECT_EQ(*s11->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s11)) ;
323 322
324 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*s12)); 323 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*s12));
325 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s12)) ; 324 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s12)) ;
326 } 325 }
327 326
328 } // namespace blink 327 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698