| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |