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

Unified Diff: third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 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: third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js
diff --git a/third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js b/third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js
index 551f0670cd79b1e457cabd9122726a20bcb3bfe0..b7b669155f1525c54f412919de2a17580a562646 100644
--- a/third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js
+++ b/third_party/WebKit/LayoutTests/storage/websql/execute-sql-args.js
@@ -7,6 +7,17 @@ throwOnGetLengthObject.__defineGetter__("length", function () { throw "Cannot ge
var throwOnGetZeroObject = { length: 1 };
throwOnGetZeroObject.__defineGetter__("0", function () { throw "Cannot get 0 property of this object."; });
+function createIterable(iterations) {
+ return {
+ [Symbol.iterator]() {
+ var i = 0;
+ return {next: () => iterations[i++]};
+ },
+ };
+}
+var emptyIterableObject = createIterable([{done: true}]);
+var singleItemIterableObject = createIterable([{done: false, value: "arg0"}, {done: true}]);
+
var expectNoException = [
'null',
'undefined',
@@ -16,8 +27,8 @@ var expectNoException = [
'"", undefined',
'"", []',
'"", [ "arg0" ]',
- '"", { length: 0 }',
- '"", { length: 1, 0: "arg0" }',
+ '"", emptyIterableObject',
+ '"", singleItemIterableObject',
'"", null, null',
'"", null, undefined',
'"", null, function(){}',
@@ -35,6 +46,8 @@ var expectException = [
'"", 0',
'"", ""',
'"", { }',
+ '"", { length: 0 }',
+ '"", { length: 1, 0: "arg0" }',
'"", null, 0',
'"", null, ""',
'"", null, { }',

Powered by Google App Engine
This is Rietveld 408576698