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,27 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
</body>
<script>
promise_test(async () => {
performance.clearResourceTimings()
// Create child iframe.
const childFrame = document.createElement('iframe')
childFrame.src = "../resources/child-frame.html"
document.body.appendChild(childFrame)
// wait until the child frame's onload event fired
await new Promise(r => childFrame.addEventListener("load", r));
const childWindow = childFrame.contentWindow;
// Detach the child frame
document.body.removeChild(childFrame);
const entries = childWindow.performance.getEntries({ includeChildFrames: true });
const parent_entries = performance.getEntries({ includeChildFrames: true });
}, "GetEntries of a detached parent frame does not crash");
</script>

View File

@ -0,0 +1,93 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src=/common/get-host-info.sub.js></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries, description = '') => {
let filterOptions = [
createFilterOption('include-frames-originA-A-A', 'navigation', 1, 'Main Frame', description),
createFilterOption('include-frames-subframe', 'resource', 1, 'Main Frame', description),
];
verifyEntries(entries, filterOptions);
}
const verifyChildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-subframe', 'navigation', 1, 'Child Frame'),
createFilterOption('child-frame.html', 'resource', 1, 'Child Frame'),
createFilterOption('mark_subframe', 'mark', 1, 'Child frame')
];
verifyEntries(entries, filterOptions);
}
const verifyGrandchildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('child-frame.html', 'navigation', 1, 'Grandchild Frame'),
createFilterOption('mark_child_frame', 'mark', 1, 'Grandchild frame')
];
verifyEntries(entries, filterOptions);
}
promise_test(async () => {
performance.clearResourceTimings();
// Load a child frame. The child frame upon loading would load a child frame of its own.
await loadChildFrameAndGrandchildFrame(
'../resources/include-frames-subframe.html?origin=' + get_host_info().ORIGIN);
// Verify entries retrieved from main frame.
const entries = performance.getEntries({ includeChildFrames: true });
verifyMainFrameEntries(entries);
verifyChildFrameEntries(entries);
verifyGrandchildFrameEntries(entries);
// 1 entry for parent, 1 for child, 1 for grandchild.
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
assert_equals(navigationEntries.length, 3, 'Navigation entries should be 3.');
const markedChildFrameEntries = performance.getEntries(
{ name: 'mark_subframe', includeChildFrames: true });
assert_equals(markedChildFrameEntries.length, 1, 'Child frame mark entries should be 1.');
const markedGrandchildFrameEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
assert_equals(markedGrandchildFrameEntries.length, 1, 'Grand child frame mark entries should be 1.');
// Test cases where includeChildFrames is false.
const entriesWithNoFitlerOptions = performance.getEntries();
const entriesWithoutIncludingChildFrames = performance.getEntries({ includeChildFrames: false });
const navigationEntriesWithoutIncludingChildFrames = performance.getEntries({ entryType: "navigation", includeChildFrames: false });
const markedEntriesWithoutIncludingChildFrames = performance.getEntries(
{ name: 'entry-name', includeChildFrames: false });
verifyMainFrameEntries(entriesWithNoFitlerOptions, 'with no filter options.');
verifyMainFrameEntries(entriesWithoutIncludingChildFrames, 'with includingChildFrames being false.')
// 1 entry for main frame.
assert_equals(navigationEntriesWithoutIncludingChildFrames.length, 1,
'Navigation entries with includeChildFrame being false should be 1.');
// 0 entry since grandchild frame is not included.
assert_equals(markedEntriesWithoutIncludingChildFrames.length, 0,
'Mark entries with includeChildFrame being false should be 0.');
}, 'GetEntries of a document of origin A, its child frame of origin B and \
its grandchild frame of origin A.');
</script>
</body>

