Diff
Modified: trunk/LayoutTests/ChangeLog (216170 => 216171)
--- trunk/LayoutTests/ChangeLog 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/LayoutTests/ChangeLog 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1,3 +1,14 @@
+2017-05-03 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove all statistics for modifiedSince website data removals
+ https://bugs.webkit.org/show_bug.cgi?id=171584
+ <rdar://problem/24702576>
+
+ Reviewed by Brent Fulgham.
+
+ * http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt: Added.
+ * http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html: Added.
+
2017-05-03 Joanmarie Diggs <[email protected]>
AX: aria-rowspan value should be ignored if td/th rowspan value is provided
Added: trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt (0 => 216171)
--- trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt 2017-05-04 04:16:39 UTC (rev 216171)
@@ -0,0 +1,9 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - didReceiveTitle: Test Cleared Store
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+PASS Host classified as prevalent resource.
+PASS Host is no longer a prevalent resource after the store was cleared.
+
Added: trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html (0 => 216171)
--- trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html (rev 0)
+++ trunk/LayoutTests/http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html 2017-05-04 04:16:39 UTC (rev 216171)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Test Cleared Store</title>
+ <script src=""
+</head>
+<body>
+<script>
+ const hostUnderTest = "127.0.0.1:8000";
+ const statisticsUrl = "http://" + hostUnderTest + "/temp";
+ const topFrameOrigin1 = "http://127.0.0.2:8000/temp";
+ const topFrameOrigin2 = "http://127.0.0.3:8000/temp";
+ const topFrameOrigin3 = "http://127.0.0.4:8000/temp";
+ function runTestRunnerTest() {
+ testRunner.setStatisticsPrevalentResource(statisticsUrl, false);
+ if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
+ testFailed("Host did not get set as non-prevalent resource.");
+
+ testRunner.setStatisticsSubframeUnderTopFrameOrigin(statisticsUrl, topFrameOrigin1);
+ testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin1);
+ testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin1);
+ testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin2);
+ testRunner.setStatisticsSubframeUnderTopFrameOrigin(statisticsUrl, topFrameOrigin2);
+ testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin3);
+ testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin3);
+
+ testRunner.statisticsFireDataModificationHandler();
+
+ if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
+ testPassed("Host classified as prevalent resource.");
+ else
+ testFailed("Host did not get classified as prevalent resource.");
+
+ testRunner.statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(1);
+
+ if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
+ testFailed("Host is still a prevalent resource after the store was cleared.");
+ else
+ testPassed("Host is no longer a prevalent resource after the store was cleared.");
+
+ testRunner.statisticsResetToConsistentState();
+ internals.setResourceLoadStatisticsEnabled(false);
+ testRunner.notifyDone();
+ }
+
+ if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
+ testRunner.waitUntilDone();
+ internals.setResourceLoadStatisticsEnabled(true);
+ runTestRunnerTest();
+ }
+</script>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (216170 => 216171)
--- trunk/Source/WebCore/ChangeLog 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebCore/ChangeLog 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1,3 +1,17 @@
+2017-05-03 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove all statistics for modifiedSince website data removals
+ https://bugs.webkit.org/show_bug.cgi?id=171584
+ <rdar://problem/24702576>
+
+ Reviewed by Brent Fulgham.
+
+ Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html
+
+ * loader/ResourceLoadObserver.cpp:
+ (WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):
+ Now clears all regardless of the modifiedSince parameter's value.
+
2017-05-03 Andy Estes <[email protected]>
Try to fix the macOS Public SDK build
Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (216170 => 216171)
--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -76,9 +76,9 @@
void ResourceLoadObserver::clearInMemoryAndPersistentStore(std::chrono::system_clock::time_point modifiedSince)
{
- auto then = std::chrono::system_clock::to_time_t(modifiedSince);
- if (then <= 0)
- clearInMemoryAndPersistentStore();
+ // For now, be conservative and clear everything regardless of modifiedSince
+ UNUSED_PARAM(modifiedSince);
+ clearInMemoryAndPersistentStore();
}
static inline bool is3xxRedirect(const ResourceResponse& response)
Modified: trunk/Source/WebKit2/ChangeLog (216170 => 216171)
--- trunk/Source/WebKit2/ChangeLog 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1,3 +1,20 @@
+2017-05-03 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove all statistics for modifiedSince website data removals
+ https://bugs.webkit.org/show_bug.cgi?id=171584
+ <rdar://problem/24702576>
+
+ Reviewed by Brent Fulgham.
+
+ These are all test infrastructure changes.
+
+ * UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
+ (WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):
+ * UIProcess/API/C/WKResourceLoadStatisticsManager.h:
+ * UIProcess/WebResourceLoadStatisticsManager.cpp:
+ (WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):
+ * UIProcess/WebResourceLoadStatisticsManager.h:
+
2017-05-03 Timothy Horton <[email protected]>
Maintain interaction information imageURL as a URL, not a string
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.cpp (216170 => 216171)
--- trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -116,6 +116,11 @@
WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore();
}
+void WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours)
+{
+ WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours(hours);
+}
+
void WKResourceLoadStatisticsManagerResetToConsistentState()
{
WebResourceLoadStatisticsManager::resetToConsistentState();
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h (216170 => 216171)
--- trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKResourceLoadStatisticsManager.h 2017-05-04 04:16:39 UTC (rev 216171)
@@ -49,6 +49,7 @@
WK_EXPORT void WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval(bool value);
WK_EXPORT void WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval(double seconds);
WK_EXPORT void WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore();
+ WK_EXPORT void WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned);
WK_EXPORT void WKResourceLoadStatisticsManagerResetToConsistentState();
#ifdef __cplusplus
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.cpp (216170 => 216171)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -124,6 +124,11 @@
WebCore::ResourceLoadObserver::sharedObserver().clearInMemoryAndPersistentStore();
}
+void WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours)
+{
+ WebCore::ResourceLoadObserver::sharedObserver().clearInMemoryAndPersistentStore(std::chrono::system_clock::now() - std::chrono::hours(hours));
+}
+
void WebResourceLoadStatisticsManager::resetToConsistentState()
{
WebCore::ResourceLoadObserver::sharedObserver().setTimeToLiveUserInteraction(2592000);
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.h (216170 => 216171)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.h 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsManager.h 2017-05-04 04:16:39 UTC (rev 216171)
@@ -55,6 +55,7 @@
static void setShouldClassifyResourcesBeforeDataRecordsRemoval(bool value);
static void setMinimumTimeBetweeenDataRecordsRemoval(double seconds);
static void clearInMemoryAndPersistentStore();
+ static void clearInMemoryAndPersistentStoreModifiedSinceHours(unsigned);
static void resetToConsistentState();
private:
Modified: trunk/Tools/ChangeLog (216170 => 216171)
--- trunk/Tools/ChangeLog 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/ChangeLog 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1,3 +1,23 @@
+2017-05-03 John Wilander <[email protected]>
+
+ Resource Load Statistics: Remove all statistics for modifiedSince website data removals
+ https://bugs.webkit.org/show_bug.cgi?id=171584
+ <rdar://problem/24702576>
+
+ Reviewed by Brent Fulgham.
+
+ New function to call the clear function that takes a modifiedSince parameter.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+
2017-05-03 Commit Queue <[email protected]>
Unreviewed, rolling out r216160 and r216161.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-05-04 04:16:39 UTC (rev 216171)
@@ -266,6 +266,7 @@
void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(boolean value);
void setStatisticsMinimumTimeBetweeenDataRecordsRemoval(double seconds);
void statisticsClearInMemoryAndPersistentStore();
+ void statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned long hours);
void statisticsResetToConsistentState();
// Open panel
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1398,7 +1398,14 @@
WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsClearInMemoryAndPersistentStore"));
WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), 0, nullptr);
}
-
+
+void TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsClearInMemoryAndPersistentStoreModifiedSinceHours"));
+ WKRetainPtr<WKTypeRef> messageBody(AdoptWK, WKUInt64Create(hours));
+ WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
+}
+
void TestRunner::statisticsResetToConsistentState()
{
WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("StatisticsResetToConsistentState"));
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-05-04 04:16:39 UTC (rev 216171)
@@ -364,6 +364,7 @@
void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(bool);
void setStatisticsMinimumTimeBetweeenDataRecordsRemoval(double);
void statisticsClearInMemoryAndPersistentStore();
+ void statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours);
void statisticsResetToConsistentState();
// Open panel
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -2268,6 +2268,11 @@
WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore();
}
+void TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned hours)
+{
+ WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours(hours);
+}
+
void TestController::statisticsResetToConsistentState()
{
WKResourceLoadStatisticsManagerResetToConsistentState();
Modified: trunk/Tools/WebKitTestRunner/TestController.h (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/TestController.h 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2017-05-04 04:16:39 UTC (rev 216171)
@@ -165,6 +165,7 @@
void setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(bool);
void setStatisticsMinimumTimeBetweeenDataRecordsRemoval(double);
void statisticsClearInMemoryAndPersistentStore();
+ void statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(unsigned);
void statisticsResetToConsistentState();
WKArrayRef openPanelFileURLs() const { return m_openPanelFileURLs.get(); }
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (216170 => 216171)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2017-05-04 03:08:40 UTC (rev 216170)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2017-05-04 04:16:39 UTC (rev 216171)
@@ -1059,6 +1059,13 @@
return nullptr;
}
+ if (WKStringIsEqualToUTF8CString(messageName, "StatisticsClearInMemoryAndPersistentStoreModifiedSinceHours")) {
+ ASSERT(WKGetTypeID(messageBody) == WKUInt64GetTypeID());
+ WKUInt64Ref hours = static_cast<WKUInt64Ref>(messageBody);
+ TestController::singleton().statisticsClearInMemoryAndPersistentStoreModifiedSinceHours(WKUInt64GetValue(hours));
+ return nullptr;
+ }
+
if (WKStringIsEqualToUTF8CString(messageName, "StatisticsResetToConsistentState")) {
TestController::singleton().statisticsResetToConsistentState();
return nullptr;