blob: 4d6f6a9b8d2687b181638d4caef64e03c71529e3 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Generate this token with the command:
generate_token.py --expire-timestamp=2000000000 http://127.0.0.1:8000 LegacyPerformanceMemoryCounters
-->
<meta http-equiv="origin-trial" content="AkkvkocWTiiH0+VhdTlxue2ibIiQ0Gy2Dp4HL5CJEEDHqSovu8L6CCqmHRz7PDWm9EgLLj9xpGXbvxxDdaN8cwAAAABneyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiTGVnYWN5UGVyZm9ybWFuY2VNZW1vcnlDb3VudGVycyIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==" />
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<script>
test(t => {
assert_idl_attribute(performance.memory,
"usedJSHeapSizeWithoutExternalMemory",
"used JS heap size without external memory");
assert_idl_attribute(performance.memory,
"totalJSHeapSizeWithoutExternalMemory",
"total JS heap size without external memory");
const snapshot = performance.memory;
assert_less_than_equal(snapshot.usedJSHeapSizeWithoutExternalMemory,
snapshot.usedJSHeapSize,
"used without external memory <= used overall");
assert_less_than_equal(snapshot.totalJSHeapSizeWithoutExternalMemory,
snapshot.totalJSHeapSize,
"total without external memory <= total overall");
assert_less_than_equal(snapshot.usedJSHeapSizeWithoutExternalMemory,
snapshot.totalJSHeapSizeWithoutExternalMemory,
"used without external memory <= total without external memory");
}, "Test legacy performance memory counters are enabled via origin trial.");
</script>