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

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

Issue 2287113005: Skip unrecognized iframes (Closed) Base URL: git@github.com:chromium/dom-distiller.git@innertext
Patch Set: address comment Created 4 years, 3 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 | « java/org/chromium/distiller/webdocument/DomConverter.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 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 com.google.gwt.dom.client.Document; 7 import com.google.gwt.dom.client.Document;
8 import com.google.gwt.dom.client.Element; 8 import com.google.gwt.dom.client.Element;
9 9
10 public class ContentExtractorTest extends DomDistillerJsTestCase { 10 public class ContentExtractorTest extends DomDistillerJsTestCase {
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 public void testSpanArticle() { 625 public void testSpanArticle() {
626 final String htmlArticle = 626 final String htmlArticle =
627 "<span>" + CONTENT_TEXT + "</span>" + 627 "<span>" + CONTENT_TEXT + "</span>" +
628 "<span>" + CONTENT_TEXT + "</span>" + 628 "<span>" + CONTENT_TEXT + "</span>" +
629 "<span>" + CONTENT_TEXT + "</span>"; 629 "<span>" + CONTENT_TEXT + "</span>";
630 630
631 final String expected = "<div>" + htmlArticle + "</div>"; 631 final String expected = "<div>" + htmlArticle + "</div>";
632 632
633 assertExtractor(expected, htmlArticle); 633 assertExtractor(expected, htmlArticle);
634 } 634 }
635
636 public void testUnwantedIFrame() {
637 final String html =
638 "<p>" + CONTENT_TEXT + "</p>" +
639 "<iframe>dummy</iframe>" +
640 "<p>" + CONTENT_TEXT + "</p>";
641
642 final String expected =
643 "<p>" + CONTENT_TEXT + "</p>" +
644 "<p>" + CONTENT_TEXT + "</p>";
645
646 assertExtractor(expected, html);
647 }
635 } 648 }
OLDNEW
« no previous file with comments | « java/org/chromium/distiller/webdocument/DomConverter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698