• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3<head>
4<title>Console Count Reset - Logging Manual Test</title>
5<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
6<meta name="assert" content="Console countReset method">
7<link rel="help" href="https://console.spec.whatwg.org/#countreset">
8</head>
9<body>
10<p>Open the console inside the developer tools. It should contain entries whose contents are:</p>
11<p><code>default: 1</code></p>
12<p><code>default: 1</code></p>
13<p><code>default: 1</code></p>
14<p><code>default: 1</code></p>
15<p><code>default: 1</code></p>
16<p><code>default: 1</code></p>
17<p><code>default: 1</code></p>
18<p><code>default: 1</code></p>
19<p><code>a label: 1</code></p>
20<p><code>a label: 1</code></p>
21<p style="color:grey;">[some warning message indicating that a count for label "b" does not exist]</p>
22
23<script>
24console.count();
25console.countReset();
26console.count();
27
28console.count(undefined);
29console.countReset(undefined);
30console.count(undefined);
31
32console.count("default");
33console.countReset("default");
34console.count("default");
35
36console.count({toString() {return "default"}});
37console.countReset({toString() {return "default"}});
38console.count({toString() {return "default"}});
39
40console.count("a label");
41console.countReset();
42console.count("a label");
43
44console.countReset("b"); // should produce a warning
45</script>
46</body>
47</html>
48