View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries, description = '') => {
let filterOptions = [
createFilterOption('include-frames-originA-A', 'navigation', 1, 'Main Frame', description),
createFilterOption('child-frame.html', 'resource', 1, 'Main Frame', description),
];
verifyEntries(entries, filterOptions);
}
const verifyChildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('child-frame.html', 'navigation', 1, 'Child Frame'),
createFilterOption('mark_child_frame', 'mark', 1, 'Child Frame'),
];
verifyEntries(entries, filterOptions);
}
promise_test(async () => {
performance.clearResourceTimings();
// Load a child frame.
await loadChildFrame('../resources/child-frame.html');
const entries = performance.getEntries({ includeChildFrames: true });
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
const markedEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
verifyMainFrameEntries(entries);
verifyChildFrameEntries(entries);
// 1 entry for main frame, 1 for child frame.
assert_equals(navigationEntries.length, 2, 'Navigation entries should be 2.');
// 1 entry for child frame.
assert_equals(markedEntries.length, 1, 'Mark entries should be 1.');
// Test cases where includeChildFrames is false.
const entriesWithNoFitlerOptions = performance.getEntries();
const entriesWithoutIncludingChildFrames = performance.getEntries({ includeChildFrames: false });
const navigationEntriesWithoutIncludingChildFrames = performance.getEntries({ entryType: "navigation", includeChildFrames: false });
const markedEntriesWithoutIncludingChildFrames = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: false });
verifyMainFrameEntries(entriesWithNoFitlerOptions, 'with no filter options.');
verifyMainFrameEntries(entriesWithoutIncludingChildFrames, 'with includeChildFrame being false.');
// 1 entry for main frame.
assert_equals(navigationEntriesWithoutIncludingChildFrames.length, 1,
'Navigation entries with includeChildFrame being false should be 1.');
// 0 entry for child frame.
assert_equals(markedEntriesWithoutIncludingChildFrames.length, 0,
'Mark entries with includeChildFrame being false should be 0.');
}, 'GetEntries of a document of origin A and its child frame of origin A.');
</script>
</body>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-originA-AA', 'navigation', 1, 'Main Frame'),
createFilterOption('child-frame.html', 'navigation', 2, 'Child Frames'),
createFilterOption('child-frame.html', 'resource', 2, 'Main Frame'),
createFilterOption('mark_child_frame', 'mark', 2, 'Child frames')
];
verifyEntries(entries, filterOptions);
}
const verifyPerformanceEntries = () => {
const entries = performance.getEntries({ includeChildFrames: true });
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
const markedEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
verifyMainFrameEntries(entries);
// 1 entry for main frame, 1 for each child frame.
assert_equals(navigationEntries.length, 3, 'Navigation entries should be 3.');
// 1 entry for each child frame.
assert_equals(markedEntries.length, 2, 'Mark entries should be 2.');
}
promise_test(async () => {
performance.clearResourceTimings();
// Load first child iframe.
const promise1 = loadChildFrame('../resources/child-frame.html');
// Load second child iframe.
const promise2 = loadChildFrame('../resources/child-frame.html');
return Promise.all([promise1, promise2]).then(verifyPerformanceEntries);
}, 'GetEntries of a document of origin A and its two child frames both of origin A.');
</script>
</body>

View File

@ -0,0 +1,53 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src=/common/get-host-info.sub.js></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-originA-AB', 'navigation', 1, 'Main Frame'),
createFilterOption('child-frame.html', 'navigation', 1, 'Child Frames'),
createFilterOption('child-frame.html', 'resource', 2, 'Main Frame'),
createFilterOption('mark_child_frame', 'mark', 1, 'Child frames')
];
verifyEntries(entries, filterOptions);
}
const verifyPerformanceEntries = () => {
const entries = performance.getEntries({ includeChildFrames: true });
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
const markedEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
verifyMainFrameEntries(entries);
// 1 entry for main frame, 1 for local child frame.
assert_equals(navigationEntries.length, 2, 'Navigation entries should be 2.');
// 1 entry for local child frame.
assert_equals(markedEntries.length, 1, 'Mark entries should be 1.');
}
promise_test(() => {
performance.clearResourceTimings();
// Load first child iframe.
sameOriginPromise = loadChildFrame('../resources/child-frame.html');
// Create second child iframe.
crossOriginPromise = loadChildFrame(
get_host_info().HTTP_REMOTE_ORIGIN + '/resources/child-frame.html');
return Promise.all([sameOriginPromise, crossOriginPromise]).then(verifyPerformanceEntries);
}, 'GetEntries of a document of origin A and its two child frames of origin A and B respectively.');
</script>
</body>

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src=/common/get-host-info.sub.js></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries, description = '') => {
let filterOptions = [
createFilterOption('include-frames-originA-B-A', 'navigation', 1, 'Main Frame', description),
createFilterOption('include-frames-subframe', 'resource', 1, 'Main Frame', description),
];
verifyEntries(entries, filterOptions);
}
const verifyChildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-subframe', 'navigation', 0, 'Child Frame'),
createFilterOption('child-frame.html', 'resource', 0, 'Child Frame'),
];
verifyEntries(entries, filterOptions);
}
const verifyGrandchildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('child-frame.html', 'navigation', 1, 'Grandchild Frame'),
createFilterOption('mark_child_frame', 'mark', 1, 'Grandchild frame')
];
verifyEntries(entries, filterOptions);
}
promise_test(async () => {
performance.clearResourceTimings();
// Load a child frame. The child frame upon loading would load a child frame of its own.
await loadChildFrameAndGrandchildFrame(get_host_info().REMOTE_ORIGIN +
'/performance-timeline/resources/include-frames-subframe.html?origin=' + get_host_info().ORIGIN);
const entries = performance.getEntries({ includeChildFrames: true });
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
const markedEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
verifyMainFrameEntries(entries);
verifyChildFrameEntries(entries);
verifyGrandchildFrameEntries(entries);
// 1 entry for main frame, 1 for grandchild frame.
assert_equals(navigationEntries.length, 2, 'Navigation entries should be 2.');
// 1 entry for grandchild frame.
assert_equals(markedEntries.length, 1, 'Mark entries should be 1.');
// Test cases where includeChildFrames is false.
const entriesWithNoFitlerOptions = performance.getEntries();
const entriesWithoutIncludingChildFrames = performance.getEntries({ includeChildFrames: false });
const navigationEntriesWithoutIncludingChildFrames = performance.getEntries({ entryType: "navigation", includeChildFrames: false });
const markedEntriesWithoutIncludingChildFrames = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: false });
verifyMainFrameEntries(entriesWithNoFitlerOptions, 'with no filter options.');
verifyMainFrameEntries(entriesWithoutIncludingChildFrames, 'with includeChildFrame being false.');
// 1 entry for main frame.
assert_equals(navigationEntriesWithoutIncludingChildFrames.length, 1,
'Navigation entries with includeChildFrame being false should be 1.');
// 0 entry since grandchild frame is not included.
assert_equals(markedEntriesWithoutIncludingChildFrames.length, 0,
'Mark entries with includeChildFrame being false should be 0.');
}, 'GetEntries of a document of origin A, its child frame of origin B and \
its grandchild frame of origin A.');
</script>
</body>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src=/common/get-host-info.sub.js></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-originA-B-B', 'navigation', 1, 'Main Frame'),
createFilterOption('include-frames-subframe', 'resource', 1, 'Main Frame'),
];
verifyEntries(entries, filterOptions);
}
const verifyChildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-subframe', 'navigation', 0, 'Child Frame'),
createFilterOption('child-frame.html', 'resource', 0, 'Child Frame'),
];
verifyEntries(entries, filterOptions);
}
const verifyGrandchildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('child-frame.html', 'navigation', 0, 'Grandchild Frame'),
createFilterOption('mark_child_frame', 'mark', 0, 'Grandchild frame')
];
verifyEntries(entries, filterOptions);
}
promise_test(async () => {
performance.clearResourceTimings();
// Load a origin child frame. The child frame upon loading would load a child frame of its own.
await loadChildFrameAndGrandchildFrame(get_host_info().REMOTE_ORIGIN
+ '/performance-timeline/resources/include-frames-subframe.html?origin='
+ get_host_info().REMOTE_ORIGIN);
const entries = performance.getEntries({ includeChildFrames: true });
verifyMainFrameEntries(entries);
verifyChildFrameEntries(entries);
verifyGrandchildFrameEntries(entries);
}, 'GetEntries of a document of origin A, its child frame of origin B and \
its grandchild frame of origin B.');
</script>
</body>

