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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 years, 7 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/bluetooth/requestDevice-matches-a-filter.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
index f250aa84d7777e7b2aa385a41ec9f1ccdfa8eb53..1060c73d79227c4d95893a4961cec186f9b2c424 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice-matches-a-filter.html
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
-<script src="../resources/testharness-helpers.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
@@ -60,11 +59,11 @@ let non_matching_namePrefix = 'Some';
namePrefix: matching_namePrefix
}]
}].forEach(args => {
- promise_test(() => {
+ promise_test(t => {
return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
- .then(() => assert_promise_rejects(
- requestDeviceWithKeyDown(args),
- new DOMException('', 'NotFoundError')));
+ .then(() => promise_rejects(t,
+ 'NotFoundError',
+ requestDeviceWithKeyDown(args)));
}, 'If at least one filter doesn\'t match the promise must reject.');
});
@@ -96,11 +95,11 @@ let non_matching_namePrefix = 'Some';
namePrefix: non_matching_namePrefix
}]
}].forEach(args => {
- promise_test(() => {
+ promise_test(t => {
return setBluetoothFakeAdapter('GlucoseHeartRateAdapter')
- .then(() => assert_promise_rejects(
- requestDeviceWithKeyDown(args),
- new DOMException('', 'NotFoundError')));
+ .then(() => promise_rejects(t,
+ 'NotFoundError',
+ requestDeviceWithKeyDown(args)));
}, 'If a present filter\'s member doesn\'t match the device, ' +
'the device doesn\'t match the filter.');
});

Powered by Google App Engine
This is Rietveld 408576698