Index: LayoutTests/bluetooth/resources/bluetooth-helpers.js |
diff --git a/LayoutTests/bluetooth/resources/bluetooth-helpers.js b/LayoutTests/bluetooth/resources/bluetooth-helpers.js |
index a5938a7d889a321abc068052341c1bdf2a175106..064880493c829a79d49516cd89c63e9b8beff53e 100644 |
--- a/LayoutTests/bluetooth/resources/bluetooth-helpers.js |
+++ b/LayoutTests/bluetooth/resources/bluetooth-helpers.js |
@@ -80,6 +80,8 @@ function assert_promise_rejects_with_message(promise, expected, description) { |
assert_unreached('Promise should have rejected: ' + description); |
}, error => { |
assert_equals(error.name, expected.name, 'Unexpected Error Name:'); |
- assert_equals(error.message, expected.message, 'Unexpected Error Message:'); |
+ if (expected.message) { |
+ assert_equals(error.message, expected.message, 'Unexpected Error Message:'); |
+ } |
}); |
} |