Title: [277491] trunk
Revision
277491
Author
cdu...@apple.com
Date
2021-05-14 09:01:00 -0700 (Fri, 14 May 2021)

Log Message

Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
https://bugs.webkit.org/show_bug.cgi?id=225806

Reviewed by Alex Christensen.

Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.

Source/WebCore:

* Modules/entriesapi/FileSystemEntry.cpp:
(WebCore::FileSystemEntry::FileSystemEntry):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::attachmentForFilePath):
* fileapi/File.cpp:
(WebCore::File::computeNameAndContentType):
* fileapi/FileCocoa.mm:
(WebCore::File::computeNameAndContentTypeForReplacedFile):
* html/DirectoryFileListCreator.cpp:
(WebCore::gatherFileInformation):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles):

Source/WebKit:

* NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::origins const):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

Source/WebKitLegacy/win:

* Plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::fileExistsAndIsNotDisabled const):
* Plugins/PluginPackage.cpp:
(WebCore::PluginPackage::PluginPackage):
* WebDownloadCurl.cpp:
(WebDownload::didReceiveResponse):

Source/WTF:

* wtf/FileSystem.cpp:
(WTF::FileSystemImpl::pathFileName):
(WTF::FileSystemImpl::pathGetFileName): Deleted.
* wtf/FileSystem.h:

Tools:

* TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::TEST_F):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (277490 => 277491)


--- trunk/Source/WTF/ChangeLog	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WTF/ChangeLog	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1,3 +1,17 @@
+2021-05-14  Chris Dumez  <cdu...@apple.com>
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
+        https://bugs.webkit.org/show_bug.cgi?id=225806
+
+        Reviewed by Alex Christensen.
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.
+
+        * wtf/FileSystem.cpp:
+        (WTF::FileSystemImpl::pathFileName):
+        (WTF::FileSystemImpl::pathGetFileName): Deleted.
+        * wtf/FileSystem.h:
+
 2021-05-13  Dean Jackson  <d...@apple.com>
 
         [WebXR] Allow WebXR to be tested on PLATFORM(COCOA)

Modified: trunk/Source/WTF/wtf/FileSystem.cpp (277490 => 277491)


--- trunk/Source/WTF/wtf/FileSystem.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WTF/wtf/FileSystem.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -739,7 +739,7 @@
     return fileMetadataPotentiallyFollowingSymlinks(path, ShouldFollowSymbolicLinks::Yes);
 }
 
-String pathGetFileName(const String& path)
+String pathFileName(const String& path)
 {
     return fromStdFileSystemPath(toStdFileSystemPath(path).filename());
 }

Modified: trunk/Source/WTF/wtf/FileSystem.h (277490 => 277491)


--- trunk/Source/WTF/wtf/FileSystem.h	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WTF/wtf/FileSystem.h	2021-05-14 16:01:00 UTC (rev 277491)
@@ -124,7 +124,7 @@
 WTF_EXPORT_PRIVATE String lastComponentOfPathIgnoringTrailingSlash(const String& path);
 WTF_EXPORT_PRIVATE bool makeAllDirectories(const String& path);
 WTF_EXPORT_PRIVATE String homeDirectoryPath();
-WTF_EXPORT_PRIVATE String pathGetFileName(const String&);
+WTF_EXPORT_PRIVATE String pathFileName(const String&);
 WTF_EXPORT_PRIVATE String parentPath(const String&);
 WTF_EXPORT_PRIVATE bool getVolumeFreeSpace(const String&, uint64_t&);
 WTF_EXPORT_PRIVATE Optional<int32_t> getFileDeviceId(const CString&);

Modified: trunk/Source/WebCore/ChangeLog (277490 => 277491)


--- trunk/Source/WebCore/ChangeLog	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/ChangeLog	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1,3 +1,31 @@
+2021-05-14  Chris Dumez  <cdu...@apple.com>
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
+        https://bugs.webkit.org/show_bug.cgi?id=225806
+
+        Reviewed by Alex Christensen.
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.
+
+        * Modules/entriesapi/FileSystemEntry.cpp:
+        (WebCore::FileSystemEntry::FileSystemEntry):
+        * Modules/webdatabase/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
+        * editing/cocoa/WebContentReaderCocoa.mm:
+        (WebCore::attachmentForFilePath):
+        * fileapi/File.cpp:
+        (WebCore::File::computeNameAndContentType):
+        * fileapi/FileCocoa.mm:
+        (WebCore::File::computeNameAndContentTypeForReplacedFile):
+        * html/DirectoryFileListCreator.cpp:
+        (WebCore::gatherFileInformation):
+        * loader/appcache/ApplicationCacheStorage.cpp:
+        (WebCore::ApplicationCacheStorage::store):
+        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
+        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles):
+
 2021-05-13  Rob Buis  <rb...@igalia.com>
 
         Check for null element in paintSearchFieldResultsButton

Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp (277490 => 277491)


--- trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -44,7 +44,7 @@
 FileSystemEntry::FileSystemEntry(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
     : ActiveDOMObject(&context)
     , m_filesystem(filesystem)
-    , m_name(FileSystem::pathGetFileName(virtualPath))
+    , m_name(FileSystem::pathFileName(virtualPath))
     , m_virtualPath(virtualPath)
 {
     suspendIfNeeded();

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (277490 => 277491)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1213,7 +1213,7 @@
                             continue;
                         
                         // If this database has been deleted or if its database file no longer matches the current version, this database is no longer valid and it should be marked as deleted.
-                        if (databaseFileName.isNull() || databaseFileName != FileSystem::pathGetFileName(db->fileNameIsolatedCopy())) {
+                        if (databaseFileName.isNull() || databaseFileName != FileSystem::pathFileName(db->fileNameIsolatedCopy())) {
                             deletedDatabases.append(db);
                             foundDeletedDatabase = true;
                         }

Modified: trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm (277490 => 277491)


--- trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm	2021-05-14 16:01:00 UTC (rev 277491)
@@ -746,7 +746,7 @@
         return image;
     }
 
-    attachment->updateAttributes(WTFMove(fileSizeForDisplay), contentType, FileSystem::pathGetFileName(path));
+    attachment->updateAttributes(WTFMove(fileSizeForDisplay), contentType, FileSystem::pathFileName(path));
     return attachment;
 }
 

Modified: trunk/Source/WebCore/fileapi/File.cpp (277490 => 277491)


--- trunk/Source/WebCore/fileapi/File.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/fileapi/File.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -127,7 +127,7 @@
         return;
     }
 #endif
