Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Window.set/clearInterval.(fixes #2116)
- Loading branch information
Showing
5 changed files
with
92 additions
and
13 deletions.
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
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,20 @@ | ||
<html> | ||
<head> | ||
<script src="harness.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
var x = 0; | ||
var intervalID = setInterval(function() { | ||
x += 1; | ||
if (x == 2) { | ||
clearInterval(intervalID); | ||
setTimeout(function() { | ||
is(x, 2); | ||
finish(); | ||
}, 300); | ||
} | ||
}, 10); | ||
</script> | ||
</body> | ||
</html> |
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,19 @@ | ||
<html> | ||
<head> | ||
</head> | ||
<body> | ||
<script> | ||
var x = 0; | ||
alert("Interval begin"); | ||
var intervalID = setInterval(function() { | ||
if (x < 10) { | ||
alert("interval " + x); | ||
x += 1; | ||
} else { | ||
clearInterval(intervalID); | ||
alert("Interval deleted"); | ||
} | ||
}, 300); | ||
</script> | ||
</body> | ||
</html> |
b7dcf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from jdm
at https://github.com/lpy/servo/commit/b7dcf62ed00b073cfc7728b23bee5540cd76e2aa
b7dcf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging lpy/servo/issue2116 = b7dcf62 into auto
b7dcf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lpy/servo/issue2116 = b7dcf62 merged ok, testing candidate = 7441dae
b7dcf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://servo-buildbot.pub.build.mozilla.org/builders/linux/builds/1231
success: http://servo-buildbot.pub.build.mozilla.org/builders/mac/builds/1185
b7dcf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 7441dae