-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reliably generate mutations while the snapshot is iterating in order …
…to test rare occurrences. Have added what I believe should be the correct parsing
- Loading branch information
1 parent
d9d3e54
commit d6b57fc
Showing
3 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Document</title> | ||
|
||
<script> | ||
function swapChildren() { | ||
var a1 = document.getElementById('a1'); | ||
var a2 = document.getElementById('a2'); | ||
a1.parentNode.insertBefore(a1, a2); | ||
} | ||
function swapForwardSiblings() { | ||
var b2 = document.getElementById('b2'); | ||
var b1 = document.getElementById('b1'); | ||
b2.parentNode.insertBefore(b1, b2); | ||
} | ||
function moveForwardSiblingBehind() { | ||
var d1 = document.getElementById('d1'); | ||
var d3 = document.getElementById('d3'); | ||
d1.parentNode.insertBefore(d3, d1); | ||
} | ||
function swapInLongDistance() { | ||
var a1 = document.getElementById('a1'); | ||
var e2 = document.getElementById('e2'); | ||
e2.parentNode.insertBefore(a1, e2); | ||
} | ||
</script> | ||
|
||
</head> | ||
|
||
<body> | ||
<div data-mutatefn="swapChildren()"> | ||
<!-- does see in sequence; 1, then 2 --> | ||
<b id="a2"></b> | ||
<b id="a1"></b> | ||
</div> | ||
<div> | ||
<!-- should see in sequence but doesn't --> | ||
<b data-mutatefn="swapForwardSiblings()"></b> | ||
<b id="b2"></b> | ||
<b id="b1"></b> | ||
</div> | ||
<div> | ||
<b id="d1"></b> | ||
<b data-mutatefn="moveForwardSiblingBehind()" id="d2"></b> | ||
<!-- d3 shouldn't be visible --> | ||
<b id="d3"></b> | ||
</div> | ||
<div data-mutatefn="swapInLongDistance()"> | ||
<!-- a1 shouldn't be here as it's already in tree --> | ||
<b id="e2"></b> | ||
</div> | ||
</body> | ||
|
||
</html> |