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

Unified Diff: javatests/org/chromium/distiller/DomUtilTest.java

Issue 1411603004: Discard hidden articles when using fast path (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Fixed inconsistent indentation Created 5 years, 2 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: javatests/org/chromium/distiller/DomUtilTest.java
diff --git a/javatests/org/chromium/distiller/DomUtilTest.java b/javatests/org/chromium/distiller/DomUtilTest.java
index a636a5e181f8e99e66ba9ff21716f351d42758b9..38766b3901dbfd86db510afe19e54ef76e2c8488 100644
--- a/javatests/org/chromium/distiller/DomUtilTest.java
+++ b/javatests/org/chromium/distiller/DomUtilTest.java
@@ -4,6 +4,7 @@
package org.chromium.distiller;
+import com.google.gwt.dom.client.NodeList;
mdjones 2015/10/21 18:15:02 This belongs in the import section below.
import org.chromium.distiller.webdocument.WebTable;
import com.google.gwt.core.client.JsArray;
@@ -110,8 +111,10 @@ public class DomUtilTest extends DomDistillerJsTestCase {
currDiv.appendChild(TestUtil.createDiv(5));
assertEquals(div2, DomUtil.getNearestCommonAncestor(finalDiv1, currDiv.getChild(0)));
- assertEquals(div2, DomUtil.getNearestCommonAncestor(
- DomUtil.querySelectorAll(mRoot, "[id=\"3\"],[id=\"5\"]")));
+ NodeList<Element> elementNodeList = DomUtil.querySelectorAll(mRoot, "[id=\"3\"],[id=\"5\"]");
+ assertEquals(div2, DomUtil.getNearestCommonAncestor(elementNodeList));
+ assertEquals(div2, DomUtil.getNearestCommonAncestor(TestUtil.nodeListToList(elementNodeList)));
mdjones 2015/10/21 18:15:02 Line length
+
}
/**
@@ -129,8 +132,9 @@ public class DomUtilTest extends DomDistillerJsTestCase {
div2.appendChild(div3);
assertEquals(div, DomUtil.getNearestCommonAncestor(div, div3));
- assertEquals(div, DomUtil.getNearestCommonAncestor(
- DomUtil.querySelectorAll(mRoot, "[id=\"1\"],[id=\"3\"]")));
+ NodeList<Element> elementNodeList = DomUtil.querySelectorAll(mRoot, "[id=\"1\"],[id=\"3\"]");
+ assertEquals(div, DomUtil.getNearestCommonAncestor(elementNodeList));
+ assertEquals(div, DomUtil.getNearestCommonAncestor(TestUtil.nodeListToList(elementNodeList)));
}
public void testNodeDepth() {

Powered by Google App Engine
This is Rietveld 408576698