Skip to content

Commit

Permalink
Import wpt@ed94c51f3dfaa5ff4c9c311add1a560408059c51
Browse files Browse the repository at this point in the history
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
tkent-google authored and Commit bot committed May 26, 2016
1 parent 5b3fc4b commit fa4dc03
Show file tree
Hide file tree
Showing 206 changed files with 4,825 additions and 1,523 deletions.
3 changes: 3 additions & 0 deletions third_party/WebKit/LayoutTests/NeverFixTests
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ imported/csswg-test/css21/linebox/line-height-126.xht [ WontFix ]
[ Mac ] imported/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html [ WontFix ]
[ Mac ] imported/wpt/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html [ WontFix ]

# SVG files in the directory are not tests.
imported/wpt/images/ [ WontFix ]

# We could fix this test for us and upstream it if the test shell user agent
# would let us differentiate test_shell and WebKit DumpTreeNode.
crbug.com/7482 [ Win Mac ] http/tests/misc/timer-vs-loading.html [ WontFix ]
Expand Down
12 changes: 6 additions & 6 deletions third_party/WebKit/LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1296,13 +1296,13 @@ crbug.com/600261 imported/wpt/mediacapture-streams/MediaStream-MediaElement-srcO

crbug.com/605525 [ Win ] http/tests/xmlhttprequest/redirect-cross-origin-post.html [ Failure Pass ]

crbug.com/603703 [ Linux Mac ] imported/wpt/web-animations/animation-timeline/document-timeline.html [ Failure Pass ]
crbug.com/603703 [ Linux Mac ] imported/wpt/web-animations/interfaces/AnimationTimeline/document-timeline.html [ Failure Pass ]

crbug.com/600248 imported/wpt/web-animations/animation-effect-timing/endDelay.html [ Failure ]
crbug.com/600248 imported/wpt/web-animations/animation/constructor.html [ Failure Timeout ]
crbug.com/600248 imported/wpt/web-animations/animation/finished.html [ Pass Failure ]
crbug.com/600248 imported/wpt/web-animations/animation/oncancel.html [ Pass Failure ]
crbug.com/600248 imported/wpt/web-animations/animation/onfinish.html [ Pass Failure ]
crbug.com/600248 imported/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay.html [ Failure ]
crbug.com/600248 imported/wpt/web-animations/interfaces/Animation/constructor.html [ Failure Timeout ]
crbug.com/600248 imported/wpt/web-animations/interfaces/Animation/finished.html [ Pass Failure ]
crbug.com/600248 imported/wpt/web-animations/interfaces/Animation/oncancel.html [ Pass Failure ]
crbug.com/600248 imported/wpt/web-animations/interfaces/Animation/onfinish.html [ Pass Failure ]

