<!doctype html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
const windowOrigin = performance.timeOrigin;

test(() => {
  // Use a 30ms cushion when comparing with Date() to account for inaccuracy.
  const startTime = Date.now();
  assert_greater_than_equal(startTime + 30, windowOrigin, 'Date.now() should be at least as large as the window timeOrigin.');
  const startNow = performance.now();
  assert_less_than