Skip to content

Commit

Permalink
Fix and re-enable web tests affected by Error structured cloning
Browse files Browse the repository at this point in the history
Fix tests and expectations for Error structured cloning

Spec: whatwg/html#4665
Intent-to-Ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/f8JngIi8qYs

Bug: 970079
Change-Id: I5f3eb0c5f1a2aee11f1ec668bd9bfe1e0f6ace2e
  • Loading branch information
yutakahirano authored and chromium-wpt-export-bot committed Jul 18, 2019
1 parent 375e9b6 commit 5c80d51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion animation-worklet/stateful-animator.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
effect.localTime = this.test_local_time++;
}
state() {
return new Error('foo');
return new Symbol('foo');
}
});
</script>
Expand Down
7 changes: 3 additions & 4 deletions html/browsers/history/the-history-interface/001.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,10 @@
}, 'pushState must not be able to use a DOM node as data');
test(function () {
try { a.b = c; } catch(errdata) {
assert_throws( 'DATA_CLONE_ERR', function () {
history.pushState({dummy:errdata},'');
} );
history.pushState({dummy:errdata},'');
assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy));
}
}, 'pushState must not be able to use an error object as data');
}, 'pushState must be able to use an error object as data');
test(function () {
assert_throws( 'DATA_CLONE_ERR', function () {
iframe.contentWindow.history.pushState(document,'');
Expand Down
7 changes: 3 additions & 4 deletions html/browsers/history/the-history-interface/002.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@
}, 'replaceState must not be able to use a DOM node as data');
test(function () {
try { a.b = c; } catch(errdata) {
assert_throws( 'DATA_CLONE_ERR', function () {
history.replaceState({dummy:errdata},'');
} );
history.replaceState({dummy:errdata},'');
assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy));
}
}, 'replaceState must not be able to use an error object as data');
}, 'replaceState must be able to use an error object as data');
test(function () {
assert_throws( 'DATA_CLONE_ERR', function () {
iframe.contentWindow.history.replaceState(document,'');
Expand Down

0 comments on commit 5c80d51

Please sign in to comment.