https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 081d5deaff4a25ca5f8b6c0baa30e085de230c36 authored by Mike West on 13 September 2015, 08:25:34 UTC
CSP: Correct a cookie name.
Tip revision: 081d5de
eval-scripts-setInterval-allowed.sub.html
<!DOCTYPE html>
<html>

<head>
    <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.-->
    <title>eval-scripts-setInterval-allowed</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="../support/logTest.sub.js?logs=[]"></script>
    <script src='../support/alertAssert.sub.js?alerts=["PASS 1 of 2","PASS 2 of 2"]'></script>
    <!-- enforcing policy:
script-src 'self' 'unsafe-inline' 'unsafe-inline' 'unsafe-eval'; connect-src 'self';
-->
</head>
<pre>
<script>
 {
}
var id_string = setInterval("clearInterval(id_string); alert_assert('PASS 1 of 2')", 0);
if (id_string == 0)
    log('FAIL: Return value for string (should not be 0): ' + id_string);
var id_function = setInterval(function() {
  clearInterval(id_function);
  alert_assert('PASS 2 of 2');
}, 0);
if (id_function == 0)
    document.write('FAIL: Return value for function (should not be 0): ' + id_function);
</script>
</pre>

</html>
back to top