-    effectiveName = nameOverride.isEmpty() ? FileSystem::pathGetFileName(path) : nameOverride;
+    effectiveName = nameOverride.isEmpty() ? FileSystem::pathFileName(path) : nameOverride;
     size_t index = effectiveName.reverseFind('.');
     if (index != notFound) {
         callOnMainThreadAndWait([&effectiveContentType, &effectiveName, index] {

Modified: trunk/Source/WebCore/fileapi/FileCocoa.mm (277490 => 277491)


--- trunk/Source/WebCore/fileapi/FileCocoa.mm	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/fileapi/FileCocoa.mm	2021-05-14 16:01:00 UTC (rev 277491)
@@ -61,9 +61,9 @@
 
 void File::computeNameAndContentTypeForReplacedFile(const String& path, const String& nameOverride, String& effectiveName, String& effectiveContentType)
 {
-    ASSERT(!FileSystem::pathGetFileName(path).endsWith('/')); // Expecting to get a path without trailing slash, even for directories.
+    ASSERT(!FileSystem::pathFileName(path).endsWith('/')); // Expecting to get a path without trailing slash, even for directories.
     effectiveContentType = "application/zip"_s;
-    effectiveName = makeString((nameOverride.isNull() ? FileSystem::pathGetFileName(path) : nameOverride), ".zip"_s);
+    effectiveName = makeString((nameOverride.isNull() ? FileSystem::pathFileName(path) : nameOverride), ".zip"_s);
 }
 
 }

Modified: trunk/Source/WebCore/html/DirectoryFileListCreator.cpp (277490 => 277491)


--- trunk/Source/WebCore/html/DirectoryFileListCreator.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/html/DirectoryFileListCreator.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -77,7 +77,7 @@
     Vector<FileInformation> files;
     for (auto& info : paths) {
         if (FileSystem::isDirectory(info.path))
-            appendDirectoryFiles(info.path, FileSystem::pathGetFileName(info.path), files);
+            appendDirectoryFiles(info.path, FileSystem::pathFileName(info.path), files);
         else
             files.append(FileInformation { info.path, { }, info.displayName });
     }

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (277490 => 277491)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -788,7 +788,7 @@
 
     String fullPath;
     if (!resource->path().isEmpty())
-        dataStatement.bindText(2, FileSystem::pathGetFileName(resource->path()));
+        dataStatement.bindText(2, FileSystem::pathFileName(resource->path()));
     else if (shouldStoreResourceAsFlatFile(resource)) {
         // First, check to see if creating the flat file would violate the maximum total quota. We don't need
         // to check the per-origin quota here, as it was already checked in storeNewestCache().

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm (277490 => 277491)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm	2021-05-14 16:01:00 UTC (rev 277491)
@@ -406,7 +406,7 @@
         if (!tempDirectory)
             return;
 
-        auto tempStoragePath = FileSystem::pathByAppendingComponent(tempDirectory, FileSystem::pathGetFileName(storagePath));
+        auto tempStoragePath = FileSystem::pathByAppendingComponent(tempDirectory, FileSystem::pathFileName(storagePath));
         if (!FileSystem::moveFile(storageDirectory, tempStoragePath))
             return;
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (277490 => 277491)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -2209,7 +2209,7 @@
         return;
 
     auto templateDirectory = FileSystem::parentPath(downloadFilePrefixPath);
-    auto templatePrefix = FileSystem::pathGetFileName(downloadFilePrefixPath);
+    auto templatePrefix = FileSystem::pathFileName(downloadFilePrefixPath);
     for (auto& fileName : FileSystem::listDirectory(templateDirectory)) {
         if (!fileName.startsWith(templatePrefix))
             continue;

Modified: trunk/Source/WebKit/ChangeLog (277490 => 277491)


--- trunk/Source/WebKit/ChangeLog	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKit/ChangeLog	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1,3 +1,17 @@
+2021-05-14  Chris Dumez  <cdu...@apple.com>
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
+        https://bugs.webkit.org/show_bug.cgi?id=225806
+
+        Reviewed by Alex Christensen.
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.
+
+        * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
+        (WebKit::LocalStorageDatabaseTracker::origins const):
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
+
 2021-05-14  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.33.1 release

Modified: trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp (277490 => 277491)


--- trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -105,7 +105,7 @@
 {
     Vector<SecurityOriginData> databaseOrigins;
     for (auto& path : FileSystem::listDirectory(localStorageDirectory())) {
-        auto filename = FileSystem::pathGetFileName(path);
+        auto filename = FileSystem::pathFileName(path);
         auto originIdentifier = filename.substring(0, filename.length() - strlen(".localstorage"));
         auto origin = SecurityOriginData::fromDatabaseIdentifier(originIdentifier);
         if (origin)

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (277490 => 277491)


--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -269,7 +269,7 @@
     // Resolve directories for file paths.
     if (!m_configuration->cookieStorageFile().isEmpty()) {
         m_resolvedConfiguration->setCookieStorageFile(resolveAndCreateReadWriteDirectoryForSandboxExtension(FileSystem::parentPath(m_configuration->cookieStorageFile())));
-        m_resolvedConfiguration->setCookieStorageFile(FileSystem::pathByAppendingComponent(m_resolvedConfiguration->cookieStorageFile(), FileSystem::pathGetFileName(m_configuration->cookieStorageFile())));
+        m_resolvedConfiguration->setCookieStorageFile(FileSystem::pathByAppendingComponent(m_resolvedConfiguration->cookieStorageFile(), FileSystem::pathFileName(m_configuration->cookieStorageFile())));
     }
 }
 

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (277490 => 277491)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1,3 +1,19 @@
+2021-05-14  Chris Dumez  <cdu...@apple.com>
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
+        https://bugs.webkit.org/show_bug.cgi?id=225806
+
+        Reviewed by Alex Christensen.
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.
+
+        * Plugins/PluginDatabase.cpp:
+        (WebCore::PluginDatabase::fileExistsAndIsNotDisabled const):
+        * Plugins/PluginPackage.cpp:
+        (WebCore::PluginPackage::PluginPackage):
+        * WebDownloadCurl.cpp:
+        (WebDownload::didReceiveResponse):
+
 2021-05-13  Megan Gardner  <megan_gard...@apple.com>
 
         Add textIndicator bounce for AppHighlights on scroll.

Modified: trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp (277490 => 277491)


--- trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -309,7 +309,7 @@
 bool PluginDatabase::fileExistsAndIsNotDisabled(const String& filePath) const
 {
     // Skip plugin files that are disabled by filename.
-    if (m_disabledPluginFiles.contains(FileSystem::pathGetFileName(filePath)))
+    if (m_disabledPluginFiles.contains(FileSystem::pathFileName(filePath)))
         return false;
 
     return FileSystem::fileExists(filePath);

Modified: trunk/Source/WebKitLegacy/win/Plugins/PluginPackage.cpp (277490 => 277491)


--- trunk/Source/WebKitLegacy/win/Plugins/PluginPackage.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKitLegacy/win/Plugins/PluginPackage.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -120,7 +120,7 @@
     , m_infoIsFromCache(true)
 #endif
 {
-    m_fileName = FileSystem::pathGetFileName(m_path);
+    m_fileName = FileSystem::pathFileName(m_path);
     m_parentDirectory = m_path.left(m_path.length() - m_fileName.length() - 1);
 }
 

Modified: trunk/Source/WebKitLegacy/win/WebDownloadCurl.cpp (277490 => 277491)


--- trunk/Source/WebKitLegacy/win/WebDownloadCurl.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Source/WebKitLegacy/win/WebDownloadCurl.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -213,7 +213,7 @@
 
         String suggestedFilename = response.suggestedFilename();
         if (suggestedFilename.isEmpty())
-            suggestedFilename = FileSystem::pathGetFileName(response.url().string());
+            suggestedFilename = FileSystem::pathFileName(response.url().string());
         suggestedFilename = decodeURLEscapeSequences(suggestedFilename);
         BString suggestedFilenameBSTR(suggestedFilename);
         m_delegate->decideDestinationWithSuggestedFilename(this, suggestedFilenameBSTR);

Modified: trunk/Tools/ChangeLog (277490 => 277491)


--- trunk/Tools/ChangeLog	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Tools/ChangeLog	2021-05-14 16:01:00 UTC (rev 277491)
@@ -1,3 +1,15 @@
+2021-05-14  Chris Dumez  <cdu...@apple.com>
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName()
+        https://bugs.webkit.org/show_bug.cgi?id=225806
+
+        Reviewed by Alex Christensen.
+
+        Rename FileSystem::pathGetFileName() to FileSystem::pathFileName(), as we avoid "get" prefixes in WebKit.
+
+        * TestWebKitAPI/Tests/WTF/FileSystem.cpp:
+        (TestWebKitAPI::TEST_F):
+
 2021-05-14  Jonathan Bedard  <jbed...@apple.com>
 
         [webkitpy] Remove unused imports

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp (277490 => 277491)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp	2021-05-14 15:54:10 UTC (rev 277490)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp	2021-05-14 16:01:00 UTC (rev 277491)
@@ -740,25 +740,25 @@
     });
 }
 
-TEST_F(FileSystemTest, pathGetFileName)
+TEST_F(FileSystemTest, pathFileName)
 {
     auto testPath = FileSystem::pathByAppendingComponents(tempEmptyFolderPath(), { "subfolder", "filename.txt" });
-    EXPECT_STREQ("filename.txt", FileSystem::pathGetFileName(testPath).utf8().data());
+    EXPECT_STREQ("filename.txt", FileSystem::pathFileName(testPath).utf8().data());
 
 #if OS(UNIX)
-    EXPECT_STREQ(".", FileSystem::pathGetFileName(".").utf8().data());
-    EXPECT_STREQ("..", FileSystem::pathGetFileName("..").utf8().data());
-    EXPECT_STREQ("", FileSystem::pathGetFileName("/").utf8().data());
-    EXPECT_STREQ(".", FileSystem::pathGetFileName("/foo/.").utf8().data());
-    EXPECT_STREQ("..", FileSystem::pathGetFileName("/foo/..").utf8().data());
-    EXPECT_STREQ("", FileSystem::pathGetFileName("/foo/").utf8().data());
-    EXPECT_STREQ("host", FileSystem::pathGetFileName("//host").utf8().data());
+    EXPECT_STREQ(".", FileSystem::pathFileName(".").utf8().data());
+    EXPECT_STREQ("..", FileSystem::pathFileName("..").utf8().data());
+    EXPECT_STREQ("", FileSystem::pathFileName("/").utf8().data());
+    EXPECT_STREQ(".", FileSystem::pathFileName("/foo/.").utf8().data());
+    EXPECT_STREQ("..", FileSystem::pathFileName("/foo/..").utf8().data());
+    EXPECT_STREQ("", FileSystem::pathFileName("/foo/").utf8().data());
+    EXPECT_STREQ("host", FileSystem::pathFileName("//host").utf8().data());
 #endif
 #if OS(WINDOWS)
-    EXPECT_STREQ("", FileSystem::pathGetFileName("C:\\").utf8().data());
-    EXPECT_STREQ("foo", FileSystem::pathGetFileName("C:\\foo").utf8().data());
-    EXPECT_STREQ("", FileSystem::pathGetFileName("C:\\foo\\").utf8().data());
-    EXPECT_STREQ("bar.txt", FileSystem::pathGetFileName("C:\\foo\\bar.txt").utf8().data());
+    EXPECT_STREQ("", FileSystem::pathFileName("C:\\").utf8().data());
+    EXPECT_STREQ("foo", FileSystem::pathFileName("C:\\foo").utf8().data());
+    EXPECT_STREQ("", FileSystem::pathFileName("C:\\foo\\").utf8().data());
+    EXPECT_STREQ("bar.txt", FileSystem::pathFileName("C:\\foo\\bar.txt").utf8().data());
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to