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

Unified Diff: Source/web/tests/TouchActionTest.cpp

Issue 465483002: Merge NamedNodesCollection and StaticNodeList classes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/testing/Internals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/TouchActionTest.cpp
diff --git a/Source/web/tests/TouchActionTest.cpp b/Source/web/tests/TouchActionTest.cpp
index 607419859ee6e986886d1aabc61a633b20beef97..8f329a66040336c47898877f56a489f9c27ac513 100644
--- a/Source/web/tests/TouchActionTest.cpp
+++ b/Source/web/tests/TouchActionTest.cpp
@@ -160,12 +160,12 @@ void TouchActionTest::runShadowDOMTest(std::string file)
// Oilpan: see runTouchActionTest() comment why these are persistent references.
RefPtrWillBePersistent<blink::Document> document = static_cast<PassRefPtrWillBeRawPtr<blink::Document> >(webView->mainFrame()->document());
- RefPtrWillBePersistent<blink::StaticNodeList> hostNodes = document->querySelectorAll("[shadow-host]", es);
+ RefPtrWillBePersistent<blink::StaticElementList> hostNodes = document->querySelectorAll("[shadow-host]", es);
ASSERT_FALSE(es.hadException());
ASSERT_GE(hostNodes->length(), 1u);
for (unsigned index = 0; index < hostNodes->length(); index++) {
- blink::ShadowRoot* shadowRoot = blink::toElement(hostNodes->item(index))->shadowRoot();
+ blink::ShadowRoot* shadowRoot = hostNodes->item(index)->shadowRoot();
runTestOnTree(shadowRoot, webView, client);
}
@@ -201,13 +201,12 @@ void TouchActionTest::runTestOnTree(blink::ContainerNode* root, WebView* webView
blink::TrackExceptionState es;
// Oilpan: see runTouchActionTest() comment why these are persistent references.
- RefPtrWillBePersistent<blink::StaticNodeList> nodes = root->querySelectorAll("[expected-action]", es);
+ RefPtrWillBePersistent<blink::StaticElementList> elements = root->querySelectorAll("[expected-action]", es);
ASSERT_FALSE(es.hadException());
- for (unsigned index = 0; index < nodes->length(); index++) {
- blink::Element* element = toElement(nodes->item(index));
+ for (unsigned index = 0; index < elements->length(); index++) {
+ Element* element = elements->item(index);
element->scrollIntoViewIfNeeded();
- ASSERT_TRUE(nodes->item(index)->isElementNode());
std::string failureContext("Test case: ");
if (element->hasID()) {
« no previous file with comments | « Source/core/testing/Internals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698