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

Side by Side Diff: javatests/org/chromium/distiller/webdocument/DomConverterTest.java

Issue 2729233002: Ignore the "Edit" links in wiki pages (Closed)
Patch Set: fix redlink and desktop 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.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
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&section=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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698