Commit 3026c265 authored by Richard Stotz's avatar Richard Stotz Committed by Commit Bot

Make a WPT for renameSync fail if renameSync is not implemented.

As a missing function gives a TypeError, one of the WPTs for renameSync
would pass when renameSync is not implemented, which is
counterintuitive.

Bug: 914488
Change-Id: I4c16cf55723b772b0cba5c5c3acd376165e25591
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310531Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Richard Stotz <rstz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790754}
parent e1d887ae
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
'use strict'; 'use strict';
setup(async () => {
assert_implements(nativeIO.rename,
"nativeIO.rename is not implemented.");
});
promise_test(async testCase => { promise_test(async testCase => {
const file1 = await nativeIO.open('test_file_1'); const file1 = await nativeIO.open('test_file_1');
const file2 = await nativeIO.open('test_file_2'); const file2 = await nativeIO.open('test_file_2');
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
'use strict'; 'use strict';
setup(() => {
// Without this assertion, one test passes even if renameSync is not defined
assert_implements(nativeIO.renameSync,
"nativeIO.renameSync is not implemented.");
});
test(testCase => { test(testCase => {
const file1 = nativeIO.openSync('test_file_1'); const file1 = nativeIO.openSync('test_file_1');
const file2 = nativeIO.openSync('test_file_2'); const file2 = nativeIO.openSync('test_file_2');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment