⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203436 in webkit


Ignore:
Timestamp:
Jul 19, 2016, 5:29:21 PM (10 years ago)
Author:
achristensen@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r203435 r203436  
     12016-07-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix API test after r203426.
     4        https://bugs.webkit.org/show_bug.cgi?id=159949
     5
     6        * TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
     7        (TEST):
     8        If there is website data already on disk, the initial count after putting the AppCache data in place will not be exactly 1.
     9        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.
     10
    1112016-07-19  Andy Estes  <aestes@apple.com>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm

    r203429 r203436  
    148148    EXPECT_GT(fileSize(walTargetURL), 0);
    149149
     150    static size_t originalWebsiteDataRecordCount;
     151
    150152    // Make sure there is a record in the WKWebsiteDataStore.
    151153    readyToContinue = false;
    152154    [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords)
    153155    {
    154         EXPECT_EQ(websiteDataRecords.count, 1ul);
     156        EXPECT_GT(websiteDataRecords.count, 0ul);
     157        originalWebsiteDataRecordCount = websiteDataRecords.count;
    155158        readyToContinue = true;
    156159    }];
     
    167170        [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords)
    168171        {
    169             EXPECT_EQ(websiteDataRecords.count, 0ul);
     172            EXPECT_EQ(websiteDataRecords.count, originalWebsiteDataRecordCount - 1);
    170173            readyToContinue = true;
    171174        }];
Note: See TracChangeset for help on using the changeset viewer.