View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src=/common/get-host-info.sub.js></script>
<script src="../resources/include-frames-helper.js"></script>
</head>
<body>
<script>
const verifyMainFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('include-frames-originA-B', 'navigation', 1, 'Main Frame'),
createFilterOption('child-frame.html', 'resource', 1, 'Main Frame'),
];
verifyEntries(entries, filterOptions);
}
const verifyChildFrameEntries = (entries) => {
let filterOptions = [
createFilterOption('child-frame.html', 'navigation', 0, 'Child Frame'),
createFilterOption('mark_child_frame', 'mark', 0, 'Child Frame'),
];
verifyEntries(entries, filterOptions);
}
promise_test(async () => {
performance.clearResourceTimings();
await loadChildFrame(
get_host_info().HTTP_REMOTE_ORIGIN + '/performance_timeline/resources/child-frame.html');
const entries = performance.getEntries({ includeChildFrames: true });
const navigationEntries = performance.getEntries({ entryType: "navigation", includeChildFrames: true });
const markedEntries = performance.getEntries(
{ name: 'mark_subframe', includeChildFrames: true });
// 1 entry for main frame.
assert_equals(navigationEntries.length, 1, 'Navigation entries should 1.');
// 0 entry since child frame is cross origin.
assert_equals(markedEntries.length, 0, 'Mark entries should 0.');
}, 'GetEntries of a parent Frame of origin A and its child frame of origin B');
</script>
</body>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
</body>
<script>
promise_test(() => {
return new Promise(resolve => {
const navigationEntries = performance.getEntries({ type: 'navigation' })
const parentEntry = navigationEntries[0]
// Parent NavigationTiming source is current window.
assert_equals(parentEntry.source, window)
// Create child iframe.
const childFrame = document.createElement('iframe')
childFrame.src = "../resources/child-frame.html"
document.body.appendChild(childFrame)
childFrame.addEventListener('load', () => {
const markedEntries = performance.getEntries(
{ name: 'mark_child_frame', includeChildFrames: true });
const childEntry = markedEntries[0]
// Child PerformanceMark source is the child's Window.
assert_equals(childEntry.source, childFrame.contentWindow)
resolve()
})
})
}, "PerformanceEntry source is equal to its respective Window")
</script>

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test(async () => {
performance.clearResourceTimings();
performance.mark('entry-name');
const navigationEntries = performance.getEntries({ entryType: 'navigation' });
const markedEntries = performance.getEntries(
{ name: 'entry-name', entryType: 'mark' });
assert_equals(navigationEntries.length, 1, 'navigationEntries should be 1.');
assert_equals(markedEntries.length, 1, 'markedEntries should be 1.');
}, 'GetEntries with filter options.');
</script>
</body>