[Win] listDirectory in FileSystemWin.cpp should not skip all directories
authorchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2018 02:16:18 +0000 (02:16 +0000)
committerchris.reid@sony.com <chris.reid@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2018 02:16:18 +0000 (02:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192042

Reviewed by Fujii Hironori.

Source/WebCore:

Covered by existing tests.

listDirectory is not returning any child directories which is causing
ASSERT(diskUsage >= databaseFileSize) in SQLiteIDBBackingStore.cpp to fail.

Change listDirectory in FileSystemWin to match FileSystemPOSIX's behavior.
listDirectory should only skip the current and previous directories.

* platform/win/FileSystemWin.cpp:

LayoutTests:

Enable storage tests on WinCairo and adding initial test expectations.

* platform/wincairo/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238723 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/wincairo/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/win/FileSystemWin.cpp

index 89175e3..1584d32 100644 (file)
@@ -1,3 +1,14 @@
+2018-11-29  Christopher Reid  <chris.reid@sony.com>
+
+        [Win] listDirectory in FileSystemWin.cpp should not skip all directories
+        https://bugs.webkit.org/show_bug.cgi?id=192042
+
+        Reviewed by Fujii Hironori.
+
+        Enable storage tests on WinCairo and adding initial test expectations.
+
+        * platform/wincairo/TestExpectations:
+
 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r238680.
index 3a414c3..a6e4724 100644 (file)
@@ -1697,6 +1697,62 @@ editing/undo/undo-deleteWord.html [ Pass Failure ]
 ###########################   End Editing Failures   ###########################
 ################################################################################
 
+################################################################################
+######################        Storage Issues              ######################
+################################################################################
+
+# TODO These tests failures need to be investigated
+
+# Text diff failures
+storage/domstorage/localstorage/blocked-file-access.html [ Failure ]
+storage/indexeddb/modern/date-basic-private.html [ Failure ]
+storage/indexeddb/modern/date-basic.html [ Failure ]
+storage/indexeddb/modern/get-keyrange-private.html [ Failure ]
+storage/indexeddb/modern/get-keyrange.html [ Failure ]
+storage/indexeddb/modern/idbobjectstore-delete-1-private.html [ Failure ]
+storage/indexeddb/modern/idbobjectstore-delete-1.html [ Failure ]
+storage/indexeddb/wasm-exceptions.html [ Failure ]
+
+# TODO Exclude WebSQL tests:
+webkit.org/b/116559 storage/websql/ [ Skip ]
+
+# Crashing indexeddb tests
+storage/indexeddb/modern/autoincrement-abort.html [ Crash Pass ]
+storage/indexeddb/modern/multiple-objectstore-index-cursor-collision.html [ Crash Pass ]
+storage/indexeddb/modern/objectstore-cursor-advance-failures-private.html [ Crash Pass ]
+storage/indexeddb/invalid-keys.html [ Crash Pass ]
+storage/indexeddb/modern/idbobjectstore-get-failures.html [ Crash Pass ]
+storage/indexeddb/modern/workers-disabled.html [ Crash Pass ]
+storage/indexeddb/modern/workers-enable.html [ Crash  Pass ]
+[ Debug ] storage/indexeddb/key-type-array-private.html [ Crash ]
+[ Debug ] storage/indexeddb/key-type-array.html [ Crash ]
+
+# Flaky timeouts
+storage/indexeddb/clone-exception.html [ Timeout Pass ]
+storage/indexeddb/modern/objectstore-rename-1.html [ Timeout Pass ]
+storage/websql/open-database-creation-callback.html [ Timeout Pass ]
+storage/websql/statement-error-callback.html [ Timeout Pass ]
+storage/websql/transaction-error-callback-isolated-world.html [ Timeout Pass ]
+storage/indexeddb/modern/aborted-put.html [ Timeout Pass ]
+
+# Flaky tests
+storage/indexeddb/modern/leak-1.html [ Skip ]
+storage/indexeddb/modern/index-rename-1.html [ Skip ]
+storage/indexeddb/objectstore-basics.html [ Skip ]
+storage/indexeddb/objectstore-basics-workers.html [ Skip ]
+storage/indexeddb/modern/idbtransaction-objectstore-failures.html [ Skip ]
+storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html [ Skip ]
+storage/indexeddb/metadata.html [ Skip ]
+storage/indexeddb/database-odd-names.html [ Skip ]
+storage/indexeddb/lazy-index-population.html [ Skip ]
+storage/indexeddb/transaction-basics.html [ Skip ]
+storage/indexeddb/intversion-revert-on-abort.html [ Skip ]
+storage/indexeddb/version-change-abort.html [ Skip ]
+
+################################################################################
+###########################   End Storage Issuess   ############################
+################################################################################
+
 #//////////////////////////////////////////////////////////////////////////////////////////
 # TEMPORARY SKIPS -- these areas still need to be addressed individually
 #//////////////////////////////////////////////////////////////////////////////////////////
@@ -1785,7 +1841,6 @@ scrollbars [ Skip ]
 scrollingcoordinator [ Skip ]
 security [ Skip ]
 sputnik [ Skip ]
-storage [ Skip ]
 svg [ Skip ]
 tables [ Skip ]
 transitions [ Skip ]
index efbf818..7bd99f3 100644 (file)
@@ -1,3 +1,20 @@
+2018-11-29  Christopher Reid  <chris.reid@sony.com>
+
+        [Win] listDirectory in FileSystemWin.cpp should not skip all directories
+        https://bugs.webkit.org/show_bug.cgi?id=192042
+
+        Reviewed by Fujii Hironori.
+
+        Covered by existing tests.
+
+        listDirectory is not returning any child directories which is causing
+        ASSERT(diskUsage >= databaseFileSize) in SQLiteIDBBackingStore.cpp to fail.
+
+        Change listDirectory in FileSystemWin to match FileSystemPOSIX's behavior.
+        listDirectory should only skip the current and previous directories.
+
+        * platform/win/FileSystemWin.cpp:
+
 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r238713.
index 78d56e7..49fa144 100644 (file)
@@ -523,7 +523,8 @@ Vector<String> listDirectory(const String& directory, const String& filter)
         return entries;
 
     do {
-        if (walker.data().dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+        if (walker.data().dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY
+            && (!wcscmp(walker.data().cFileName, L".") || !wcscmp(walker.data().cFileName, L"..")))
             continue;
 
         entries.append(directory + "\\" + reinterpret_cast<const UChar*>(walker.data().cFileName));