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

Side by Side Diff: javatests/org/chromium/distiller/TerminatingBlocksFinderTest.java

Issue 2721133002: Skip some social sharing elements (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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; 5 package org.chromium.distiller;
6 6
7 import org.chromium.distiller.document.TextBlock; 7 import org.chromium.distiller.document.TextBlock;
8 import org.chromium.distiller.filters.english.TerminatingBlocksFinder; 8 import org.chromium.distiller.filters.english.TerminatingBlocksFinder;
9 9
10 public class TerminatingBlocksFinderTest extends DomDistillerJsTestCase { 10 public class TerminatingBlocksFinderTest extends DomDistillerJsTestCase {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 TerminatingBlocksFinder.isTerminating(tb)); 64 TerminatingBlocksFinder.isTerminating(tb));
65 } 65 }
66 } 66 }
67 67
68 public void testCommentLink() { 68 public void testCommentLink() {
69 assertTrue(TerminatingBlocksFinder.isTerminating(builder.createForAnchor Text("Comment"))); 69 assertTrue(TerminatingBlocksFinder.isTerminating(builder.createForAnchor Text("Comment")));
70 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForText( "Comment"))); 70 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForText( "Comment")));
71 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForAncho rText("comment"))); 71 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForAncho rText("comment")));
72 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForAncho rText("foobar"))); 72 assertFalse(TerminatingBlocksFinder.isTerminating(builder.createForAncho rText("foobar")));
73 } 73 }
74
75 public void testShareLink() {
76 assertTrue(TerminatingBlocksFinder.isTerminating(builder.createForText(" Shares")));
77 }
74 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698