filesystementry-getParent-manual.html (1113B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <title>Entries API: FileSystemEntry getParent() manual test</title> 4 <link rel=help href="https://wicg.github.io/entries-api/#dom-filesystementry-getparentapi-entry"> 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, 'getParent', 'FileSystemEntry has getParent method'); 12 assert_equals(typeof entry.getParent, 'function', 'FileSystemEntry has a getParent() method'); 13 14 assert_equals(entry.getParent(), void 0, 'getParent() arguments are optional'); 15 16 entry.getParent(t.step_func(parent => { 17 assert_true(parent.isDirectory, 'parent should be a directory'); 18 19 assert_equals(parent.fullPath, '/', 'parent should be root'); 20 assert_equals(parent.name, '', 'root name is empty string'); 21 22 t.done(); 23 }), t.unreached_func('getParent() should not fail')); 24 }, 'FileSystemEntry - getParent()'); 25 26 // TODO: Manual test for getParent() where containing directory is removed before getParent() is called. 27 </script>