From efd7e78af3fc086dfdec51738905665d38d08eb4 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 28 Oct 2019 00:22:53 +0900 Subject: Use web standard Permissions API (#3200) --- cli/tests/025_hrtime.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/025_hrtime.ts b/cli/tests/025_hrtime.ts index 417ca6982..9f60b7a77 100644 --- a/cli/tests/025_hrtime.ts +++ b/cli/tests/025_hrtime.ts @@ -1,3 +1,5 @@ -console.log(performance.now() % 2 !== 0); -Deno.revokePermission("hrtime"); -console.log(performance.now() % 2 === 0); +window.onload = async (): Promise => { + console.log(performance.now() % 2 !== 0); + await Deno.permissions.revoke({ name: "hrtime" }); + console.log(performance.now() % 2 === 0); +}; -- cgit v1.2.3