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 OLStart addOLStart() { |
| 60 OLStart olStart = new OLStart(); |
| 61 document.addEmbed(olStart); |
| 62 return olStart; |
| 63 } |
| 64 |
| 65 public OLEnd addOLEnd() { |
| 66 OLEnd olEnd = new OLEnd(); |
| 67 document.addEmbed(olEnd); |
| 68 return olEnd; |
| 69 } |
| 70 |
| 71 public ULStart addULStart() { |
| 72 ULStart ulStart = new ULStart(); |
| 73 document.addEmbed(ulStart); |
| 74 return ulStart; |
| 75 } |
| 76 |
| 77 public ULEnd addULEnd() { |
| 78 ULEnd ulEnd = new ULEnd(); |
| 79 document.addEmbed(ulEnd); |
| 80 return ulEnd; |
| 81 } |
| 82 |
| 83 public LIStart addLIStart() { |
| 84 LIStart liStart = new LIStart(); |
| 85 document.addEmbed(liStart); |
| 86 return liStart; |
| 87 } |
| 88 |
| 89 public LIEnd addLIEnd() { |
| 90 LIEnd liEnd = new LIEnd(); |
| 91 document.addEmbed(liEnd); |
| 92 return liEnd; |
| 93 } |
| 94 |
59 public WebDocument build() { | 95 public WebDocument build() { |
60 return document; | 96 return document; |
61 } | 97 } |
62 } | 98 } |
OLD | NEW |