crbug.com/611658 [ Win7 ] fast/forms/text/text-font-height-mismatch.html [ Failure ]
crbug.com/611658 [ Win7 ] fast/text/emphasis-combined-text.html [ Failure ]
Expand Down
25 changes: 22 additions & 3 deletions third_party/WebKit/LayoutTests/W3CImportExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ imported/wpt/ambient-light [ Skip ]
imported/wpt/animation-timing [ Skip ]
imported/wpt/app-uri [ Skip ]
imported/wpt/battery-status [ Skip ]
imported/wpt/common [ Skip ]
## Owners: none; No tests in the directory.
# imported/wpt/common [ Pass ]
imported/wpt/compat [ Skip ]
imported/wpt/config.default.json [ Skip ]
imported/wpt/conformance-checkers [ Skip ]
Expand Down Expand Up @@ -234,7 +235,8 @@ imported/wpt/geolocation-API [ Skip ]
imported/wpt/html-longdesc [ Skip ]
imported/wpt/html-media-capture [ Skip ]
imported/wpt/http [ Skip ]
imported/wpt/images [ Skip ]
## Owners: none; No tests in the directory.
# imported/wpt/images [ Pass ]
imported/wpt/infrastructure [ Skip ]
imported/wpt/innerText [ Skip ]
imported/wpt/js [ Skip ]
Expand Down Expand Up @@ -271,6 +273,7 @@ imported/wpt/resources/examples [ Skip ]
imported/wpt/resources/webidl2/README.md [ Skip ]
imported/wpt/resources/webidl2/test [ Skip ]
imported/wpt/screen-orientation [ Skip ]
imported/wpt/secure-contexts [ Skip ]
imported/wpt/selection [ Skip ]
imported/wpt/selectors [ Skip ]
imported/wpt/selectors-api [ Skip ]
Expand All @@ -297,6 +300,7 @@ imported/wpt/vibration [ Skip ]
## Owners: suzyh@chromium.org
# imported/wpt/web-animations [ Pass ]
imported/wpt/webaudio [ Skip ]
imported/wpt/webauthn [ Skip ]
imported/wpt/webdriver [ Skip ]
imported/wpt/webgl [ Skip ]
imported/wpt/webmessaging [ Skip ]
Expand All @@ -310,10 +314,12 @@ imported/wpt/workers [ Skip ]

# Skip OWNERS files in web-platform-tests. crbug.com/584660
imported/wpt/user-timing/OWNERS [ Skip ]
imported/wpt/common/OWNERS [ Skip ]
imported/wpt/custom-elements/OWNERS [ Skip ]
imported/wpt/gamepad/OWNERS [ Skip ]
imported/wpt/FileAPI/OWNERS [ Skip ]
imported/wpt/html/OWNERS [ Skip ]
imported/wpt/images/OWNERS [ Skip ]
imported/wpt/webrtc/OWNERS [ Skip ]
imported/wpt/html-imports/OWNERS [ Skip ]
imported/wpt/IndexedDB/OWNERS [ Skip ]
Expand All @@ -324,6 +330,7 @@ imported/wpt/hr-time/OWNERS [ Skip ]
imported/wpt/pointerevents/OWNERS [ Skip ]
imported/wpt/webstorage/OWNERS [ Skip ]
imported/wpt/mediacapture-streams/OWNERS [ Skip ]
imported/wpt/media/OWNERS [ Skip ]
imported/wpt/touch-events/OWNERS [ Skip ]
imported/wpt/uievents/OWNERS [ Skip ]
imported/wpt/web-animations/OWNERS [ Skip ]
Expand Down Expand Up @@ -543,6 +550,8 @@ imported/wpt/html/dom/dynamic-markup-insertion/opening-the-input-stream/016.html
imported/wpt/html/dom/dynamic-markup-insertion/opening-the-input-stream/document.open-03.html [ Skip ]
imported/wpt/html/editing/focus/document-level-focus-apis/document-level-apis.html [ Skip ]
imported/wpt/html/semantics/document-metadata/the-base-element/base_multiple.html [ Skip ]
imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html [ Skip ]
imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html [ Skip ]
imported/wpt/html/semantics/embedded-content/the-object-element/object-handler.html [ Skip ]
imported/wpt/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html [ Skip ]
imported/wpt/html/semantics/forms/the-button-element/button-activate.html [ Skip ]
Expand Down Expand Up @@ -580,12 +589,14 @@ imported/wpt/html/editing/the-hidden-attribute/hidden-2.svg [ Skip ]
imported/wpt/html/browsers/the-window-object/security-window/window-security.sub.html [ Skip ]

# crbug.com/493465: Requires the pipe feature of wptserve
imported/wpt/dom/events/EventListener-incumbent-global.sub.html [ Skip ]
imported/wpt/html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html [ Skip ]
imported/wpt/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html [ Skip ]
imported/wpt/html/infrastructure/urls/dynamic-changes-to-base-urls/dynamic-urls.sub.xhtml [ Skip ]
imported/wpt/html/infrastructure/urls/resolving-urls [ Skip ]
imported/wpt/html/infrastructure/urls/terminology-0/multiple-base.sub.html [ Skip ]
imported/wpt/html/semantics/embedded-content/media-elements/track/track-element/cors [ Skip ]
imported/wpt/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html [ Skip ]
imported/wpt/html/semantics/embedded-content/media-elements/track/track-element/cors [ Skip ]

