Revision 92c857093784ffe21babd2d64564a9cba491c8b7 authored by Yuki Shiino on 26 December 2018, 13:48:42 UTC, committed by Chromium WPT Sync on 26 December 2018, 13:48:42 UTC
This is mostly a reland of Iee5c1d6917ad7770383e06a425f96000835a663a. This patch implements setTimeout/setInterval Web APIs with IDL callback function of type Function (i.e. V8Function in Blink). Also ensure eager finalization of ScheduledAction in DOMTimer to prevent a memory leak. Bug: 866610 Change-Id: I3f460247f27069e4054a984efd3f98a2ce0ceac7
1 parent cd31531
executionContexts.sub.html
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
function createAndLoadIframe() {
return new Promise(resolve => {
addEventListener("message", function() {
assert_true(true, "Iframe loaded");
resolve();
}, { once: true });
let ifr = document.createElement('iframe');
document.body.appendChild(ifr);
ifr.src = "https://{{domains[www2]}}:{{ports[https][0]}}/clear-site-data/support/iframe_executionContexts.html";
});
}
function loadClearSiteDataResource(what) {
return new Promise(resolve => {
addEventListener("message", function() {
assert_true(true, "Iframe re-loaded");
resolve();
}, { once: true });
let image = new Image();
image.src = "https://{{domains[www2]}}:{{ports[https][0]}}/clear-site-data/support/echo-clear-site-data.py?" + what;
});
}
promise_test(function(test) {
return createAndLoadIframe()
.then(() => loadClearSiteDataResource("executionContexts"))
}, "executionContexts triggers the reload of contexts");
promise_test(function(test) {
return createAndLoadIframe()
.then(() => loadClearSiteDataResource("*"));
}, "* triggers the reload of contexts");
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...