Revision fc7af09fb3eea0ef511a061e5734c1dc8e539b0d authored by Rob Buis on 12 April 2018, 16:14:10 UTC, committed by Blink WPT Bot on 12 April 2018, 16:51:35 UTC
Fix regression allowing text value for -webkit-background-origin that was caused by r514365. Code change implemented by Bugs Nash, testcase by Rob Buis. Bug: 802256 Change-Id: I11e2b1b19a374e9f6b9c1091d82882ef526bc63c Reviewed-on: https://chromium-review.googlesource.com/1008102 Commit-Queue: Rob Buis <rob.buis@samsung.com> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#550221}
1 parent 56a257e
eventsource-close.htm
<!DOCTYPE html>
<html>
<head>
<title>EventSource: close()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
var test = async_test()
test.step(function() {
var source = new EventSource("resources/message.py")
assert_equals(source.readyState, source.CONNECTING, "connecting readyState");
source.onopen = this.step_func(function() {
assert_equals(source.readyState, source.OPEN, "open readyState");
source.close()
assert_equals(source.readyState, source.CLOSED, "closed readyState");
this.done()
})
})
var test2 = async_test(document.title + ", test events", { timeout: 9000 });
test2.step(function() {
var count = 0, reconnected = false,
source = new EventSource("resources/reconnect-fail.py?id=" + new Date().getTime());
source.onerror = this.step_func(function(e) {
assert_equals(e.type, 'error');
switch(count) {
// reconnecting after first message
case 1:
assert_equals(source.readyState, source.CONNECTING, "reconnecting readyState");
reconnected = true;
break;
// one more reconnect to get to the closing
case 2:
assert_equals(source.readyState, source.CONNECTING, "last reconnecting readyState");
count++;
break;
// close
case 3:
assert_equals(source.readyState, source.CLOSED, "closed readyState");
// give some time for errors to hit us
setTimeout(this.step_func(function() { this.done(); }), 100);
break;
default:
assert_unreached("Error handler with msg count " + count);
}
});
source.onmessage = this.step_func(function(e) {
switch(count) {
case 0:
assert_true(!reconnected, "no error event run");
assert_equals(e.data, "opened", "data");
break;
case 1:
assert_true(reconnected, "have reconnected");
assert_equals(e.data, "reconnected", "data");
break;
default:
assert_unreached("Dunno what to do with message number " + count);
}
count++;
});
});
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...