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,33 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>File API Test: Progress Event - bubbles, cancelable</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="http://www.w3.org/TR/FileAPI/#events">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
async_test(function(){
var blob = new Blob(["TEST"]);
var reader = new FileReader();
reader.onloadstart = this.step_func(function(evt) {
assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
});
reader.onload = this.step_func(function(evt) {
assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
});
reader.onloadend = this.step_func(function(evt) {
assert_false(evt.bubbles, "The bubbles must be false when the event is dispatched");
assert_false(evt.cancelable, "The cancelable must be false when the event is dispatched");
this.done();
});
reader.readAsText(blob);
}, "Check the values of bubbles and cancelable are false when the progress event is dispatched");
</script>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FileReader Errors Test</title>
<link rel=help href="http://dev.w3.org/2006/webapi/FileAPI/#convenienceAPI">
<link rel=author title="Breezewish" href="mailto:me@breeswish.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<form name="upload">
<input type="file" id="fileChooser"><br><input type="button" id="start" value="start">
</form>
<div>
<p>Test steps:</p>
<ol>
<li>Download the <a href="support/file_test1.txt">file</a>.</li>
<li>Select the file in the file inputbox.</li>
<li>Delete the file.</li>
<li>Click the 'start' button.</li>
</ol>
</div>
<div id="log"></div>
<script>
var fileChooser = document.querySelector('#fileChooser');
setup({explicit_done: true});
setup({explicit_timeout: true});
on_event(fileChooser, 'change', function() {
async_test(function(t) {
var reader = new FileReader();
reader.readAsArrayBuffer(fileChooser.files[0]);
reader.onloadend = t.step_func_done(function(event) {
assert_equals(event.target.readyState, FileReader.DONE);
assert_equals(reader.error, null);
});
}, 'FileReader.error should be null if there are no errors when reading');
});
on_event(document.querySelector('#start'), 'click', function() {
async_test(function(t) {
var reader = new FileReader();
reader.readAsArrayBuffer(fileChooser.files[0]);
reader.onloadend = t.step_func_done(function(event) {
assert_equals(event.target.readyState, FileReader.DONE);
assert_equals(reader.error.code, 8);
assert_true(reader.error instanceof DOMException);
});
}, 'FileReader.error should be NOT_FOUND_ERR if the file is not found when reading');
done();
});
</script>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>FileReader NotReadableError Test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://w3c.github.io/FileAPI/#dfn-error-codes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<form name="upload">
<input type="file" id="fileChooser"><br><input type="button" id="start" value="start">
</form>
<div>
<p>Test steps:</p>
<ol>
<li>Download the <a href="support/file_test1.txt">file</a>.</li>
<li>Select the file in the file inputbox.</li>
<li>Delete the file's readable permission.</li>
<li>Click the 'start' button.</li>
</ol>
</div>
<script>
const fileChooser = document.querySelector('#fileChooser');
setup({explicit_done: true});
setup({explicit_timeout: true});
on_event(document.querySelector('#start'), 'click', () => {
async_test(t => {
const reader = new FileReader();
reader.readAsArrayBuffer(fileChooser.files[0]);
reader.onloadend = t.step_func_done(event => {
assert_equals(event.target.readyState, FileReader.DONE);
assert_equals(reader.error.name, "NotReadableError");
});
}, 'FileReader.error should be NotReadableError if the file is unreadable');
done();
});
</script>

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>FileReader SecurityError Test</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://w3c.github.io/FileAPI/#dfn-error-codes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<form name="upload">
<input type="file" id="fileChooser"><br><input type="button" id="start" value="start">
</form>
<div>
<p>Test steps:</p>
<ol>
<li>Select a system sensitive file (e.g. files in /usr/bin, password files,
and other native operating system executables) in the file inputbox.</li>
<li>Click the 'start' button.</li>
</ol>
</div>
<script>
const fileChooser = document.querySelector('#fileChooser');
setup({explicit_done: true});
setup({explicit_timeout: true});
on_event(document.querySelector('#start'), 'click', () => {
async_test(t => {
const reader = new FileReader();
reader.readAsArrayBuffer(fileChooser.files[0]);
reader.onloadend = t.step_func_done(event => {
assert_equals(event.target.readyState, FileReader.DONE);
assert_equals(reader.error.name, "SecurityError");
});
}, 'FileReader.error should be SECURITY_ERROR if the file is a system sensitive file');
done();
});
</script>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset=utf-8>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
function workerCode() {
close();
var blob = new Blob([123]);
var fr = new FileReader();
fr.readAsText(blob);
fr.abort()
fr.readAsArrayBuffer(blob);
postMessage(true);
}
var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"});
var w = new Worker(URL.createObjectURL(workerBlob));
w.onmessage = function(e) {
assert_true(e.data, "FileReader created during worker shutdown.");
t.done();
}
}, 'FileReader created after a worker self.close()');
</script>