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

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

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: canBeNested move out of the switch. Created 5 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 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 import org.chromium.distiller.TestUtil; 9 import org.chromium.distiller.TestUtil;
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public WebImage addLeadImage() { 49 public WebImage addLeadImage() {
50 Element image = TestUtil.createImage(); 50 Element image = TestUtil.createImage();
51 image.setAttribute("width", "600"); 51 image.setAttribute("width", "600");
52 image.setAttribute("height", "400"); 52 image.setAttribute("height", "400");
53 Document.get().getBody().appendChild(image); 53 Document.get().getBody().appendChild(image);
54 WebImage wi = new WebImage(image, 600, 400, "http://www.example.com/lead .bmp"); 54 WebImage wi = new WebImage(image, 600, 400, "http://www.example.com/lead .bmp");
55 document.addEmbed(wi); 55 document.addEmbed(wi);
56 return wi; 56 return wi;
57 } 57 }
58 58
59 public WebTag addTagStart() {
60 WebTag webTag = new WebTag("OL", WebTag.TagType.START);
61 document.addTag(webTag);
62 return webTag;
63 }
64
65 public WebTag addTagEnd() {
66 WebTag webTag = new WebTag("OL", WebTag.TagType.END);
67 document.addTag(webTag);
68 return webTag;
69 }
70
59 public WebDocument build() { 71 public WebDocument build() {
60 return document; 72 return document;
61 } 73 }
62 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698