Skip to content

Commit ff81cf2

Browse files
committed
browser-rs: fix test case
1 parent c1057dd commit ff81cf2

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

app/browser-rs/tests/dom.rs

+14-5
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,12 @@ fn list() {
276276
li2.borrow_mut().previous_sibling = Some(Rc::downgrade(&li1));
277277
}
278278

279-
run_test!("<html><head></head><body><ul><li></li><li></li></ul></body></html>", Some(root));
279+
run_test!(
280+
"<html><head></head><body><ul><li></li><li></li></ul></body></html>",
281+
Some(root)
282+
);
280283
}
281284

282-
/*
283285
#[test_case]
284286
fn list2() {
285287
// root (Document)
@@ -323,15 +325,15 @@ fn list2() {
323325
ElementKind::Li,
324326
)))));
325327

326-
// body <--> ul
328+
// body <--> ul1
327329
{
328330
body.borrow_mut().first_child = Some(ul1.clone());
329331
}
330332
{
331333
ul1.borrow_mut().parent = Some(Rc::downgrade(&body));
332334
}
333335

334-
// ul <--> li1
336+
// ul1 <--> li1
335337
{
336338
ul1.borrow_mut().first_child = Some(li1.clone());
337339
}
@@ -347,6 +349,14 @@ fn list2() {
347349
li2.borrow_mut().previous_sibling = Some(Rc::downgrade(&li1));
348350
}
349351

352+
// ul1 <--> ul2
353+
{
354+
ul1.borrow_mut().next_sibling = Some(ul2.clone());
355+
}
356+
{
357+
ul2.borrow_mut().previous_sibling = Some(Rc::downgrade(&ul1));
358+
}
359+
350360
// ul2 <--> li3
351361
{
352362
ul2.borrow_mut().first_child = Some(li3.clone());
@@ -365,4 +375,3 @@ fn list2() {
365375

366376
run_test!("<html><head></head><body><ul><li></li><li></li></ul><ul><li></li><li></li></ul></body></html>", Some(root));
367377
}
368-
*/

0 commit comments

Comments
 (0)