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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 assertFalse(((WebTag) elements.get(7)).isStartTag()); | 232 assertFalse(((WebTag) elements.get(7)).isStartTag()); |
233 } | 233 } |
234 | 234 |
235 public void testSocialElements() throws Throwable { | 235 public void testSocialElements() throws Throwable { |
236 runTest("<div></div>", "<div></div>"); | 236 runTest("<div></div>", "<div></div>"); |
237 runTest("<div data-component=\"share\"></div>", ""); | 237 runTest("<div data-component=\"share\"></div>", ""); |
238 runTest("<div class=\"socialArea\"></div>", ""); | 238 runTest("<div class=\"socialArea\"></div>", ""); |
239 runTest("<li></li>", "<li></li>"); | 239 runTest("<li></li>", "<li></li>"); |
240 runTest("<li class=\"sharing\"></li>", ""); | 240 runTest("<li class=\"sharing\"></li>", ""); |
241 } | 241 } |
| 242 |
| 243 public void testWikiEditLinks() throws Throwable { |
| 244 String notEdit = "<a href=\"index.php?action=edit&redlink=1\"></a>"; |
| 245 runTest(notEdit, notEdit); |
| 246 runTest("<a href=\"index.php?action=edit§ion=3\" class=\"mw-ui-icon\
"></a>", ""); |
| 247 } |
| 248 |
| 249 public void testWikiEditSection() throws Throwable { |
| 250 String notEdit = "<span class=\"mw-headline\"></span>"; |
| 251 runTest(notEdit, notEdit); |
| 252 runTest("<span class=\"mw-editsection\"></span>", ""); |
| 253 } |
242 } | 254 } |
OLD | NEW |