Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: LayoutTests/storage/websql/quota-tracking.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/storage/websql/quota-tracking.html
diff --git a/LayoutTests/storage/websql/quota-tracking.html b/LayoutTests/storage/websql/quota-tracking.html
deleted file mode 100644
index 702c3ce1ebd49075799507c98cd264747da52cb4..0000000000000000000000000000000000000000
--- a/LayoutTests/storage/websql/quota-tracking.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<html>
-<head>
-<script>
-var database1 = null;
-var database2 = null;
-var database3 = null;
-
-function log(message)
-{
- document.getElementById("console").innerHTML += message + "<br>";
-}
-
-function finishTest()
-{
- log("Test Complete");
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-function statementErrorFunction(tx, error)
-{
- log("Unexpected exception - " + error.message);
- finishTest();
-}
-
-function transactionErrorFunction(db, error)
-{
- // We only expect an error message for database2
- if (db == database2) {
- log("Expected quota exception - " + error.message);
- checkCompletion(db);
- } else {
- log("Unexpected exception - " + error.message);
- finishTest();
- }
-}
-
-function checkCompletion(db)
-{
- log("Done adding data");
-
- if (database3) {
- finishTest();
- } else if (database2) {
- database3 = openDatabase("QuotaManagementDatabase3", "1.0", "Test for quota management <rdar://5628468>", 1);
- testDatabase(database3);
- } else {
- database2 = openDatabase("QuotaManagementDatabase2", "1.0", "Test for quota management <rdar://5628468>", 1);
- testDatabase(database2);
- }
-}
-
-function addData(db)
-{
- db.transaction(function(tx) {
- log("Inserting some data");
- tx.executeSql("INSERT INTO DataTest (randomData) VALUES (ZEROBLOB(17408))", [],
- function(tx, result) { }, statementErrorFunction);
- if (db == database2) {
- // Try to run this statement on 'database2' only.
- // It should not be run, because the previous statement should've
- // resulted in a failure that made sqlite roll back the entire transaction.
- tx.executeSql("INSERT INTO DataTest (randomData) VALUES (ZEROBLOB(10))", [],
- function(tx, result) {
- log("This statement should not have been run.");
- finishTest();
- }, statementErrorFunction);
- }
- }, function(error) {
- transactionErrorFunction(db, error);
- }, function() {
- checkCompletion(db);
- });
-}
-
-function testDatabase(db)
-{
- db.transaction(function(tx) {
- log("Adding a table");
- tx.executeSql("CREATE TABLE DataTest (randomData)", [],
- function(tx, result) { }, statementErrorFunction);
- }, function(error) {
- transactionErrorFunction(db, error);
- }, function() {
- addData(db);
- });
-}
-
-function runTest()
-{
- if (window.testRunner) {
- testRunner.clearAllDatabases();
- testRunner.dumpDatabaseCallbacks();
- testRunner.setDatabaseQuota(40960);
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- database1 = openDatabase("QuotaManagementDatabase1", "1.0", "Test for quota management <rdar://5628468>", 1);
- testDatabase(database1);
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-This test checks to make sure that quotas are enforced per-origin instead of per-database, as they were prior to http://trac.webkit.org/projects/webkit/changeset/29983.<br>
-The test clears all databases, sets the quota for the origin to 40k, then tries to insert 17k of data into two databases. If things go as planned, the second insert should fail, the UI Delegate should be informed of the exceeded quota and should increase the quota for this origin. Inserting 17k of data the third time should succeed again.
-<pre id="console">
-</pre>
-</body>
-
-</html>

Powered by Google App Engine
This is Rietveld 408576698