File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/test/java/org/jsoup/nodes Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public void testFastReparentExistingContent() {
8585 Document doc = new Document ("https://example.com/" );
8686 Element el = doc .body ();
8787 for (int i = 0 ; i <= 50000 ; i ++) {
88- el = el .appendElement ( "p" );
88+ el = el .appendChild ( doc . createElement ( "p" )). firstElementChild ( );
8989 }
9090 assertFalse (doc .hasText ());
9191 el .text ("Hello" );
@@ -98,7 +98,7 @@ public void testFastReparentExistingContent() {
9898 Document doc = new Document ("https://example.com/" );
9999 Element el = doc .body ();
100100 for (int i = 0 ; i <= 50000 ; i ++) {
101- el = el .appendElement ( "p" );
101+ el = el .appendChild ( doc . createElement ( "p" )). firstElementChild ( );
102102 }
103103 Element script = el .appendElement ("script" );
104104 script .text ("script" ); // holds data nodes, so inserts as data, not text
@@ -113,7 +113,7 @@ public void testFastReparentExistingContent() {
113113 Element el = doc .body ();
114114 int num = 50000 ;
115115 for (int i = 0 ; i <= num ; i ++) {
116- el = el .appendElement ( "p" );
116+ el = el .appendChild ( doc . createElement ( "p" )). firstElementChild ( );
117117 }
118118 Elements parents = el .parents ();
119119 assertEquals (num +2 , parents .size ()); // +2 for html and body
You can’t perform that action at this time.
0 commit comments