mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-08 12:19:05 +02:00
--HG-- rename : testing/web-platform/meta/websockets/interfaces/WebSocket/close/006.html.ini => testing/web-platform/meta/websockets/interfaces/WebSocket/close/close-connecting.html.ini rename : testing/web-platform/meta/websockets/interfaces/WebSocket/events/002.html.ini => testing/web-platform/meta/websockets/interfaces/WebSocket/constants/004.html.ini rename : testing/web-platform/meta/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml.ini => testing/web-platform/meta/websockets/interfaces/WebSocket/events/015.html.ini rename : testing/web-platform/tests/html/editing/dnd/target-origin/003.html => testing/web-platform/tests/html/editing/dnd/target-origin/003-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/004.html => testing/web-platform/tests/html/editing/dnd/target-origin/004-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/005.html => testing/web-platform/tests/html/editing/dnd/target-origin/005-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/006.html => testing/web-platform/tests/html/editing/dnd/target-origin/006-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/007.html => testing/web-platform/tests/html/editing/dnd/target-origin/007-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/008.html => testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/009.html => testing/web-platform/tests/html/editing/dnd/target-origin/009-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/010.html => testing/web-platform/tests/html/editing/dnd/target-origin/010-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/011.html => testing/web-platform/tests/html/editing/dnd/target-origin/011-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/012.html => testing/web-platform/tests/html/editing/dnd/target-origin/012-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/013.html => testing/web-platform/tests/html/editing/dnd/target-origin/013-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/102.html => testing/web-platform/tests/html/editing/dnd/target-origin/102-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/103.html => testing/web-platform/tests/html/editing/dnd/target-origin/103-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/104.html => testing/web-platform/tests/html/editing/dnd/target-origin/104-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/105.html => testing/web-platform/tests/html/editing/dnd/target-origin/105-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/106.html => testing/web-platform/tests/html/editing/dnd/target-origin/106-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/107.html => testing/web-platform/tests/html/editing/dnd/target-origin/107-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/108.html => testing/web-platform/tests/html/editing/dnd/target-origin/108-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/109.html => testing/web-platform/tests/html/editing/dnd/target-origin/109-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/110.html => testing/web-platform/tests/html/editing/dnd/target-origin/110-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/111.html => testing/web-platform/tests/html/editing/dnd/target-origin/111-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/112.html => testing/web-platform/tests/html/editing/dnd/target-origin/112-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/113.html => testing/web-platform/tests/html/editing/dnd/target-origin/113-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/114.html => testing/web-platform/tests/html/editing/dnd/target-origin/114-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/115.html => testing/web-platform/tests/html/editing/dnd/target-origin/115-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/116.html => testing/web-platform/tests/html/editing/dnd/target-origin/116-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/117.html => testing/web-platform/tests/html/editing/dnd/target-origin/117-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/118.html => testing/web-platform/tests/html/editing/dnd/target-origin/118-manual.html rename : testing/web-platform/tests/html/editing/dnd/target-origin/201.html => testing/web-platform/tests/html/editing/dnd/target-origin/201-manual.html rename : testing/web-platform/tests/html/semantics/interfaces.html => testing/web-platform/tests/html/semantics/interfaces.js rename : testing/web-platform/tests/pointerevents/pointerevent_pointerout_after_pointerup_nohover.html => testing/web-platform/tests/pointerevents/pointerevent_pointerleave_after_pointerup_nohover.html rename : testing/web-platform/tests/websockets/interfaces/CloseEvent/004.html => testing/web-platform/tests/websockets/interfaces/CloseEvent/clean-close.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/008.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/007.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/005.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/006.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-setter.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/004.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/003.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/001.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-initial.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/009.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/002.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-readonly.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/010.html => testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/005.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-basic.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/006.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-connecting.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/003.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-multiple.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/005.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-nested.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/002.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-replace.html rename : testing/web-platform/tests/websockets/interfaces/WebSocket/close/004.html => testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-return.html extra : rebase_source : 200f5fafb760e3c985a5ae3e8682c0e3cc99920f
167 lines
4.1 KiB
HTML
167 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>File API manual IDL tests</title>
|
|
<link rel="author" title="Intel" href="http://www.intel.com">
|
|
<link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#conformance">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/WebIDLParser.js"></script>
|
|
<script src="/resources/idlharness.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>File API manual IDL tests</h1>
|
|
|
|
<div>
|
|
<p>Test steps:</p>
|
|
<ol>
|
|
<li>Download <a href="support/upload.txt">upload.txt</a> to local.</li>
|
|
<li>Select the local upload.txt file to run the test.</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<form name="uploadData">
|
|
<input type="file" id="fileChooser">
|
|
</form>
|
|
|
|
<div id="log"></div>
|
|
|
|
<pre id="untested_idl" style="display: none">
|
|
interface ArrayBuffer {
|
|
};
|
|
|
|
interface ArrayBufferView {
|
|
};
|
|
|
|
interface URL {
|
|
};
|
|
|
|
interface EventTarget {
|
|
};
|
|
|
|
interface Event {
|
|
};
|
|
|
|
[TreatNonCallableAsNull]
|
|
callback EventHandlerNonNull = any (Event event);
|
|
typedef EventHandlerNonNull? EventHandler;
|
|
</pre>
|
|
|
|
<pre id="idl" style="display: none">
|
|
[Constructor,
|
|
Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options), Exposed=Window,Worker]
|
|
interface Blob {
|
|
|
|
readonly attribute unsigned long long size;
|
|
readonly attribute DOMString type;
|
|
readonly attribute boolean isClosed;
|
|
|
|
//slice Blob into byte-ranged chunks
|
|
|
|
Blob slice([Clamp] optional long long start,
|
|
[Clamp] optional long long end,
|
|
optional DOMString contentType);
|
|
void close();
|
|
|
|
};
|
|
|
|
dictionary BlobPropertyBag {
|
|
DOMString type = "";
|
|
};
|
|
|
|
[Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits,
|
|
[EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Window,Worker]
|
|
interface File : Blob {
|
|
|
|
readonly attribute DOMString name;
|
|
readonly attribute long long lastModified;
|
|
|
|
};
|
|
|
|
dictionary FilePropertyBag {
|
|
|
|
DOMString type = "";
|
|
long long lastModified;
|
|
|
|
};
|
|
|
|
[Exposed=Window,Worker] interface FileList {
|
|
getter File? item(unsigned long index);
|
|
readonly attribute unsigned long length;
|
|
};
|
|
|
|
[Constructor, Exposed=Window,Worker]
|
|
interface FileReader: EventTarget {
|
|
|
|
// async read methods
|
|
void readAsArrayBuffer(Blob blob);
|
|
void readAsText(Blob blob, optional DOMString label);
|
|
void readAsDataURL(Blob blob);
|
|
|
|
void abort();
|
|
|
|
// states
|
|
const unsigned short EMPTY = 0;
|
|
const unsigned short LOADING = 1;
|
|
const unsigned short DONE = 2;
|
|
|
|
readonly attribute unsigned short readyState;
|
|
|
|
// File or Blob data
|
|
readonly attribute (DOMString or ArrayBuffer)? result;
|
|
|
|
readonly attribute DOMError? error;
|
|
|
|
// event handler attributes
|
|
attribute EventHandler onloadstart;
|
|
attribute EventHandler onprogress;
|
|
attribute EventHandler onload;
|
|
attribute EventHandler onabort;
|
|
attribute EventHandler onerror;
|
|
attribute EventHandler onloadend;
|
|
|
|
};
|
|
|
|
[Constructor, Exposed=Worker]
|
|
interface FileReaderSync {
|
|
|
|
// Synchronously return strings
|
|
|
|
ArrayBuffer readAsArrayBuffer(Blob blob);
|
|
DOMString readAsText(Blob blob, optional DOMString label);
|
|
DOMString readAsDataURL(Blob blob);
|
|
};
|
|
|
|
partial interface URL {
|
|
|
|
static DOMString createObjectURL(Blob blob);
|
|
static DOMString createFor(Blob blob);
|
|
static void revokeObjectURL(DOMString url);
|
|
|
|
};
|
|
</pre>
|
|
|
|
<script>
|
|
var fileInput;
|
|
|
|
setup(function() {
|
|
fileInput = document.querySelector("#fileChooser")
|
|
}, {explicit_done: true, explicit_timeout: true});
|
|
|
|
on_event(fileInput, "change", function(evt) {
|
|
var idl_array = new IdlArray();
|
|
idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
|
|
idl_array.add_idls(document.getElementById("idl").textContent);
|
|
|
|
idl_array.add_objects({
|
|
FileList: [fileInput.files],
|
|
File: [fileInput.files[0]],
|
|
});
|
|
idl_array.test();
|
|
|
|
done();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|