Changeset 128338 in webkit
- Timestamp:
- Sep 12, 2012 10:42:23 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128336 r128338 1 2012-09-12 Christophe Dumez <christophe.dumez@intel.com> 2 3 [WK2][WKTR] TestRunner needs to implement originsWithApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=96496 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Unskip http/tests/appcache/origins-with-appcache.html now that 9 WebKitTestRunner implements originsWithApplicationCache. 10 11 * platform/wk2/Skipped: 12 1 13 2012-09-12 Bear Travis <betravis@adobe.com> 2 14 -
trunk/LayoutTests/platform/wk2/Skipped
r128326 r128338 203 203 fast/text/zero-font-size.html 204 204 205 # WTR needs an implementation of originsWithApplicationCache206 http/tests/appcache/origins-with-appcache.html207 208 205 # WebKitTestRunner needs to support layoutTestController.dumpDOMAsWebArchive 209 206 # <https://bugs.webkit.org/show_bug.cgi?id=42324> -
trunk/Source/WebKit2/ChangeLog
r128326 r128338 1 2012-09-12 Christophe Dumez <christophe.dumez@intel.com> 2 3 [WK2][WKTR] TestRunner needs to implement originsWithApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=96496 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Add Bundle C API to retrieve security origins with 9 an application cache. This is needed by WebKitTestRunner 10 to support originsWithApplicationCache. 11 12 * WebProcess/InjectedBundle/API/c/WKBundle.cpp: 13 (WKBundleCopyOriginsWithApplicationCache): 14 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: 15 * WebProcess/InjectedBundle/InjectedBundle.cpp: 16 (WebKit::InjectedBundle::originsWithApplicationCache): 17 (WebKit): 18 * WebProcess/InjectedBundle/InjectedBundle.h: 19 (InjectedBundle): 20 1 21 2012-09-12 Christophe Dumez <christophe.dumez@intel.com> 2 22 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
r128326 r128338 26 26 #include "config.h" 27 27 #include "WKBundle.h" 28 #include "WKBundlePrivate.h" 29 28 29 #include "ImmutableArray.h" 30 30 #include "InjectedBundle.h" 31 31 #include "WKAPICast.h" 32 32 #include "WKBundleAPICast.h" 33 #include "WKBundlePrivate.h" 33 34 34 35 using namespace WebKit; … … 257 258 } 258 259 260 WKArrayRef WKBundleCopyOriginsWithApplicationCache(WKBundleRef bundleRef) 261 { 262 RefPtr<ImmutableArray> origins = toImpl(bundleRef)->originsWithApplicationCache(); 263 return toAPI(origins.release().leakRef()); 264 } 265 259 266 void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds) 260 267 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
r128326 r128338 101 101 WK_EXPORT void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin, uint64_t bytes); 102 102 WK_EXPORT void WKBundleResetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin); 103 WK_EXPORT WKArrayRef WKBundleCopyOriginsWithApplicationCache(WKBundleRef bundle); 103 104 104 105 // Garbage collection API -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r128326 r128338 366 366 } 367 367 368 PassRefPtr<ImmutableArray> InjectedBundle::originsWithApplicationCache() 369 { 370 HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash> origins; 371 cacheStorage().getOriginsWithCache(origins); 372 Vector< RefPtr<APIObject> > originsVector; 373 374 HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator it = origins.begin(); 375 HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator end = origins.end(); 376 for ( ; it != end; ++it) 377 originsVector.append(WebString::create((*it)->databaseIdentifier())); 378 379 return ImmutableArray::adopt(originsVector); 380 } 381 368 382 int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels) 369 383 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
r128326 r128338 152 152 void setApplicationCacheOriginQuota(const String& origin, uint64_t); 153 153 void resetApplicationCacheOriginQuota(const String& origin); 154 PassRefPtr<ImmutableArray> originsWithApplicationCache(); 154 155 155 156 // Garbage collection API -
trunk/Tools/ChangeLog
r128333 r128338 1 2012-09-12 Christophe Dumez <christophe.dumez@intel.com> 2 3 [WK2][WKTR] TestRunner needs to implement originsWithApplicationCache 4 https://bugs.webkit.org/show_bug.cgi?id=96496 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Add implementation for originsWithApplicationCache to 9 WebKitTestRunner. 10 11 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 12 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 13 (WTR::stringArrayToJS): 14 (WTR): 15 (WTR::TestRunner::originsWithApplicationCache): 16 * WebKitTestRunner/InjectedBundle/TestRunner.h: 17 (TestRunner): 18 1 19 2012-09-12 Simon Hausmann <simon.hausmann@nokia.com> 2 20 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r128326 r128338 116 116 void setApplicationCacheOriginQuota(in unsigned long long bytes); 117 117 void disallowIncreaseForApplicationCacheQuota(); 118 object originsWithApplicationCache(); 118 119 119 120 // Compositing testing. -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r128326 r128338 331 331 } 332 332 333 static inline JSValueRef stringArrayToJS(JSContextRef context, WKArrayRef strings) 334 { 335 const size_t count = WKArrayGetSize(strings); 336 337 JSValueRef jsStringsArray[count]; 338 for (size_t i = 0; i < count; ++i) { 339 WKStringRef stringRef = static_cast<WKStringRef>(WKArrayGetItemAtIndex(strings, i)); 340 JSRetainPtr<JSStringRef> stringJS = toJS(stringRef); 341 jsStringsArray[i] = JSValueMakeString(context, stringJS.get()); 342 } 343 344 return JSObjectMakeArray(context, count, jsStringsArray, 0); 345 } 346 347 JSValueRef TestRunner::originsWithApplicationCache() 348 { 349 WKRetainPtr<WKArrayRef> origins(AdoptWK, WKBundleCopyOriginsWithApplicationCache(InjectedBundle::shared().bundle())); 350 351 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page()); 352 JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame); 353 354 return stringArrayToJS(context, origins.get()); 355 } 356 333 357 bool TestRunner::isCommandEnabled(JSStringRef name) 334 358 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r128326 r128338 153 153 void disallowIncreaseForApplicationCacheQuota(); 154 154 bool shouldDisallowIncreaseForApplicationCacheQuota() { return m_disallowIncreaseForApplicationCacheQuota; } 155 JSValueRef originsWithApplicationCache(); 155 156 156 157 // Printing
Note: See TracChangeset
for help on using the changeset viewer.