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

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

Issue 1037593004: Oilpan: fix build after r192583. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 "<content select='#m10'></content>" 299 "<content select='#m10'></content>"
300 "</a>"; 300 "</a>";
301 setupSampleHTML(mainHTML, shadowHTML, 1); 301 setupSampleHTML(mainHTML, shadowHTML, 1);
302 302
303 RefPtrWillBeRawPtr<Element> body = document().body(); 303 RefPtrWillBeRawPtr<Element> body = document().body();
304 RefPtrWillBeRawPtr<Element> m0 = body->querySelector("#m0", ASSERT_NO_EXCEPT ION); 304 RefPtrWillBeRawPtr<Element> m0 = body->querySelector("#m0", ASSERT_NO_EXCEPT ION);
305 RefPtrWillBeRawPtr<Element> m1 = body->querySelector("#m1", ASSERT_NO_EXCEPT ION); 305 RefPtrWillBeRawPtr<Element> m1 = body->querySelector("#m1", ASSERT_NO_EXCEPT ION);
306 RefPtrWillBeRawPtr<Element> m2 = body->querySelector("#m2", ASSERT_NO_EXCEPT ION); 306 RefPtrWillBeRawPtr<Element> m2 = body->querySelector("#m2", ASSERT_NO_EXCEPT ION);
307 307
308 RefPtrWillBeRawPtr<Element> m10 = body->querySelector("#m10", ASSERT_NO_EXCE PTION); 308 RefPtrWillBeRawPtr<Element> m10 = body->querySelector("#m10", ASSERT_NO_EXCE PTION);
309 RefPtrWillBeRawPtr<Element> m11 = body->querySelector("#m11", ASSERT_NO_EXCE PTION);
310 309
311 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = m1->shadowRoot(); 310 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = m1->shadowRoot();
312 RefPtrWillBeRawPtr<Element> s11 = shadowRoot->querySelector("#s11", ASSERT_N O_EXCEPTION); 311 RefPtrWillBeRawPtr<Element> s11 = shadowRoot->querySelector("#s11", ASSERT_N O_EXCEPTION);
313 RefPtrWillBeRawPtr<Element> s12 = shadowRoot->querySelector("#s12", ASSERT_N O_EXCEPTION); 312 RefPtrWillBeRawPtr<Element> s12 = shadowRoot->querySelector("#s12", ASSERT_N O_EXCEPTION);
314 313
315 EXPECT_EQ(m0->firstChild(), ComposedTreeTraversal::lastWithin(*m0)); 314 EXPECT_EQ(m0->firstChild(), ComposedTreeTraversal::lastWithin(*m0));
316 EXPECT_EQ(*m0->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*m0)); 315 EXPECT_EQ(*m0->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*m0));
317 316
318 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*m1)); 317 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*m1));
319 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*m1)); 318 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*m1));
320 319
321 EXPECT_EQ(nullptr, ComposedTreeTraversal::lastWithin(*m2)); 320 EXPECT_EQ(nullptr, ComposedTreeTraversal::lastWithin(*m2));
322 EXPECT_EQ(*m2, ComposedTreeTraversal::lastWithinOrSelf(*m2)); 321 EXPECT_EQ(*m2, ComposedTreeTraversal::lastWithinOrSelf(*m2));
323 322
324 EXPECT_EQ(s11->firstChild(), ComposedTreeTraversal::lastWithin(*s11)); 323 EXPECT_EQ(s11->firstChild(), ComposedTreeTraversal::lastWithin(*s11));
325 EXPECT_EQ(*s11->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s11)) ; 324 EXPECT_EQ(*s11->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s11)) ;
326 325
327 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*s12)); 326 EXPECT_EQ(m10->firstChild(), ComposedTreeTraversal::lastWithin(*s12));
328 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s12)) ; 327 EXPECT_EQ(*m10->firstChild(), ComposedTreeTraversal::lastWithinOrSelf(*s12)) ;
329 } 328 }
330 329
331 } // namespace 330 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698