# https://github.com/w3c/web-platform-tests/issues/1862:
# The test doesn't handle ':' after a drive letter in file: URL on Windows.
Expand Down Expand Up @@ -779,3 +790,11 @@ imported/wpt/dom/nodes/MutationObserver-childList.html [ Skip ]

# crbug.com/574461: update-w3c-deps imports .py file with x-bit cleared
imported/wpt/dom/nodes/Document-createElement-namespace-tests/generate.py [ Skip ]

# Untriaged: Test results contain local file paths
imported/wpt/html/semantics/document-metadata/the-base-element/base_about_blank.html [ Skip ]
imported/wpt/html/semantics/document-metadata/the-base-element/base_srcdoc.html [ Skip ]

# Untriaged: Tests don't complete.
imported/wpt/html/semantics/document-metadata/the-style-element/style-error-01.html [ Skip ]
imported/wpt/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html [ Skip ]
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.

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>

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>

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.

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>
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ PASS IDBObjectStore interface object length
PASS IDBObjectStore interface object name
FAIL IDBObjectStore interface: existence and properties of interface prototype object assert_equals: class string of IDBObjectStore.prototype expected "[object IDBObjectStorePrototype]" but got "[object IDBObjectStore]"
PASS IDBObjectStore interface: existence and properties of interface prototype object's "constructor" property
PASS IDBObjectStore interface: attribute name
FAIL IDBObjectStore interface: attribute name assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
PASS IDBObjectStore interface: attribute keyPath
PASS IDBObjectStore interface: attribute indexNames
PASS IDBObjectStore interface: attribute transaction
Expand All @@ -113,7 +113,7 @@ PASS IDBIndex interface object length
PASS IDBIndex interface object name
FAIL IDBIndex interface: existence and properties of interface prototype object assert_equals: class string of IDBIndex.prototype expected "[object IDBIndexPrototype]" but got "[object IDBIndex]"
PASS IDBIndex interface: existence and properties of interface prototype object's "constructor" property
PASS IDBIndex interface: attribute name
FAIL IDBIndex interface: attribute name assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
PASS IDBIndex interface: attribute objectStore
PASS IDBIndex interface: attribute keyPath
PASS IDBIndex interface: attribute multiEntry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ interface IDBDatabase : EventTarget {
};

interface IDBObjectStore {
readonly attribute DOMString name;
attribute DOMString name;
readonly attribute any keyPath;
readonly attribute DOMStringList indexNames;
readonly attribute IDBTransaction transaction;
Expand All @@ -106,7 +106,7 @@ interface IDBObjectStore {
};

interface IDBIndex {
readonly attribute DOMString name;
attribute DOMString name;
readonly attribute IDBObjectStore objectStore;
readonly attribute any keyPath;
readonly attribute boolean multiEntry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ request.onload = function() {
var idls = request.responseText;

idlArray.add_untested_idls("interface WorkerGlobalScope {};");
idlArray.add_untested_idls("interface WorkerUtils {};");
idlArray.add_untested_idls("WorkerGlobalScope implements WorkerUtils;");
idlArray.add_untested_idls("interface Event { };");
idlArray.add_untested_idls("interface EventTarget { };");

// From Indexed DB:
idlArray.add_idls("WorkerUtils implements IDBEnvironment;");
idlArray.add_idls("WorkerGlobalScope implements IDBEnvironment;");
idlArray.add_idls(idls);

idlArray.add_objects({
Expand Down
Loading

0 comments on commit fa4dc03

Please sign in to comment.