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

Unified Diff: LayoutTests/fast/workers/storage/resources/execute-sql-args-sync.js

Issue 561093003: Remove worker support of Web SQL Database. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/fast/workers/storage/resources/execute-sql-args-sync.js
diff --git a/LayoutTests/fast/workers/storage/resources/execute-sql-args-sync.js b/LayoutTests/fast/workers/storage/resources/execute-sql-args-sync.js
deleted file mode 100644
index aca97b37a8b5ac49c7add8d0209418597210268c..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/workers/storage/resources/execute-sql-args-sync.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var throwOnToStringObject = { };
-throwOnToStringObject.toString = function () { throw "Cannot call toString on this object." };
-
-var throwOnGetLengthObject = { };
-throwOnGetLengthObject.__defineGetter__("length", function () { throw "Cannot get length of this object."; });
-
-var throwOnGetZeroObject = { length: 1 };
-throwOnGetZeroObject.__defineGetter__("0", function () { throw "Cannot get 0 property of this object."; });
-
-var expectNoException = [
- '""',
- '"", null',
- '"", undefined',
- '"", []',
- '"", [ "arg0" ]',
- '"", { }',
- '"", { length: 0 }',
- '"", { length: 1, 0: "arg0" }',
-];
-
-var expectException = [
- '',
- 'null',
- 'undefined',
- '0',
- 'throwOnToStringObject',
- '"", throwOnGetLengthObject',
- '"", throwOnGetZeroObject',
- '"", [ throwOnToStringObject ]',
- '"", 0',
- '"", ""',
-];
-
-function tryExecuteSql(transaction, parameterList)
-{
- try {
- eval('transaction.executeSql(' + parameterList + ')');
- return null;
- } catch (exception) {
- return exception;
- }
-}
-
-function runTransactionTest(transaction, parameterList, expectException)
-{
- var exception = tryExecuteSql(transaction, parameterList);
- if (expectException) {
- if (exception)
- postMessage("PASS: executeSql(" + parameterList + ") threw an exception as expected.");
- else
- postMessage("FAIL: executeSql(" + parameterList + ") did not throw an exception.");
- } else {
- if (exception)
- postMessage("FAIL: executeSql(" + parameterList + ") threw an exception: " + exception);
- else
- postMessage("PASS: executeSql(" + parameterList + ") did not throw an exception.");
- }
-}
-
-function runTransactionTests(transaction)
-{
- for (i in expectNoException)
- runTransactionTest(transaction, expectNoException[i], false);
- for (i in expectException)
- runTransactionTest(transaction, expectException[i], true);
-}
-
-var db = openDatabaseSync("ExecuteSQLArgsTest", "1.0", "Test of handling of the arguments to SQLTransactionSync.executeSql", 1);
-db.transaction(runTransactionTests);
-postMessage("done");

Powered by Google App Engine
This is Rietveld 408576698