| OLD | NEW |
| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 "<p>" + CONTENT_TEXT + "</p>" + | 644 "<p>" + CONTENT_TEXT + "</p>" + |
| 645 "<iframe>dummy</iframe>" + | 645 "<iframe>dummy</iframe>" + |
| 646 "<p>" + CONTENT_TEXT + "</p>"; | 646 "<p>" + CONTENT_TEXT + "</p>"; |
| 647 | 647 |
| 648 final String expected = | 648 final String expected = |
| 649 "<p>" + CONTENT_TEXT + "</p>" + | 649 "<p>" + CONTENT_TEXT + "</p>" + |
| 650 "<p>" + CONTENT_TEXT + "</p>"; | 650 "<p>" + CONTENT_TEXT + "</p>"; |
| 651 | 651 |
| 652 assertExtractor(expected, html); | 652 assertExtractor(expected, html); |
| 653 } | 653 } |
| 654 |
| 655 public void testStripUnwantedClassNames() { |
| 656 final String html = |
| 657 "<p class=\"test\">" + CONTENT_TEXT + "</p>" + |
| 658 "<p class=\"iscaption\">" + CONTENT_TEXT + "</p>"; |
| 659 |
| 660 final String expected = |
| 661 "<p>" + CONTENT_TEXT + "</p>" + |
| 662 "<p class=\"caption\">" + CONTENT_TEXT + "</p>"; |
| 663 |
| 664 assertExtractor(expected, html); |
| 665 } |
| 654 } | 666 } |
| OLD | NEW |