tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

filesystemdirectoryentry-attributes-manual.html (1639B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <title>Entries API: FileSystemDirectoryEntry attributes manual test</title>
      4 <link rel=help href="https://wicg.github.io/entries-api/#api-directoryentry">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="support.js"></script>
      8 
      9 <script>
     10 entry_test((t, entry) => {
     11  assert_idl_attribute(entry, 'isFile', 'FileSystemDirectoryEntry has isFile attribute');
     12  assert_equals(typeof entry.isFile, 'boolean', 'isFile is boolean');
     13 
     14  assert_idl_attribute(entry, 'isDirectory', 'FileSystemDirectoryEntry has isDirectory attribute');
     15  assert_equals(typeof entry.isDirectory, 'boolean', 'isDirectory is boolean');
     16 
     17  assert_idl_attribute(entry, 'name', 'FileSystemDirectoryEntry has name attribute');
     18  assert_equals(typeof entry.name, 'string', 'name is a string');
     19 
     20  assert_idl_attribute(entry, 'fullPath', 'FileSystemDirectoryEntry has fullPath attribute');
     21  assert_equals(typeof entry.fullPath, 'string', 'fullPath is a string');
     22 
     23  assert_idl_attribute(entry, 'filesystem', 'FileSystemDirectoryEntry has filesystem attribute');
     24  assert_equals(typeof entry.filesystem, 'object', 'filesystem is an object');
     25 
     26  t.done();
     27 }, 'FileSystemDirectoryEntry - attribute types');
     28 
     29 entry_test((t, entry) => {
     30  assert_false(entry.isFile, 'isFile is false');
     31  assert_true(entry.isDirectory, 'isDirectory is true');
     32  assert_equals(entry.name, 'upload', 'expected directory was uploaded');
     33  assert_equals(entry.fullPath, '/upload', 'directory is child of root directory');
     34  t.done();
     35 }, 'FileSystemDirectoryEntry - attribute values');
     36 
     37 </script>