| 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 org.chromium.distiller.DomDistillerJsTestCase; |    7 import org.chromium.distiller.DomDistillerJsTestCase; | 
|    8 import org.chromium.distiller.TestUtil; |    8 import org.chromium.distiller.TestUtil; | 
|    9  |    9  | 
|   10 import com.google.gwt.dom.client.Document; |   10 import com.google.gwt.dom.client.Document; | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   84         builder.lineBreak(content1.getChild(3)); |   84         builder.lineBreak(content1.getChild(3)); | 
|   85         builder.textNode(Text.as(content1.getChild(4)), 0); |   85         builder.textNode(Text.as(content1.getChild(4)), 0); | 
|   86         builder.lineBreak(content1.getChild(5)); |   86         builder.lineBreak(content1.getChild(5)); | 
|   87         builder.textNode(Text.as(content1.getChild(6)), 0); |   87         builder.textNode(Text.as(content1.getChild(6)), 0); | 
|   88  |   88  | 
|   89         WebText text = builder.build(0); |   89         WebText text = builder.build(0); | 
|   90         String got = text.generateOutput(false); |   90         String got = text.generateOutput(false); | 
|   91         String want = "<p>Words<br>split<br>with<br>lines</p>"; |   91         String want = "<p>Words<br>split<br>with<br>lines</p>"; | 
|   92         assertEquals(want, TestUtil.removeAllDirAttributes(got)); |   92         assertEquals(want, TestUtil.removeAllDirAttributes(got)); | 
|   93     } |   93     } | 
 |   94  | 
 |   95     public void testGenerateOutputLIElements() { | 
 |   96         Element container = Document.get().createLIElement(); | 
 |   97         mBody.appendChild(container); | 
 |   98  | 
 |   99         container.appendChild(TestUtil.createText("Some text content 1.")); | 
 |  100  | 
 |  101         WebTextBuilder builder = new WebTextBuilder(); | 
 |  102         builder.textNode(Text.as(container.getChild(0)), 0); | 
 |  103  | 
 |  104         WebText text = builder.build(0); | 
 |  105         String got = text.generateOutput(false); | 
 |  106         String want = "Some text content 1."; | 
 |  107         assertEquals(want, TestUtil.removeAllDirAttributes(got)); | 
 |  108     } | 
|   94 } |  109 } | 
| OLD | NEW |