Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

5
test/fixtures/wpt/console/META.yml vendored Normal file
View File

@ -0,0 +1,5 @@
spec: https://console.spec.whatwg.org/
suggested_reviewers:
- domenic
- pwnall
- domfarolino

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Console Count - Logging Manual Test</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<meta name="assert" content="Console count method default parameter should work">
<link rel="help" href="https://console.spec.whatwg.org/#count">
</head>
<body>
<p>Open the console inside the developer tools. It should contain four entries whose contents are:</p>
<p><code>default: 1</code></p>
<p><code>default: 2</code></p>
<p><code>default: 3</code></p>
<p><code>default: 4</code></p>
<script>
console.count();
console.count(undefined);
console.count("default");
console.count({toString() {return "default"}});
</script>
</body>
</html>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<title>Console Count Reset - Logging Manual Test</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<meta name="assert" content="Console countReset method">
<link rel="help" href="https://console.spec.whatwg.org/#countreset">
</head>
<body>
<p>Open the console inside the developer tools. It should contain entries whose contents are:</p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>default: 1</code></p>
<p><code>a label: 1</code></p>
<p><code>a label: 1</code></p>
<p style="color:grey;">[some warning message indicating that a count for label "b" does not exist]</p>
<script>
console.count();
console.countReset();
console.count();
console.countReset();
console.count(undefined);
console.countReset(undefined);
console.count(undefined);
console.countReset(undefined);
console.count("default");
console.countReset("default");
console.count("default");
console.countReset("default");
console.count({toString() {return "default"}});
console.countReset({toString() {return "default"}});
console.count({toString() {return "default"}});
console.countReset({toString() {return "default"}});
console.count("a label");
console.countReset("a label");
console.count("a label");
console.countReset("b"); // should produce a warning
</script>
</body>
</html>

View File

@ -0,0 +1,28 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://webidl.spec.whatwg.org/#es-namespaces
// https://console.spec.whatwg.org/#console-namespace
test(() => {
assert_true(self.hasOwnProperty("console"));
}, "console exists on the global object");
test(() => {
const propDesc = Object.getOwnPropertyDescriptor(self, "console");
assert_equals(propDesc.writable, true, "must be writable");
assert_equals(propDesc.enumerable, false, "must not be enumerable");
assert_equals(propDesc.configurable, true, "must be configurable");
assert_equals(propDesc.value, console, "must have the right value");
}, "console has the right property descriptors");
test(() => {
assert_false("Console" in self);
}, "Console (uppercase, as if it were an interface) must not exist");
test(() => {
const prototype1 = Object.getPrototypeOf(console);
const prototype2 = Object.getPrototypeOf(prototype1);
assert_equals(Object.getOwnPropertyNames(prototype1).length, 0, "The [[Prototype]] must have no properties");
assert_equals(prototype2, Object.prototype, "The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%");
}, "The prototype chain must be correct");

View File

@ -0,0 +1,29 @@
"use strict";
// https://console.spec.whatwg/org/#counting
// https://console.spec.whatwg/org/#timing
const methods = ['count', 'countReset', 'time', 'timeLog', 'timeEnd'];
for (const method of methods) {
test(() => {
let labelToStringCalled = false;
console[method]({
toString() {
labelToStringCalled = true;
}
});
assert_true(labelToStringCalled, `${method}() must call toString() on label when label is an object`);
}, `console.${method}()'s label gets converted to string via label.toString() when label is an object`);
test(() => {
assert_throws_js(Error, () => {
console[method]({
toString() {
throw new Error('conversion error');
}
});
}, `${method} must re-throw any exceptions thrown by label.toString() conversion`);
}, `console.${method}() throws exceptions generated by erroneous label.toString() conversion`);
}

View File

@ -0,0 +1,8 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://console.spec.whatwg.org/
test(() => {
console.log(new Array(10000000).fill("x"));
console.log(new Uint8Array(10000000));
}, "Logging large arrays works");

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<mete charset=utf-8>
<title>Console Logging Manual Test</title>
<p>Open the console inside the developer tools. It should contain one entry saying "test passed".</p>
<script>
const sr = new ShadowRealm();
sr.evaluate(`
console.log("test passed");
`);
</script>

View File

@ -0,0 +1,10 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://console.spec.whatwg.org/
test(() => {
console.log(Symbol());
console.log(Symbol("abc"));
console.log(Symbol.for("def"));
console.log(Symbol.isConcatSpreadable);
}, "Logging a symbol doesn't throw");

