forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@ed94c51f3dfaa5ff4c9c311add1a560408059c51
Using update-w3c-deps in Chromium 0a94e31. * Skip new directories; secure-contexts/ and webauthn/ * Import common directories; common/ and images/ BUG=360762, 498120 Review-Url: https://codereview.chromium.org/2015623004 Cr-Commit-Position: refs/heads/master@{#396127}
- Loading branch information
1 parent
5b3fc4b
commit fa4dc03
Showing
206 changed files
with
4,825 additions
and
1,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
third_party/WebKit/LayoutTests/imported/wpt/FileAPI/url/url_xmlhttprequest-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
This is a testharness.js-based test. | ||
FAIL FileAPI Test: Creating Blob URL via XMLHttpRequest Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. | ||
FAIL FileAPI Test: Creating Blob URL via XMLHttpRequest assert_equals: The status is 200 expected 200 but got 0 | ||
Harness: the test ran to completion. | ||
|
45 changes: 45 additions & 0 deletions
45
third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_index8.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<title>IDBCursor.update() - index - throw InvalidStateError when the cursor is being iterated</title> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="https://www.w3.org/TR/IndexedDB/#widl-IDBCursor-update-IDBRequest-any-value"> | ||
<script src="../../../resources/testharness.js"></script> | ||
<script src="../../../resources/testharnessreport.js"></script> | ||
<script src="support.js"></script> | ||
<div id="log"></div> | ||
<script> | ||
var db, | ||
t = async_test(), | ||
records = [ { pKey: "primaryKey_0", iKey: "indexKey_0" }, | ||
{ pKey: "primaryKey_1", iKey: "indexKey_1" } ]; | ||
|
||
var open_rq = createdb(t); | ||
open_rq.onupgradeneeded = function(e) { | ||
db = e.target.result; | ||
|
||
var objStore = db.createObjectStore("store", { keyPath: "pKey" }); | ||
objStore.createIndex("index", "iKey"); | ||
|
||
for (var i = 0; i < records.length; i++) | ||
objStore.add(records[i]); | ||
}; | ||
|
||
open_rq.onsuccess = function(e) { | ||
var cursor_rq = db.transaction("store", "readwrite") | ||
.objectStore("store") | ||
.index("index") | ||
.openCursor(); | ||
|
||
cursor_rq.onsuccess = t.step_func(function(e) { | ||
var cursor = e.target.result; | ||
assert_true(cursor instanceof IDBCursor, "cursor exists"); | ||
|
||
cursor.continue(); | ||
assert_throws("InvalidStateError", function() { | ||
cursor.update({ pKey: "primaryKey_0", iKey: "indexKey_0_updated" }); | ||
}); | ||
|
||
t.done(); | ||
}); | ||
} | ||
</script> | ||
|
45 changes: 45 additions & 0 deletions
45
third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/idbcursor_update_objectstore9.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>IDBCursor.update() - object store - throw InvalidStateError when the cursor is being iterated</title> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="https://www.w3.org/TR/IndexedDB/#widl-IDBCursor-update-IDBRequest-any-value"> | ||
<script src="../../../resources/testharness.js"></script> | ||
<script src="../../../resources/testharnessreport.js"></script> | ||
<script src="support.js"></script> | ||
<div id="log"></div> | ||
<script> | ||
var db, | ||
t = async_test(), | ||
records = [{ pKey: "primaryKey_0", value: "value_0" }, | ||
{ pKey: "primaryKey_1", value: "value_1" }]; | ||
|
||
var open_rq = createdb(t); | ||
open_rq.onupgradeneeded = function (event) { | ||
db = event.target.result; | ||
|
||
var objStore = db.createObjectStore("store", {keyPath : "pKey"}); | ||
|
||
for (var i = 0; i < records.length; i++) { | ||
objStore.add(records[i]); | ||
} | ||
} | ||
|
||
open_rq.onsuccess = function(e) { | ||
var cursor_rq = db.transaction("store", "readwrite") | ||
.objectStore("store") | ||
.openCursor(); | ||
|
||
cursor_rq.onsuccess = t.step_func(function(event) { | ||
var cursor = event.target.result; | ||
assert_true(cursor instanceof IDBCursor, "cursor exists"); | ||
|
||
cursor.continue(); | ||
assert_throws("InvalidStateError", function() { | ||
cursor.update({ pKey: "primaryKey_0", value: "value_0_updated" }); | ||
}); | ||
|
||
t.done(); | ||
}); | ||
} | ||
</script> | ||
|
9 changes: 9 additions & 0 deletions
9
...outTests/imported/wpt/IndexedDB/idbobjectstore_createIndex14-exception_order-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
This is a testharness.js-based test. | ||
PASS InvalidStateError(Incorrect mode) vs. TransactionInactiveError | ||
PASS InvalidStateError(Deleted ObjectStore) vs. TransactionInactiveError | ||
PASS TransactionInactiveError vs. ConstraintError | ||
FAIL ConstraintError vs. SyntaxError assert_throws: Index name check should precede syntax check of the key path function "function () { | ||
store.createIndex("index", "inv..." threw object "SyntaxError: Failed to execute 'createIndex' on 'IDBObjec..." that is not a DOMException ConstraintError: property "code" is equal to 12, expected 0 | ||
PASS SyntaxError vs. InvalidAccessError | ||
Harness: the test ran to completion. | ||
|
105 changes: 105 additions & 0 deletions
105
...ebKit/LayoutTests/imported/wpt/IndexedDB/idbobjectstore_createIndex14-exception_order.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<!DOCTYPE html> | ||
<title>IndexedDB: Exception Order of IDBObjectStore.createIndex()</title> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="http://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex"> | ||
<script src="../../../resources/testharness.js"></script> | ||
<script src="../../../resources/testharnessreport.js"></script> | ||
<script> | ||
|
||
function indexeddb_test(description, upgrade_func, open_func = null) { | ||
async_test(function(t) { | ||
var dbname = document.location + "-" + t.name; | ||
var del = indexedDB.deleteDatabase(dbname); | ||
del.onerror = t.unreached_func("deleteDatabase should succeed"); | ||
var open = indexedDB.open(dbname, 1); | ||
open.onerror = t.unreached_func("open should succeed"); | ||
open.onupgradeneeded = t.step_func(function() { | ||
var db = open.result; | ||
var tx = open.transaction; | ||
upgrade_func(t, db, tx); | ||
}); | ||
if (open_func) { | ||
open.onsuccess = t.step_func(function() { | ||
var db = open.result; | ||
open_func(t, db); | ||
}); | ||
} | ||
}, description); | ||
} | ||
|
||
indexeddb_test( | ||
"InvalidStateError(Incorrect mode) vs. TransactionInactiveError", | ||
function(t, db, txn) { | ||
var store = db.createObjectStore("s"); | ||
}, | ||
function(t, db) { | ||
var txn = db.transaction("s"); | ||
var store = txn.objectStore("s"); | ||
txn.oncomplete = function() { | ||
assert_throws("InvalidStateError", function() { | ||
store.createIndex("index", "foo"); | ||
}, "Mode check should precede state check of the transaction"); | ||
t.done(); | ||
}; | ||
} | ||
); | ||
|
||
var gDeletedObjectStore; | ||
indexeddb_test( | ||
"InvalidStateError(Deleted ObjectStore) vs. TransactionInactiveError", | ||
function(t, db, txn) { | ||
gDeletedObjectStore = db.createObjectStore("s"); | ||
db.deleteObjectStore("s"); | ||
txn.oncomplete = function() { | ||
assert_throws("InvalidStateError", function() { | ||
gDeletedObjectStore.createIndex("index", "foo"); | ||
}, "Deletion check should precede transaction-state check"); | ||
t.done(); | ||
}; | ||
} | ||
); | ||
|
||
indexeddb_test( | ||
"TransactionInactiveError vs. ConstraintError", | ||
function(t, db, txn) { | ||
var store = db.createObjectStore("s"); | ||
store.createIndex("index", "foo"); | ||
txn.oncomplete = function() { | ||
assert_throws("TransactionInactiveError", function() { | ||
store.createIndex("index", "foo"); | ||
}, "Transaction-state check should precede index name check"); | ||
t.done(); | ||
}; | ||
} | ||
); | ||
|
||
indexeddb_test( | ||
"ConstraintError vs. SyntaxError", | ||
function(t, db) { | ||
var store = db.createObjectStore("s"); | ||
store.createIndex("index", "foo"); | ||
assert_throws("ConstraintError", function() { | ||
store.createIndex("index", "invalid key path"); | ||
}, "Index name check should precede syntax check of the key path"); | ||
assert_throws("ConstraintError", function() { | ||
store.createIndex("index", | ||
["invalid key path 1", "invalid key path 2"]); | ||
}, "Index name check should precede syntax check of the key path"); | ||
t.done(); | ||
} | ||
); | ||
|
||
indexeddb_test( | ||
"SyntaxError vs. InvalidAccessError", | ||
function(t, db) { | ||
var store = db.createObjectStore("s"); | ||
assert_throws("SyntaxError", function() { | ||
store.createIndex("index", | ||
["invalid key path 1", "invalid key path 2"], | ||
{ multiEntry: true }); | ||
}, "Syntax check should precede multiEntry check of the key path"); | ||
t.done(); | ||
} | ||
); | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.