<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203426] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203426">203426</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-07-19 15:51:13 -0700 (Tue, 19 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add regression test for <a href="http://trac.webkit.org/projects/webkit/changeset/203392">r203392</a>
https://bugs.webkit.org/show_bug.cgi?id=159949
Reviewed by Brady Eidson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
(TEST):
(fileSize):
(swizzledBundleIdentifierMobileSafari):
(swizzledBundleIdentifierWebBookmarksD):
(defaultApplicationCacheDirectory):
* TestWebKitAPI/cocoa/InstanceMethodSwizzler.h: Copied from TestWebKitAPI/mac/InstanceMethodSwizzler.h.
* TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm: Copied from TestWebKitAPI/mac/InstanceMethodSwizzler.mm.
* TestWebKitAPI/mac/InstanceMethodSwizzler.h: Removed.
* TestWebKitAPI/mac/InstanceMethodSwizzler.mm: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaLocalStorageClearmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedb">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedbshm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedbwal">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaInstanceMethodSwizzlerh">trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaInstanceMethodSwizzlermm">trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPImacInstanceMethodSwizzlerh">trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.h</a></li>
<li><a href="#trunkToolsTestWebKitAPImacInstanceMethodSwizzlermm">trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (203425 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-07-19 22:50:10 UTC (rev 203425)
+++ trunk/Tools/ChangeLog        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-07-19 Alex Christensen <achristensen@webkit.org>
+
+ Add regression test for r203392
+ https://bugs.webkit.org/show_bug.cgi?id=159949
+
+ Reviewed by Brady Eidson.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db: Added.
+ * TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm: Added.
+ * TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal: Added.
+ * TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
+ (TEST):
+ (fileSize):
+ (swizzledBundleIdentifierMobileSafari):
+ (swizzledBundleIdentifierWebBookmarksD):
+ (defaultApplicationCacheDirectory):
+ * TestWebKitAPI/cocoa/InstanceMethodSwizzler.h: Copied from TestWebKitAPI/mac/InstanceMethodSwizzler.h.
+ * TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm: Copied from TestWebKitAPI/mac/InstanceMethodSwizzler.mm.
+ * TestWebKitAPI/mac/InstanceMethodSwizzler.h: Removed.
+ * TestWebKitAPI/mac/InstanceMethodSwizzler.mm: Removed.
+
</ins><span class="cx"> 2016-07-19 Keith Miller <keith_miller@apple.com>
</span><span class="cx">
</span><span class="cx"> Test262 should have a file with the revision and url
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (203425 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-07-19 22:50:10 UTC (rev 203425)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -107,6 +107,10 @@
</span><span class="cx">                 5714ECBD1CA8C22A00051AC8 /* DownloadRequestOriginalURL2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5714ECBC1CA8C21800051AC8 /* DownloadRequestOriginalURL2.html */; };
</span><span class="cx">                 57901FB11CAF142D00ED64F9 /* LoadInvalidURLRequest.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57901FB01CAF141C00ED64F9 /* LoadInvalidURLRequest.html */; };
</span><span class="cx">                 57F56A5C1C7F8CC100F31D7E /* IsNavigationActionTrusted.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57F56A5B1C7F8A4000F31D7E /* IsNavigationActionTrusted.html */; };
</span><ins>+                5C726D6F1D3EE06E00C5E1A1 /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */; };
+                5C9E59411D3EB5AC00E3C62E /* ApplicationCache.db in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E593E1D3EB1DE00E3C62E /* ApplicationCache.db */; };
+                5C9E59421D3EB5AC00E3C62E /* ApplicationCache.db-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */; };
+                5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */; };
</ins><span class="cx">                 764322D71B61CCC30024F801 /* WordBoundaryTypingAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 764322D51B61CCA40024F801 /* WordBoundaryTypingAttributes.mm */; };
</span><span class="cx">                 7673499D1930C5BB00E44DF9 /* StopLoadingDuringDidFailProvisionalLoad_bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7673499A1930182E00E44DF9 /* StopLoadingDuringDidFailProvisionalLoad_bundle.cpp */; };
</span><span class="cx">                 76E182DD1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */; };
</span><span class="lines">@@ -203,7 +207,6 @@
</span><span class="cx">                 7CCB4DA91C83AE7300CC6918 /* PageGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CCB4DA71C83AE7300CC6918 /* PageGroup.cpp */; };
</span><span class="cx">                 7CCB99211D3B41F6003922F6 /* UserInitiatedActionInNavigationAction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CCB99201D3B41F6003922F6 /* UserInitiatedActionInNavigationAction.mm */; };
</span><span class="cx">                 7CCB99231D3B4A46003922F6 /* open-multiple-external-url.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7CCB99221D3B44E7003922F6 /* open-multiple-external-url.html */; };
</span><del>-                7CCE7EA41A4119F300447C4C /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = C08587FF13FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm */; };
</del><span class="cx">                 7CCE7EA51A411A0800447C4C /* JavaScriptTestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C081224013FC172400DC39AE /* JavaScriptTestMac.mm */; };
</span><span class="cx">                 7CCE7EA61A411A0F00447C4C /* PlatformUtilitiesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */; };
</span><span class="cx">                 7CCE7EA71A411A1300447C4C /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC90955C125548AA00083756 /* PlatformWebViewMac.mm */; };
</span><span class="lines">@@ -488,6 +491,9 @@
</span><span class="cx">                         dstPath = TestWebKitAPI.resources;
</span><span class="cx">                         dstSubfolderSpec = 7;
</span><span class="cx">                         files = (
</span><ins>+                                5C9E59411D3EB5AC00E3C62E /* ApplicationCache.db in Copy Resources */,
+                                5C9E59421D3EB5AC00E3C62E /* ApplicationCache.db-shm in Copy Resources */,
+                                5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */,
</ins><span class="cx">                                 7CCB99231D3B4A46003922F6 /* open-multiple-external-url.html in Copy Resources */,
</span><span class="cx">                                 932AE53D1D371047005DFFAF /* focus-inputs.html in Copy Resources */,
</span><span class="cx">                                 46C519E61D3563FD00DAA51A /* LocalStorageNullEntries.html in Copy Resources */,
</span><span class="lines">@@ -783,6 +789,11 @@
</span><span class="cx">                 57F10D921C7E7B3800ECDF30 /* IsNavigationActionTrusted.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IsNavigationActionTrusted.mm; sourceTree = "<group>"; };
</span><span class="cx">                 57F56A5B1C7F8A4000F31D7E /* IsNavigationActionTrusted.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = IsNavigationActionTrusted.html; sourceTree = "<group>"; };
</span><span class="cx">                 5C5E633D1D0B67940085A025 /* UniqueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueRef.cpp; sourceTree = "<group>"; };
</span><ins>+                5C726D6D1D3EE06800C5E1A1 /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstanceMethodSwizzler.h; path = cocoa/InstanceMethodSwizzler.h; sourceTree = "<group>"; };
+                5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InstanceMethodSwizzler.mm; path = cocoa/InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
+                5C9E593E1D3EB1DE00E3C62E /* ApplicationCache.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = ApplicationCache.db; sourceTree = "<group>"; };
+                5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-shm"; sourceTree = "<group>"; };
+                5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-wal"; sourceTree = "<group>"; };
</ins><span class="cx">                 7560917719259C59009EF06E /* MemoryCacheAddImageToCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryCacheAddImageToCacheIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 75F3133F18C171B70041CAEC /* EphemeralSessionPushStateNoHistoryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EphemeralSessionPushStateNoHistoryCallback.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 764322D51B61CCA40024F801 /* WordBoundaryTypingAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WordBoundaryTypingAttributes.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -974,8 +985,6 @@
</span><span class="cx">                 C08587BD13FE956C001EF4E5 /* WebKitAgnosticTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitAgnosticTest.mm; sourceTree = "<group>"; };
</span><span class="cx">                 C08587BE13FE956C001EF4E5 /* WebKitAgnosticTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAgnosticTest.h; sourceTree = "<group>"; };
</span><span class="cx">                 C08587FB13FEC39B001EF4E5 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
</span><del>-                C08587FE13FEC3A6001EF4E5 /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstanceMethodSwizzler.h; sourceTree = "<group>"; };
-                C08587FF13FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
</del><span class="cx">                 C0991C50143C7D68007998F2 /* RetainPtrHashing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RetainPtrHashing.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 C0ADBE7A12FCA4D000D2C129 /* JavaScriptTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptTest.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 C0ADBE7B12FCA4D000D2C129 /* JavaScriptTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptTest.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -1146,6 +1155,8 @@
</span><span class="cx">                 0F139E711A423A1D00F590F5 /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                5C726D6D1D3EE06800C5E1A1 /* InstanceMethodSwizzler.h */,
+                                5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */,
</ins><span class="cx">                                 A13EBB441B87332B00097110 /* WebProcessPlugIn */,
</span><span class="cx">                                 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */,
</span><span class="cx">                                 A14FC58D1B8AE36500D107EB /* TestProtocol.h */,
</span><span class="lines">@@ -1304,6 +1315,9 @@
</span><span class="cx">                 A16F66B81C40E9E100BD4D24 /* Resources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                5C9E593E1D3EB1DE00E3C62E /* ApplicationCache.db */,
+                                5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */,
+                                5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */,
</ins><span class="cx">                                 93CFA8661CEB9DE1000565A8 /* autofocused-text-input.html */,
</span><span class="cx">                                 A16F66B91C40EA2000BD4D24 /* ContentFiltering.html */,
</span><span class="cx">                                 5714ECB81CA8B58800051AC8 /* DownloadRequestOriginalURL.html */,
</span><span class="lines">@@ -1618,8 +1632,6 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */,
</span><del>-                                C08587FE13FEC3A6001EF4E5 /* InstanceMethodSwizzler.h */,
-                                C08587FF13FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm */,
</del><span class="cx">                                 C081224013FC172400DC39AE /* JavaScriptTestMac.mm */,
</span><span class="cx">                                 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */,
</span><span class="cx">                                 BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */,
</span><span class="lines">@@ -2137,7 +2149,6 @@
</span><span class="cx">                                 7CCE7EFC1A411AE600447C4C /* InjectedBundleFrameHitTest.cpp in Sources */,
</span><span class="cx">                                 7CCE7EFD1A411AE600447C4C /* InjectedBundleInitializationUserDataCallbackWins.cpp in Sources */,
</span><span class="cx">                                 7CCE7EC31A411A7E00447C4C /* InspectorBar.mm in Sources */,
</span><del>-                                7CCE7EA41A4119F300447C4C /* InstanceMethodSwizzler.mm in Sources */,
</del><span class="cx">                                 7CCE7EDA1A411A8700447C4C /* InstanceMethodSwizzler.mm in Sources */,
</span><span class="cx">                                 7C54A4BE1AA11CCA00380F78 /* WKBundleFileHandle.cpp in Sources */,
</span><span class="cx">                                 CDC8E48D1BC5CB4500594FEC /* AudioSessionCategoryIOS.mm in Sources */,
</span><span class="lines">@@ -2177,6 +2188,7 @@
</span><span class="cx">                                 7CCE7F091A411AE600447C4C /* ParentFrame.cpp in Sources */,
</span><span class="cx">                                 7CCE7F0A1A411AE600447C4C /* PasteboardNotifications.mm in Sources */,
</span><span class="cx">                                 7C83E0BB1D0A650000FEBCF3 /* FindInPage.mm in Sources */,
</span><ins>+                                5C726D6F1D3EE06E00C5E1A1 /* InstanceMethodSwizzler.mm in Sources */,
</ins><span class="cx">                                 7CCE7EAF1A411A3800447C4C /* PlatformUtilities.cpp in Sources */,
</span><span class="cx">                                 0F139E781A423A6B00F590F5 /* PlatformUtilitiesCocoa.mm in Sources */,
</span><span class="cx">                                 7C417F331D19E14800B8EF53 /* WKWebViewDefaultNavigationDelegate.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedb"></a>
<div class="binary"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Index: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db
</span><span class="cx">===================================================================
</span><del>--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db        2016-07-19 22:50:10 UTC (rev 203425)
</del><ins>+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db        2016-07-19 22:51:13 UTC (rev 203426)
</ins><span class="cx">Property changes on: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+application/octet-stream
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedbshm"></a>
<div class="binary"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Index: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm
</span><span class="cx">===================================================================
</span><del>--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm        2016-07-19 22:50:10 UTC (rev 203425)
</del><ins>+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm        2016-07-19 22:51:13 UTC (rev 203426)
</ins><span class="cx">Property changes on: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-shm
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+application/octet-stream
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkToolsTestWebKitAPITestsWebKit2CocoaApplicationCachedbwal"></a>
<div class="binary"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Index: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal
</span><span class="cx">===================================================================
</span><del>--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal        2016-07-19 22:50:10 UTC (rev 203425)
</del><ins>+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal        2016-07-19 22:51:13 UTC (rev 203426)
</ins><span class="cx">Property changes on: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ApplicationCache.db-wal
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+application/octet-stream
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkToolsTestWebKitAPITestsWebKit2CocoaLocalStorageClearmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm (203425 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm        2016-07-19 22:50:10 UTC (rev 203425)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx">
</span><span class="cx"> #import "config.h"
</span><span class="cx">
</span><ins>+#import "InstanceMethodSwizzler.h"
</ins><span class="cx"> #import "PlatformUtilities.h"
</span><span class="cx"> #import "Test.h"
</span><span class="cx"> #import <WebKit/WKProcessPoolPrivate.h>
</span><span class="lines">@@ -89,4 +90,84 @@
</span><span class="cx"> TestWebKitAPI::Util::run(&readyToContinue);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static long long fileSize(NSURL* url)
+{
+ NSError *error = nil;
+ NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:url.path error:&error];
+ if (error)
+ return -1;
+ return [[fileAttributes objectForKey:NSFileSize] longLongValue];
+}
+
+NSString *swizzledBundleIdentifierMobileSafari()
+{
+ return @"com.apple.mobilesafari";
+}
+
+NSString *swizzledBundleIdentifierWebBookmarksD()
+{
+ return @"com.apple.webbookmarksd";
+}
+
+NSString *defaultApplicationCacheDirectory()
+{
+ return @"~/Library/Caches/TestWebKitAPI/WebKit/OfflineWebApplicationCache";
+}
+
+TEST(WKWebView, ClearAppCache)
+{
+ {
+ NSURL *dbResourceURL = [[NSBundle mainBundle] URLForResource:@"ApplicationCache" withExtension:@"db" subdirectory:@"TestWebKitAPI.resources"];
+ NSURL *shmResourceURL = [[NSBundle mainBundle] URLForResource:@"ApplicationCache" withExtension:@"db-shm" subdirectory:@"TestWebKitAPI.resources"];
+ NSURL *walResourceURL = [[NSBundle mainBundle] URLForResource:@"ApplicationCache" withExtension:@"db-wal" subdirectory:@"TestWebKitAPI.resources"];
+
+ NSURL *targetURL = [NSURL fileURLWithPath:[defaultApplicationCacheDirectory() stringByExpandingTildeInPath]];
+ [[NSFileManager defaultManager] createDirectoryAtURL:targetURL withIntermediateDirectories:YES attributes:nil error:nil];
+
+ NSURL *dbTargetURL = [targetURL URLByAppendingPathComponent:@"ApplicationCache.db"];
+ NSURL *walTargetURL = [targetURL URLByAppendingPathComponent:@"ApplicationCache.db-wal"];
+ NSURL *shmTargetURL = [targetURL URLByAppendingPathComponent:@"ApplicationCache.db-shm"];
+
+ // Clean up any files that may have been left from this test failing before.
+ [[NSFileManager defaultManager] removeItemAtURL:dbTargetURL error:nil];
+ [[NSFileManager defaultManager] removeItemAtURL:walTargetURL error:nil];
+ [[NSFileManager defaultManager] removeItemAtURL:shmTargetURL error:nil];
+ EXPECT_EQ(fileSize(dbTargetURL), -1);
+ EXPECT_EQ(fileSize(walTargetURL), -1);
+ EXPECT_EQ(fileSize(shmTargetURL), -1);
+
+ // Copy the resources from the bundle to ~/Library/...
+ [[NSFileManager defaultManager] copyItemAtURL:dbResourceURL toURL:dbTargetURL error:nil];
+ [[NSFileManager defaultManager] copyItemAtURL:shmResourceURL toURL:shmTargetURL error:nil];
+ [[NSFileManager defaultManager] copyItemAtURL:walResourceURL toURL:walTargetURL error:nil];
+ EXPECT_GT(fileSize(dbTargetURL), 0);
+ EXPECT_GT(fileSize(shmTargetURL), 0);
+ EXPECT_GT(fileSize(walTargetURL), 0);
+
+ // 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);
+ readyToContinue = true;
+ }];
+ TestWebKitAPI::Util::run(&readyToContinue);
+ }
+
+ readyToContinue = false;
+ [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^()
+ {
+ NSURL *targetURL = [NSURL fileURLWithPath:[defaultApplicationCacheDirectory() stringByExpandingTildeInPath]];
+ NSURL *walTargetURL = [targetURL URLByAppendingPathComponent:@"ApplicationCache.db-wal"];
+
+ // Make sure there is no record in the WKWebsiteDataStore.
+ EXPECT_EQ(fileSize(walTargetURL), 0);
+ [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] completionHandler:^(NSArray<WKWebsiteDataRecord *> *websiteDataRecords)
+ {
+ EXPECT_EQ(websiteDataRecords.count, 0ul);
+ readyToContinue = true;
+ }];
+ }];
+ TestWebKitAPI::Util::run(&readyToContinue);
+}
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaInstanceMethodSwizzlerhfromrev203425trunkToolsTestWebKitAPImacInstanceMethodSwizzlerh"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h (from rev 203425, trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.h) (0 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h         (rev 0)
+++ trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InstanceMethodSwizzler_h
+#define InstanceMethodSwizzler_h
+
+#include <objc/runtime.h>
+#include <wtf/Noncopyable.h>
+
+namespace TestWebKitAPI {
+
+class InstanceMethodSwizzler {
+ WTF_MAKE_NONCOPYABLE(InstanceMethodSwizzler);
+public:
+ InstanceMethodSwizzler(Class, SEL, IMP);
+ ~InstanceMethodSwizzler();
+
+ Method m_method;
+ IMP m_originalImplementation;
+};
+
+} // namespace TestWebKitAPI
+
+#endif // InstanceMethodSwizzler_h
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaInstanceMethodSwizzlermmfromrev203425trunkToolsTestWebKitAPImacInstanceMethodSwizzlermm"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm (from rev 203425, trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.mm) (0 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm         (rev 0)
+++ trunk/Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "InstanceMethodSwizzler.h"
+
+namespace TestWebKitAPI {
+
+InstanceMethodSwizzler::InstanceMethodSwizzler(Class cls, SEL selector, IMP implementation)
+ : m_method(class_getInstanceMethod(cls, selector))
+ , m_originalImplementation(method_setImplementation(m_method, implementation))
+{
+}
+
+InstanceMethodSwizzler::~InstanceMethodSwizzler()
+{
+ method_setImplementation(m_method, m_originalImplementation);
+}
+
+} // namespace TestWebKitAPI
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPImacInstanceMethodSwizzlerh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.h (203425 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.h        2016-07-19 22:50:10 UTC (rev 203425)
+++ trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.h        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -1,46 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InstanceMethodSwizzler_h
-#define InstanceMethodSwizzler_h
-
-#include <objc/runtime.h>
-#include <wtf/Noncopyable.h>
-
-namespace TestWebKitAPI {
-
-class InstanceMethodSwizzler {
- WTF_MAKE_NONCOPYABLE(InstanceMethodSwizzler);
-public:
- InstanceMethodSwizzler(Class, SEL, IMP);
- ~InstanceMethodSwizzler();
-
- Method m_method;
- IMP m_originalImplementation;
-};
-
-} // namespace TestWebKitAPI
-
-#endif // InstanceMethodSwizzler_h
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPImacInstanceMethodSwizzlermm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.mm (203425 => 203426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.mm        2016-07-19 22:50:10 UTC (rev 203425)
+++ trunk/Tools/TestWebKitAPI/mac/InstanceMethodSwizzler.mm        2016-07-19 22:51:13 UTC (rev 203426)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "InstanceMethodSwizzler.h"
-
-namespace TestWebKitAPI {
-
-InstanceMethodSwizzler::InstanceMethodSwizzler(Class cls, SEL selector, IMP implementation)
- : m_method(class_getInstanceMethod(cls, selector))
- , m_originalImplementation(method_setImplementation(m_method, implementation))
-{
-}
-
-InstanceMethodSwizzler::~InstanceMethodSwizzler()
-{
- method_setImplementation(m_method, m_originalImplementation);
-}
-
-} // namespace TestWebKitAPI
</del></span></pre>
</div>
</div>
</body>
</html>