Index: third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html |
diff --git a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html |
index 58cbb5de86dd2917d9bac478527b387725c9605f..3caf6e0543c46182c722c6e673fdf3b1c34aa7ae 100644 |
--- a/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html |
+++ b/third_party/WebKit/LayoutTests/battery-status/detached-no-crash.html |
@@ -18,15 +18,8 @@ |
w.close(); |
w = null; |
} else if (event.data == "closed") { |
- nav.getBattery().then(battery => { |
- assert_unreachable('getBattery should reject on a closed window'); |
- }) |
- .catch(error => { |
- // DOMException.SECURITY_ERR = 18. |
- debug('Error Code is ' + error.code); |
- assert_equals(error.code, DOMException.SECURITY_ERR); |
- }); |
- setTimeout(finishJSTest, 0); |
+ shouldBeUndefined("nav.getBattery()"); |
+ finishJSTest(); |
} |
} |