Skip to content

Commit

Permalink
Add console timing manual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino authored Jul 4, 2018
2 parents cffbd07 + 025f01b commit eff6365
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions console/console-timing-logging-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>Console Timing Methods - Logging Manual Test</title>
<meta name="author" title="Dominic Farolino" href="mailto:[email protected]">
<meta name="assert" content="Console timing methods">
<link rel="help" href="https://console.spec.whatwg.org/#timing">
</head>
<body>
<p>Open the console inside the developer tools. It should contain entries whose contents are:</p>
<p><code>default: &lt;some time></code></p>
<p><code>default: &lt;some time></code></p>

<p><code>default: &lt;some time></code></p>
<p><code>default: &lt;some time> extra data</code></p>
<p><code>default: &lt;some time></code></p>

<p><code>default: &lt;some time></code></p>
<p><code>default: &lt;some time> extra data</code></p>
<p><code>default: &lt;some time></code></p>

<p><code>default: &lt;some time></code></p>
<p><code>default: &lt;some time> extra data</code></p>
<p><code>default: &lt;some time></code></p>

<p><code>custom toString(): &lt;some time></code></p>
<p><code>custom toString(): &lt;some time> extra data</code></p>
<p><code>custom toString(): &lt;some time></code></p>

<p><code>a label: &lt;some time></code></p>
<p><code>a label: &lt;some time> extra data</code></p>
<p><code>a label: &lt;some time></code></p>

<p style="color:grey;">[some warning message indicating that a timer for label "b" does not exist]</p>

<script>
console.time();
console.timeLog();
console.timeEnd();

console.time(undefined);
console.timeLog(undefined);
console.timeLog(undefined, "extra data");
console.timeEnd(undefined);

console.time("default");
console.timeLog("default");
console.timeLog("default", "extra data");
console.timeEnd("default");

console.time({toString() {return "default"}});
console.timeLog({toString() {return "default"}});
console.timeLog({toString() {return "default"}}, "extra data");
console.timeEnd({toString() {return "default"}});

console.time({toString() {return "custom toString()"}});
console.timeLog({toString() {return "custom toString()"}});
console.timeLog({toString() {return "custom toString()"}}, "extra data");
console.timeEnd({toString() {return "custom toString()"}});

console.time("a label");
console.timeLog("a label");
console.timeLog("a label", "extra data");
console.timeEnd("a label");

console.timeLog("b"); // should produce a warning
console.timeEnd("b"); // should produce a warning
</script>
</body>
</html>

0 comments on commit eff6365

Please sign in to comment.