Title: [203436] trunk/Tools
Revision
203436
Author
[email protected]
Date
2016-07-19 17:29:21 -0700 (Tue, 19 Jul 2016)

Log Message

Fix API test after r203426.
https://bugs.webkit.org/show_bug.cgi?id=159949

* TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
(TEST):
If there is website data already on disk, the initial count after putting the AppCache data in place will not be exactly 1.
This is no problem.  We want to verify that it is a nonzero number and that it decrements by one when we remove the 1 AppCache data.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (203435 => 203436)


--- trunk/Tools/ChangeLog	2016-07-20 00:09:52 UTC (rev 203435)
+++ trunk/Tools/ChangeLog	2016-07-20 00:29:21 UTC (rev 203436)
@@ -1,3 +1,13 @@
+2016-07-19  Alex Christensen  <[email protected]>
+
+        Fix API test after r203426.
+        https://bugs.webkit.org/show_bug.cgi?id=159949
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
+        (TEST):
+        If there is website data already on disk, the initial count after putting the AppCache data in place will not be exactly 1.
+        This is no problem.  We want to verify that it is a nonzero number and that it decrements by one when we remove the 1 AppCache data.
+
 2016-07-19  Andy Estes  <[email protected]>
 
         Move WebKitErrorFrameLoadBlockedByContentFilter from WebKitErrors.h to WebKitErrorsPrivate.h

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm (203435 => 203436)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm	2016-07-20 00:09:52 UTC (rev 203435)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm	2016-07-20 00:29:21 UTC (rev 203436)
@@ -147,11 +147,14 @@
     EXPECT_GT(fileSize(shmTargetURL), 0);
     EXPECT_GT(fileSize(walTargetURL), 0);
 
+    static size_t originalWebsiteDataRecordCount;
+
     // Make sure there is a record in the WKWebsiteDataStore.
     readyToContinue = false;
     [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords)
     {
-        EXPECT_EQ(websiteDataRecords.count, 1ul);
+        EXPECT_GT(websiteDataRecords.count, 0ul);
+        originalWebsiteDataRecordCount = websiteDataRecords.count;
         readyToContinue = true;
     }];
     TestWebKitAPI::Util::run(&readyToContinue);
@@ -166,7 +169,7 @@
         EXPECT_EQ(fileSize(walTargetURL), 0);
         [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords)
         {
-            EXPECT_EQ(websiteDataRecords.count, 0ul);
+            EXPECT_EQ(websiteDataRecords.count, originalWebsiteDataRecordCount - 1);
             readyToContinue = true;
         }];
     }];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to