Diff
Modified: trunk/LayoutTests/ChangeLog (86763 => 86764)
--- trunk/LayoutTests/ChangeLog 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/ChangeLog 2011-05-18 15:31:33 UTC (rev 86764)
@@ -1,3 +1,19 @@
+2011-05-18 Kinuko Yasuda <[email protected]>
+
+ Reviewed by David Levin.
+
+ Expose webkitStorageInfo.requestQuota() for Quota API if QUOTA flag is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=59681
+
+ * platform/chromium/test_expectations.txt:
+ * platform/gtk/Skipped:
+ * platform/mac/Skipped:
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+ * storage/script-tests/storageinfo-request-quota.js: Added.
+ * storage/storageinfo-request-quota-expected.txt: Added.
+ * storage/storageinfo-request-quota.html: Added.
+
2011-05-18 Csaba Osztrogonác <[email protected]>
[Qt][WK2] Skip two failing tests.
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (86763 => 86764)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-05-18 15:31:33 UTC (rev 86764)
@@ -202,6 +202,7 @@
// Quota API is not yet enabled by default.
BUGCR61676 SKIP : storage/storageinfo-query-usage.html = FAIL
+BUGCR61676 SKIP : storage/storageinfo-request-quota.html = FAIL
// Animation API is disabled
WONTFIX SKIP : animations/animation-api-1.html = FAIL
Modified: trunk/LayoutTests/platform/gtk/Skipped (86763 => 86764)
--- trunk/LayoutTests/platform/gtk/Skipped 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/platform/gtk/Skipped 2011-05-18 15:31:33 UTC (rev 86764)
@@ -1391,6 +1391,7 @@
# Quota API is not supported.
storage/storageinfo-query-usage.html
+storage/storageinfo-request-quota.html
# Expose title direction in WebKit API
# https://bugs.webkit.org/show_bug.cgi?id=58845
Modified: trunk/LayoutTests/platform/mac/Skipped (86763 => 86764)
--- trunk/LayoutTests/platform/mac/Skipped 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/platform/mac/Skipped 2011-05-18 15:31:33 UTC (rev 86764)
@@ -333,6 +333,7 @@
# Quota API is not supported.
storage/storageinfo-query-usage.html
+storage/storageinfo-request-quota.html
# Expose title direction in WebKit API
# https://bugs.webkit.org/show_bug.cgi?id=58845
Modified: trunk/LayoutTests/platform/qt/Skipped (86763 => 86764)
--- trunk/LayoutTests/platform/qt/Skipped 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/platform/qt/Skipped 2011-05-18 15:31:33 UTC (rev 86764)
@@ -2521,6 +2521,7 @@
# Quota API is not yet supported.
storage/storageinfo-query-usage.html
+storage/storageinfo-request-quota.html
# Expose title direction in WebKit API
# https://bugs.webkit.org/show_bug.cgi?id=58845
Modified: trunk/LayoutTests/platform/win/Skipped (86763 => 86764)
--- trunk/LayoutTests/platform/win/Skipped 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/LayoutTests/platform/win/Skipped 2011-05-18 15:31:33 UTC (rev 86764)
@@ -1254,6 +1254,7 @@
# Quota API is not supported.
storage/storageinfo-query-usage.html
+storage/storageinfo-request-quota.html
# Expose title direction in WebKit API
# https://bugs.webkit.org/show_bug.cgi?id=58845
Added: trunk/LayoutTests/storage/script-tests/storageinfo-request-quota.js (0 => 86764)
--- trunk/LayoutTests/storage/script-tests/storageinfo-request-quota.js (rev 0)
+++ trunk/LayoutTests/storage/script-tests/storageinfo-request-quota.js 2011-05-18 15:31:33 UTC (rev 86764)
@@ -0,0 +1,29 @@
+description("This tests webkitStorageInfo.requestQuota.");
+
+function errorCallback(error)
+{
+ testFailed("Error occurred: " + error);
+ finishJSTest();
+}
+
+var grantedQuota;
+function quotaCallback(newQuota)
+{
+ grantedQuota = newQuota;
+
+ // We must be given 0 quota, the same amount as we requested.
+ shouldBe("grantedQuota", "0");
+
+ finishJSTest();
+}
+
+if (window.webkitStorageInfo) {
+ window.jsTestIsAsync = true;
+
+ // Requesting '0' quota for testing (this request must be almost always granted without showing any platform specific notification UI).
+ webkitStorageInfo.requestQuota(webkitStorageInfo.TEMPORARY, 0, quotaCallback, errorCallback);
+} else
+ debug("This test requires window.webkitStorageInfo.");
+
+window.successfullyParsed = true;
+
Property changes on: trunk/LayoutTests/storage/script-tests/storageinfo-request-quota.js
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/storage/storageinfo-request-quota-expected.txt (0 => 86764)
--- trunk/LayoutTests/storage/storageinfo-request-quota-expected.txt (rev 0)
+++ trunk/LayoutTests/storage/storageinfo-request-quota-expected.txt 2011-05-18 15:31:33 UTC (rev 86764)
@@ -0,0 +1,10 @@
+iThis tests webkitStorageInfo.requestQuota.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS grantedQuota is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/storage/storageinfo-request-quota-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/storage/storageinfo-request-quota.html (0 => 86764)
--- trunk/LayoutTests/storage/storageinfo-request-quota.html (rev 0)
+++ trunk/LayoutTests/storage/storageinfo-request-quota.html 2011-05-18 15:31:33 UTC (rev 86764)
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src=""
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/storage/storageinfo-request-quota.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/CMakeLists.txt (86763 => 86764)
--- trunk/Source/WebCore/CMakeLists.txt 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/CMakeLists.txt 2011-05-18 15:31:33 UTC (rev 86764)
@@ -376,6 +376,7 @@
storage/StorageEvent.idl
storage/StorageInfo.idl
storage/StorageInfoErrorCallback.idl
+ storage/StorageInfoQuotaCallback.idl
storage/StorageInfoUsageCallback.idl
webaudio/AudioBuffer.idl
Modified: trunk/Source/WebCore/ChangeLog (86763 => 86764)
--- trunk/Source/WebCore/ChangeLog 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/ChangeLog 2011-05-18 15:31:33 UTC (rev 86764)
@@ -1,3 +1,24 @@
+2011-05-18 Kinuko Yasuda <[email protected]>
+
+ Reviewed by David Levin.
+
+ Expose webkitStorageInfo.requestQuota() for Quota API if QUOTA flag is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=59681
+
+ Test: storage/storageinfo-request-quota.html
+
+ * CMakeLists.txt:
+ * CodeGenerators.pri:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * storage/StorageInfo.idl: Added requestQuota().
+ * storage/StorageInfoQuotaCallback.idl: Added.
+
2011-05-18 Renata Hodovan <[email protected]>
Reviewed by Nikolas Zimmermann.
Modified: trunk/Source/WebCore/CodeGenerators.pri (86763 => 86764)
--- trunk/Source/WebCore/CodeGenerators.pri 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/CodeGenerators.pri 2011-05-18 15:31:33 UTC (rev 86764)
@@ -361,6 +361,7 @@
storage/StorageEvent.idl \
storage/StorageInfo.idl \
storage/StorageInfoErrorCallback.idl \
+ storage/StorageInfoQuotaCallback.idl \
storage/StorageInfoUsageCallback.idl \
storage/SQLError.idl \
storage/SQLException.idl \
Modified: trunk/Source/WebCore/DerivedSources.cpp (86763 => 86764)
--- trunk/Source/WebCore/DerivedSources.cpp 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/DerivedSources.cpp 2011-05-18 15:31:33 UTC (rev 86764)
@@ -282,6 +282,7 @@
#include "JSStorageEvent.cpp"
#include "JSStorageInfo.cpp"
#include "JSStorageInfoErrorCallback.cpp"
+#include "JSStorageInfoQuotaCallback.cpp"
#include "JSStorageInfoUsageCallback.cpp"
#include "JSStringCallback.cpp"
#include "JSStyleMedia.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (86763 => 86764)
--- trunk/Source/WebCore/DerivedSources.make 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/DerivedSources.make 2011-05-18 15:31:33 UTC (rev 86764)
@@ -353,6 +353,7 @@
StorageEvent \
StorageInfo \
StorageInfoErrorCallback \
+ StorageInfoQuotaCallback \
StorageInfoUsageCallback \
StringCallback \
SVGAElement \
Modified: trunk/Source/WebCore/GNUmakefile.am (86763 => 86764)
--- trunk/Source/WebCore/GNUmakefile.am 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/GNUmakefile.am 2011-05-18 15:31:33 UTC (rev 86764)
@@ -256,6 +256,8 @@
DerivedSources/WebCore/JSStorageInfo.h \
DerivedSources/WebCore/JSStorageInfoErrorCallback.cpp \
DerivedSources/WebCore/JSStorageInfoErrorCallback.h \
+ DerivedSources/WebCore/JSStorageInfoQuotaCallback.cpp \
+ DerivedSources/WebCore/JSStorageInfoQuotaCallback.h \
DerivedSources/WebCore/JSStorageInfoUsageCallback.cpp \
DerivedSources/WebCore/JSStorageInfoUsageCallback.h
endif # END ENABLE_QUOTA
Modified: trunk/Source/WebCore/GNUmakefile.list.am (86763 => 86764)
--- trunk/Source/WebCore/GNUmakefile.list.am 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2011-05-18 15:31:33 UTC (rev 86764)
@@ -443,6 +443,7 @@
DerivedSources/WebCore/JSStorage.h \
DerivedSources/WebCore/JSStorageInfo.h \
DerivedSources/WebCore/JSStorageInfoErrorCallback.h \
+ DerivedSources/WebCore/JSStorageInfoQuotaCallback.h \
DerivedSources/WebCore/JSStorageInfoUsageCallback.h \
DerivedSources/WebCore/JSStyleMedia.cpp \
DerivedSources/WebCore/JSStyleMedia.h \
@@ -3208,6 +3209,7 @@
Source/WebCore/storage/StorageInfo.cpp \
Source/WebCore/storage/StorageInfo.h \
Source/WebCore/storage/StorageInfoErrorCallback.h \
+ Source/WebCore/storage/StorageInfoQuotaCallback.h \
Source/WebCore/storage/StorageInfoUsageCallback.h \
Source/WebCore/storage/StorageMap.cpp \
Source/WebCore/storage/StorageMap.h \
Modified: trunk/Source/WebCore/WebCore.gypi (86763 => 86764)
--- trunk/Source/WebCore/WebCore.gypi 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/WebCore.gypi 2011-05-18 15:31:33 UTC (rev 86764)
@@ -1389,6 +1389,7 @@
'storage/StorageEvent.idl',
'storage/StorageInfo.idl',
'storage/StorageInfoErrorCallback.idl',
+ 'storage/StorageInfoQuotaCallback.idl',
'storage/StorageInfoUsageCallback.idl',
'webaudio/AudioBuffer.idl',
'webaudio/AudioBufferSourceNode.idl',
@@ -7802,6 +7803,8 @@
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfo.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoErrorCallback.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoErrorCallback.h',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoQuotaCallback.cpp',
+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoQuotaCallback.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoUsageCallback.cpp',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStorageInfoUsageCallback.h',
'<(PRODUCT_DIR)/DerivedSources/WebCore/JSStyleMedia.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (86763 => 86764)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-05-18 15:31:33 UTC (rev 86764)
@@ -13294,6 +13294,14 @@
>
</File>
<File
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStorageInfoQuotaCallback.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStorageInfoQuotaCallback.h"
+ >
+ </File>
+ <File
RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSStorageInfoUsageCallback.cpp"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (86763 => 86764)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-05-18 15:31:33 UTC (rev 86764)
@@ -2624,6 +2624,8 @@
892CF20C134C8BB300AAEDA1 /* JSStorageInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF204134C8BB300AAEDA1 /* JSStorageInfo.h */; };
892CF20D134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 892CF205134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.cpp */; };
892CF20E134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF206134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.h */; };
+ 892CF20F134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 892CF207134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.cpp */; };
+ 892CF210134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF208134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.h */; };
892CF211134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 892CF209134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.cpp */; };
892CF212134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 892CF20A134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.h */; };
893C47A71238908B002B3D86 /* FileCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 893C47A51238908B002B3D86 /* FileCallback.h */; };
@@ -17010,6 +17012,8 @@
892CF204134C8BB300AAEDA1 /* JSStorageInfo.h */,
892CF205134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.cpp */,
892CF206134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.h */,
+ 892CF207134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.cpp */,
+ 892CF208134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.h */,
892CF209134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.cpp */,
892CF20A134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.h */,
);
@@ -21602,6 +21606,7 @@
51E0BAEB0DA55D4A00A9E417 /* JSStorageEvent.h in Headers */,
892CF20C134C8BB300AAEDA1 /* JSStorageInfo.h in Headers */,
892CF20E134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.h in Headers */,
+ 892CF210134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.h in Headers */,
892CF212134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.h in Headers */,
0FF5026A102BA9430066F39A /* JSStyleMedia.h in Headers */,
BCE0139B0C0BEF180043860A /* JSStyleSheet.h in Headers */,
@@ -24485,6 +24490,7 @@
51E0BAEA0DA55D4A00A9E417 /* JSStorageEvent.cpp in Sources */,
892CF20B134C8BB300AAEDA1 /* JSStorageInfo.cpp in Sources */,
892CF20D134C8BB300AAEDA1 /* JSStorageInfoErrorCallback.cpp in Sources */,
+ 892CF20F134C8BB300AAEDA1 /* JSStorageInfoQuotaCallback.cpp in Sources */,
892CF211134C8BB300AAEDA1 /* JSStorageInfoUsageCallback.cpp in Sources */,
0FF50269102BA9430066F39A /* JSStyleMedia.cpp in Sources */,
BCE0139A0C0BEF180043860A /* JSStyleSheet.cpp in Sources */,
Modified: trunk/Source/WebCore/storage/StorageInfo.idl (86763 => 86764)
--- trunk/Source/WebCore/storage/StorageInfo.idl 2011-05-18 15:20:04 UTC (rev 86763)
+++ trunk/Source/WebCore/storage/StorageInfo.idl 2011-05-18 15:31:33 UTC (rev 86764)
@@ -33,5 +33,6 @@
const unsigned short PERSISTENT = 1;
[CallWith=ScriptExecutionContext] void queryUsageAndQuota(in unsigned short storageType, in [Callback, Optional] StorageInfoUsageCallback usageCallback, in [Callback, Optional] StorageInfoErrorCallback errorCallback);
+ [CallWith=ScriptExecutionContext] void requestQuota(in unsigned short storageType, in unsigned long long newQuotaInBytes, in [Callback, Optional] StorageInfoQuotaCallback quotaCallback, in [Callback, Optional] StorageInfoErrorCallback errorCallback);
};
}
Added: trunk/Source/WebCore/storage/StorageInfoQuotaCallback.idl (0 => 86764)
--- trunk/Source/WebCore/storage/StorageInfoQuotaCallback.idl (rev 0)
+++ trunk/Source/WebCore/storage/StorageInfoQuotaCallback.idl 2011-05-18 15:31:33 UTC (rev 86764)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Google 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+module storage {
+ interface [
+ Conditional=QUOTA,
+ Callback
+ ] StorageInfoQuotaCallback {
+ boolean handleEvent(in unsigned long long grantedQuotaInBytes);
+ };
+}
Property changes on: trunk/Source/WebCore/storage/StorageInfoQuotaCallback.idl
___________________________________________________________________
Added: svn:eol-style