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

View File

@ -0,0 +1,7 @@
<!DOCTYPE html>
<head></head>
<body></body>
<script>
performance.mark('mark_child_frame');
</script>

View File

@ -0,0 +1,9 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
onload = (event) => {
history.back();
};
</script>

View File

@ -0,0 +1,60 @@
const verifyEntries = (entries, filterOptions) => {
for (const filterOption of filterOptions) {
let countBeforeFiltering = entries.length;
// Using negate of the condition so that the next filtering is applied on less entries.
entries = entries.filter(
e => !(e.entryType == filterOption['entryType'] && e.name.includes(filterOption['name'])));
assert_equals(
countBeforeFiltering - entries.length, filterOption['expectedCount'], filterOption['failureMsg']);
}
}
const createFilterOption = (name, entryType, expectedCount, msgPrefix, description = '') => {
if (description) {
description = ' ' + description;
}
let failureMsg =
`${msgPrefix} should have ${expectedCount} ${entryType} entries for name ${name}` + description;
return {
name: name,
entryType: entryType,
expectedCount: expectedCount,
failureMsg: failureMsg
};
}
const loadChildFrame = (src) => {
return new Promise(resolve => {
const childFrame = document.createElement('iframe');
childFrame.addEventListener("load", resolve);
childFrame.src = src;
document.body.appendChild(childFrame);
});
}
const loadChildFrameAndGrandchildFrame = (src) => {
return new Promise(resolve => {
const crossOriginChildFrame = document.createElement('iframe');
// Wait for the child frame to send a message. The child frame would send a message
// when it loads its child frame.
window.addEventListener('message', e => {
if (e.data == 'Load completed') {
resolve();
}
});
crossOriginChildFrame.src = src;
document.body.appendChild(crossOriginChildFrame)
});
}

View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<head>
</head>
<!--
This html is embedded as a sub-frame in include-frames-originA-B-A.html,
include-frames-originA-B-B.html and include-frames-originA-A-A.html. Once embedded,
this would take a url parameter named origin which is the origin of the child frame
this html is to load in step 3 listed below.
It does,
1, waits for load.
2, creates a single mark performance entry.
3, creates and loads a child frame, and waits for it to load.
4. verify entries obtained from this frame.
-->
<body>
<script>
(async () => {
// Wait for load.
await new Promise(resolve => window.addEventListener("load", resolve));
// Mark.
performance.mark("mark_subframe");
// Create and load an iframe and wait for load.
await new Promise(resolve => {
const childFrame = document.createElement('iframe');
childFrame.addEventListener('load', async () => {
window.parent.postMessage('Load completed', "*");
resolve();
});
childFrame.src = (new URL(document.location)).searchParams.get('origin')
+ '/performance-timeline/resources/child-frame.html';
document.body.appendChild(childFrame);
}
);
})();
</script>
</body>

View File

@ -0,0 +1,4 @@
{
"name": "nav_id_test",
"target": "resource_timing"
}

View File

@ -0,0 +1,4 @@
(function () {
let now = window.performance.now();
while (window.performance.now() < now + 60);
}());

View File

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>The navigation_id Detached iframe Page.</title>
</head>
<body>
<script>
window.addEventListener("load", () => {
setTimeout(() => {
const container = window.frameElement;
container.remove();
}, 10);
performance.mark('mark-window-detached-frame');
});
</script>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!doctype html>
<script>
addEventListener("load", () => {
const entry = performance.getEntriesByType("navigation")[0];
try {
window.top.postMessage(entry, "*");
} catch(error) {
if (error.name == "DataCloneError") {
window.top.postMessage("PASS", "*");
} else {
window.top.postMessage("FAIL - Wrong exception name: " + error.name, "*");
}
}
window.top.postMessage("FAIL - No exception thrown", "*");
});
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

View File

@ -0,0 +1,6 @@
performance.mark('workerMark');
postMessage({
'invalid' : performance.getEntriesByType('invalid').length,
'mark' : performance.getEntriesByType('mark').length,
'measure' : performance.getEntriesByType('measure').length
});

View File

@ -0,0 +1,6 @@
self.onmessage = () => {
const mark_name = 'user_timig_mark';
performance.mark(mark_name);
postMessage(performance.getEntriesByName(mark_name)[0].navigationId);
self.close();
}

View File

@ -0,0 +1,6 @@
try {
new PerformanceObserver(() => true);
postMessage("SUCCESS");
} catch (ex) {
postMessage("FAILURE");
}