| 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.webdocument; | 5 package org.chromium.distiller.webdocument; |
| 6 | 6 |
| 7 import org.chromium.distiller.DomDistillerJsTestCase; | 7 import org.chromium.distiller.DomDistillerJsTestCase; |
| 8 import org.chromium.distiller.DomWalker; | 8 import org.chromium.distiller.DomWalker; |
| 9 | 9 |
| 10 import com.google.gwt.dom.client.Document; | 10 import com.google.gwt.dom.client.Document; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 runTest(html, html, true); | 123 runTest(html, html, true); |
| 124 } | 124 } |
| 125 | 125 |
| 126 public void testKeepContinueNested() throws Throwable { | 126 public void testKeepContinueNested() throws Throwable { |
| 127 // "display: none" is used. See crbug.com/687071 | 127 // "display: none" is used. See crbug.com/687071 |
| 128 String html = "<div class=\"continue\" style=\"display: none\">" + | 128 String html = "<div class=\"continue\" style=\"display: none\">" + |
| 129 "<div>visible element</div></div>"; | 129 "<div>visible element</div></div>"; |
| 130 runTest(html, html, true); | 130 runTest(html, html, true); |
| 131 } | 131 } |
| 132 | 132 |
| 133 public void testWikipediaFoldedSections() throws Throwable { |
| 134 String html = "<div aria-expanded=\"false\" style=\"display: none\">fold
ed section</div>"; |
| 135 runTest(html, html, true); |
| 136 } |
| 137 |
| 133 public void testDataTable() throws Throwable { | 138 public void testDataTable() throws Throwable { |
| 134 String html = "<table align=\"left\" role=\"grid\">" + // role=grid make
this a data table. | 139 String html = "<table align=\"left\" role=\"grid\">" + // role=grid make
this a data table. |
| 135 "<tbody align=\"left\">" + | 140 "<tbody align=\"left\">" + |
| 136 "<tr>" + | 141 "<tr>" + |
| 137 "<td>row1col1</td>" + | 142 "<td>row1col1</td>" + |
| 138 "<td>row1col2</td>" + | 143 "<td>row1col2</td>" + |
| 139 "</tr>" + | 144 "</tr>" + |
| 140 "</tbody>" + | 145 "</tbody>" + |
| 141 "</table>"; | 146 "</table>"; |
| 142 runTest(html, "<datatable/>"); | 147 runTest(html, "<datatable/>"); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 238 } |
| 234 | 239 |
| 235 public void testSocialElements() throws Throwable { | 240 public void testSocialElements() throws Throwable { |
| 236 runTest("<div></div>", "<div></div>"); | 241 runTest("<div></div>", "<div></div>"); |
| 237 runTest("<div data-component=\"share\"></div>", ""); | 242 runTest("<div data-component=\"share\"></div>", ""); |
| 238 runTest("<div class=\"socialArea\"></div>", ""); | 243 runTest("<div class=\"socialArea\"></div>", ""); |
| 239 runTest("<li></li>", "<li></li>"); | 244 runTest("<li></li>", "<li></li>"); |
| 240 runTest("<li class=\"sharing\"></li>", ""); | 245 runTest("<li class=\"sharing\"></li>", ""); |
| 241 } | 246 } |
| 242 } | 247 } |
| OLD | NEW |