Skip to content

Commit 2a4f741

Browse files
committed
2011-04-15 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by David Levin. Expose unified Quota API if QUOTA build flag is enabled https://bugs.webkit.org/show_bug.cgi?id=58648 * src/AssertMatchingEnums.cpp: Added enum assertions. * src/StorageInfoChromium.cpp: Made a build fix. 2011-04-15 Kinuko Yasuda <kinuko@chromium.org> Reviewed by David Levin. Expose unified Quota API if QUOTA build flag is enabled https://bugs.webkit.org/show_bug.cgi?id=58648 Test: storage/storageinfo-query-usage.html * CMakeLists.txt: Added new file entries. * DerivedSources.cpp: Added new file entries. * DerivedSources.make: Added new file entries. * GNUmakefile.am: Added new file entries. * WebCore.gypi: Added new file entries. * WebCore.vcproj/WebCore.vcproj: Added new file entries. * WebCore.xcodeproj/project.pbxproj: Added new file entries. * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitStorageInfo): Added. * page/DOMWindow.h: * page/DOMWindow.idl: * storage/StorageInfo.h: Added storage type enum. * storage/StorageInfo.idl: Added. * storage/StorageInfoErrorCallback.idl: Added. * storage/StorageInfoUsageCallback.idl: Added. 2011-04-15 Kinuko Yasuda <kinuko@chromium.org> Reviewed by David Levin. Expose unified Quota API if QUOTA build flag is enabled https://bugs.webkit.org/show_bug.cgi?id=58648 Added a layout test, also added skipped entries on platforms where the QUOTA flag is not enabled. * platform/chromium/test_expectations.txt: * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: * storage/script-tests/TEMPLATE.html: Added. * storage/script-tests/storageinfo-query-usage.js: Added. * storage/storageinfo-query-usage-expected.txt: Added. * storage/storageinfo-query-usage.html: Added. Canonical link: https://commits.webkit.org/73794@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 17e5024 commit 2a4f741

30 files changed

Lines changed: 398 additions & 27 deletions

LayoutTests/ChangeLog

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2011-04-15 Kinuko Yasuda <kinuko@chromium.org>
2+
3+
Reviewed by David Levin.
4+
5+
Expose unified Quota API if QUOTA build flag is enabled
6+
https://bugs.webkit.org/show_bug.cgi?id=58648
7+
8+
Added a layout test, also added skipped entries on platforms
9+
where the QUOTA flag is not enabled.
10+
11+
* platform/chromium/test_expectations.txt:
12+
* platform/gtk/Skipped:
13+
* platform/mac/Skipped:
14+
* platform/qt/Skipped:
15+
* platform/win/Skipped:
16+
* storage/script-tests/TEMPLATE.html: Added.
17+
* storage/script-tests/storageinfo-query-usage.js: Added.
18+
* storage/storageinfo-query-usage-expected.txt: Added.
19+
* storage/storageinfo-query-usage.html: Added.
20+
121
2011-04-15 Oliver Hunt <oliver@apple.com>
222

323
GC allocate Structure

LayoutTests/platform/chromium/test_expectations.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ WONTFIX SKIP : java/lc3 = TEXT
204204
// TODO: move to platform/chromium-linux/.
205205
WONTFIX SKIP MAC WIN : platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html = FAIL
206206

207+
// Quota API is not yet enabled by default.
208+
BUGCR61676 SKIP : storage/storageinfo-query-usage.html = FAIL
209+
207210
// -----------------------------------------------------------------
208211
// WONTFIX TESTS
209212
// -----------------------------------------------------------------
@@ -3535,3 +3538,4 @@ BUGMORRITA : fast/html/details-remove-summary-6.html = FAIL
35353538
BUGMORRITA : fast/html/details-writing-mode.html = FAIL
35363539

35373540
BUGWK58619 GPU LINUX WIN : media/video-volume-slider.html = IMAGE
3541+

LayoutTests/platform/gtk/Skipped

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,3 +1378,6 @@ fast/canvas/DrawImageSinglePixelStretch.html
13781378

13791379
# https://bugs.webkit.org/show_bug.cgi?id=58667
13801380
editing/selection/select-out-of-editable.html
1381+
1382+
# Quota API is not supported.
1383+
storage/storageinfo-query-usage.html

LayoutTests/platform/mac/Skipped

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,6 @@ http/tests/inspector/network/network-size-sync.html
321321

322322
# https://bugs.webkit.org/show_bug.cgi?id=58515
323323
compositing/overflow/clip-content-under-overflow-controls.html
324+
325+
# Quota API is not supported.
326+
storage/storageinfo-query-usage.html

LayoutTests/platform/qt/Skipped

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3496,3 +3496,6 @@ http/tests/inspector/network/download.html
34963496
http/tests/inspector/network/x-frame-options-deny.html
34973497
http/tests/loading/cross-origin-XHR-willLoadRequest.html
34983498
http/tests/misc/redirect-to-external-url.html
3499+
3500+
# Quota API is not yet supported.
3501+
storage/storageinfo-query-usage.html

LayoutTests/platform/win/Skipped

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,3 +1232,6 @@ fast/dom/Element/scale-page-client-rects.html
12321232
fast/dom/Range/scale-page-bounding-client-rect.html
12331233
fast/dom/Range/scale-page-client-rects.html
12341234
fast/repaint/scale-page-shrink.html
1235+
1236+
# Quota API is not supported.
1237+
storage/storageinfo-query-usage.html
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<html>
2+
<head>
3+
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
4+
<script src="../fast/js/resources/js-test-pre.js"></script>
5+
<script src="resources/fs-test-util.js"></script>
6+
</head>
7+
<body>
8+
<p id="description"></p>
9+
<div id="console"></div>
10+
<script src="YOUR_JS_FILE_HERE"></script>
11+
<script src="../fast/js/resources/js-test-post.js"></script>
12+
</body>
13+
</html>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
description("This tests webkitStorageInfo API works.");
2+
3+
function errorCallback(error)
4+
{
5+
testFailed("Error occurred: " + error);
6+
finishJSTest();
7+
}
8+
9+
var returnedUsage;
10+
var returnedQuota;
11+
function usageCallback(usage, quota)
12+
{
13+
returnedUsage = usage;
14+
returnedQuota = quota;
15+
16+
// Usage should be 0 (if other storage tests have correctly cleaned up their test data before exiting).
17+
shouldBe("returnedUsage", "0");
18+
19+
// Quota value would vary depending on the test environment.
20+
shouldBeGreaterThanOrEqual("returnedQuota", "returnedUsage");
21+
22+
finishJSTest();
23+
}
24+
25+
if (window.webkitStorageInfo) {
26+
window.jsTestIsAsync = true;
27+
webkitStorageInfo.queryUsageAndQuota(webkitStorageInfo.TEMPORARY, usageCallback, errorCallback);
28+
} else
29+
debug("This test requires window.webkitStorageInfo.");
30+
31+
window.successfullyParsed = true;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This tests webkitStorageInfo API works.
2+
3+
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4+
5+
6+
PASS returnedUsage is 0
7+
PASS returnedQuota is >= returnedUsage
8+
PASS successfullyParsed is true
9+
10+
TEST COMPLETE
11+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<html>
2+
<head>
3+
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
4+
<script src="../fast/js/resources/js-test-pre.js"></script>
5+
<script src="resources/fs-test-util.js"></script>
6+
</head>
7+
<body>
8+
<p id="description"></p>
9+
<div id="console"></div>
10+
<script src="script-tests/storageinfo-query-usage.js"></script>
11+
<script src="../fast/js/resources/js-test-post.js"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)