Index: javatests/org/chromium/distiller/TestUtil.java |
diff --git a/javatests/org/chromium/distiller/TestUtil.java b/javatests/org/chromium/distiller/TestUtil.java |
index 6db5ad1ae2f7f3225168e0c8ca8b97d2cee18fa7..107eaa976365ed1e532a146f8446c53dd5083afc 100644 |
--- a/javatests/org/chromium/distiller/TestUtil.java |
+++ b/javatests/org/chromium/distiller/TestUtil.java |
@@ -13,6 +13,7 @@ import com.google.gwt.dom.client.ImageElement; |
import com.google.gwt.dom.client.MetaElement; |
import com.google.gwt.dom.client.Text; |
import com.google.gwt.dom.client.TitleElement; |
+import com.google.gwt.dom.client.NodeList; |
import com.google.gwt.user.client.Random; |
import com.google.gwt.user.client.Window; |
@@ -161,6 +162,14 @@ public class TestUtil { |
return originalHtml.replaceAll(" dir=\\\"(ltr|rtl|inherit|auto)\\\"",""); |
} |
+ public static List<Element> nodeListToList(NodeList<Element> nodeList) { |
+ List<Element> elements = new ArrayList<>(); |
+ for (int i = 0; i < nodeList.getLength(); i++) { |
+ elements.add(nodeList.getItem(i)); |
+ } |
+ return elements; |
+ } |
+ |
/** |
* Randomly shuffle the list in-place. |
*/ |