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

Side by Side Diff: javatests/org/chromium/distiller/webdocument/filters/RelevantElementsTest.java

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: canBeNested move out of the switch. 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
« no previous file with comments | « javatests/org/chromium/distiller/webdocument/filters/NestedElementRetainerTest.java ('k') | 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 package org.chromium.distiller.webdocument.filters; 5 package org.chromium.distiller.webdocument.filters;
6 6
7 import org.chromium.distiller.DomDistillerJsTestCase; 7 import org.chromium.distiller.DomDistillerJsTestCase;
8 import org.chromium.distiller.webdocument.TestWebTextBuilder;
9 import org.chromium.distiller.webdocument.TestWebDocumentBuilder; 8 import org.chromium.distiller.webdocument.TestWebDocumentBuilder;
10 import org.chromium.distiller.webdocument.WebDocument; 9 import org.chromium.distiller.webdocument.WebDocument;
11 import org.chromium.distiller.webdocument.WebElement; 10 import org.chromium.distiller.webdocument.WebElement;
12 import org.chromium.distiller.webdocument.WebImage; 11 import org.chromium.distiller.webdocument.WebImage;
13 import org.chromium.distiller.webdocument.WebText;
14 import org.chromium.distiller.webdocument.WebTable; 12 import org.chromium.distiller.webdocument.WebTable;
15 13
16 14
17 public class RelevantElementsTest extends DomDistillerJsTestCase { 15 public class RelevantElementsTest extends DomDistillerJsTestCase {
18 public void testEmptyDocument() { 16 public void testEmptyDocument() {
19 WebDocument document = new WebDocument(); 17 WebDocument document = new WebDocument();
20 assertFalse(RelevantElements.process(document)); 18 assertFalse(RelevantElements.process(document));
21 assertTrue(document.getElements().isEmpty()); 19 assertTrue(document.getElements().isEmpty());
22 } 20 }
23 21
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 public void testImageAfterNonContent() { 71 public void testImageAfterNonContent() {
74 TestWebDocumentBuilder builder = new TestWebDocumentBuilder(); 72 TestWebDocumentBuilder builder = new TestWebDocumentBuilder();
75 builder.addText("text 1").setIsContent(true); 73 builder.addText("text 1").setIsContent(true);
76 builder.addText("text 2").setIsContent(false); 74 builder.addText("text 2").setIsContent(false);
77 WebImage wi = builder.addImage(); 75 WebImage wi = builder.addImage();
78 WebDocument document = builder.build(); 76 WebDocument document = builder.build();
79 assertFalse(RelevantElements.process(document)); 77 assertFalse(RelevantElements.process(document));
80 assertFalse(wi.getIsContent()); 78 assertFalse(wi.getIsContent());
81 } 79 }
82 } 80 }
OLDNEW
« no previous file with comments | « javatests/org/chromium/distiller/webdocument/filters/NestedElementRetainerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698