Title: [287723] trunk/Tools
Revision
287723
Author
[email protected]
Date
2022-01-06 15:42:36 -0800 (Thu, 06 Jan 2022)

Log Message

[GLIB] Make API test initialize localstorage to ensure the database file is created
https://bugs.webkit.org/show_bug.cgi?id=234891

Reviewed by Michael Catanzaro.

Changes needed after 245553@main/r287418 changed the localstorage
behavior to avoid creating an empty database file when reading empty
databases.

* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (287722 => 287723)


--- trunk/Tools/ChangeLog	2022-01-06 23:42:24 UTC (rev 287722)
+++ trunk/Tools/ChangeLog	2022-01-06 23:42:36 UTC (rev 287723)
@@ -1,3 +1,17 @@
+2022-01-06  Lauro Moura  <[email protected]>
+
+        [GLIB] Make API test initialize localstorage to ensure the database file is created
+        https://bugs.webkit.org/show_bug.cgi?id=234891
+
+        Reviewed by Michael Catanzaro.
+
+        Changes needed after 245553@main/r287418 changed the localstorage
+        behavior to avoid creating an empty database file when reading empty
+        databases.
+
+        * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
+        (testWebsiteDataConfiguration):
+
 2022-01-04  Jonathan Bedard  <[email protected]>
 
         [EWS] Support pull-requests in ConfigureBuild

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp (287722 => 287723)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp	2022-01-06 23:42:24 UTC (rev 287722)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp	2022-01-06 23:42:36 UTC (rev 287723)
@@ -168,11 +168,12 @@
 
     test->loadURI(kServer->getURIForPath("/empty").data());
     test->waitUntilLoadFinished();
-    test->runJavaScriptAndWaitUntilFinished("window.localStorage.clear();", nullptr);
+    test->runJavaScriptAndWaitUntilFinished("window.localStorage.myproperty = 42;", nullptr);
     GUniquePtr<char> localStorageDirectory(g_build_filename(Test::dataDirectory(), "local-storage", nullptr));
     g_assert_cmpstr(localStorageDirectory.get(), ==, webkit_website_data_manager_get_local_storage_directory(test->m_manager));
     test->assertFileIsCreated(localStorageDirectory.get());
     g_assert_true(g_file_test(localStorageDirectory.get(), G_FILE_TEST_IS_DIR));
+    test->runJavaScriptAndWaitUntilFinished("window.localStorage.clear();", nullptr);
 
     test->loadURI(kServer->getURIForPath("/empty").data());
     test->waitUntilLoadFinished();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to