View File

@ -0,0 +1,40 @@
"use strict";
// https://webidl.spec.whatwg.org/#es-namespaces
// https://console.spec.whatwg.org/#console-namespace
test(() => {
assert_own_property(console, Symbol.toStringTag);
const propDesc = Object.getOwnPropertyDescriptor(console, Symbol.toStringTag);
assert_equals(propDesc.value, "console", "value");
assert_equals(propDesc.writable, false, "writable");
assert_equals(propDesc.enumerable, false, "enumerable");
assert_equals(propDesc.configurable, true, "configurable");
}, "@@toStringTag exists on the namespace object with the appropriate descriptor");
test(() => {
assert_equals(console.toString(), "[object console]");
assert_equals(Object.prototype.toString.call(console), "[object console]");
}, "Object.prototype.toString applied to the namespace object");
test(t => {
assert_own_property(console, Symbol.toStringTag, "Precondition: @@toStringTag on the namespace object");
t.add_cleanup(() => {
Object.defineProperty(console, Symbol.toStringTag, { value: "console" });
});
Object.defineProperty(console, Symbol.toStringTag, { value: "Test" });
assert_equals(console.toString(), "[object Test]");
assert_equals(Object.prototype.toString.call(console), "[object Test]");
}, "Object.prototype.toString applied after modifying the namespace object's @@toStringTag");
test(t => {
assert_own_property(console, Symbol.toStringTag, "Precondition: @@toStringTag on the namespace object");
t.add_cleanup(() => {
Object.defineProperty(console, Symbol.toStringTag, { value: "console" });
});
assert_true(delete console[Symbol.toStringTag]);
assert_equals(console.toString(), "[object Object]");
assert_equals(Object.prototype.toString.call(console), "[object Object]");
}, "Object.prototype.toString applied after deleting @@toStringTag");

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>Console Number Format Specifiers on Symbols</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<meta name="assert" content="Console format specifiers on Symbols">
<link rel="help" href="https://console.spec.whatwg.org/#formatter">
</head>
<body>
<p>Open the console inside the developer tools. It should contain 15 entries, each of which are:</p>
<p><code>NaN</code></p>
<script>
const methods = ["log", "dirxml", "trace", "group", "groupCollapsed"];
for (method of methods) {
console[method]("%i", Symbol.for("description"));
if (method == "group" || method == "groupCollapsed") console.groupEnd();
console[method]("%d", Symbol.for("description"));
if (method == "group" || method == "groupCollapsed") console.groupEnd();
console[method]("%f", Symbol.for("description"));
if (method == "group" || method == "groupCollapsed") console.groupEnd();
}
</script>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Console String Format Specifier on Symbols</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<meta name="assert" content="Console format specifiers on Symbols">
<link rel="help" href="https://console.spec.whatwg.org/#formatter">
</head>
<body>
<p>Open the console inside the developer tools. It should contain five entries, each of which are:</p>
<p><code>Symbol(description)</code></p>
<script>
console.log("%s", Symbol.for("description"));
console.dirxml("%s", Symbol.for("description"));
console.trace("%s", Symbol.for("description"));
console.group("%s", Symbol.for("description"));
console.groupEnd();
console.groupCollapsed("%s", Symbol.for("description"));
console.groupEnd();
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
// META: global=window,dedicatedworker,shadowrealm
/**
* These tests assert the non-existence of certain
* legacy Console methods that are not included in
* the specification: http://console.spec.whatwg.org/
*/
"use strict";
test(() => {
assert_equals(console.timeline, undefined, "console.timeline should be undefined");
}, "'timeline' function should not exist on the console object");
test(() => {
assert_equals(console.timelineEnd, undefined, "console.timelineEnd should be undefined");
}, "'timelineEnd' function should not exist on the console object");
test(() => {
assert_equals(console.markTimeline, undefined, "console.markTimeline should be undefined");
}, "'markTimeline' function should not exist on the console object");

View File

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>Console Timing Methods - Logging Manual Test</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<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>

View File

@ -0,0 +1,5 @@
// META: script=/resources/idlharness-shadowrealm.js
// https://console.spec.whatwg.org/
idl_test_shadowrealm(["console"], []);

View File

@ -0,0 +1,9 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://console.spec.whatwg.org/
idl_test(
['console'],
[] // no deps
);