Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / battery-status / detached-no-crash.html
blob3caf6e0543c46182c722c6e673fdf3b1c34aa7ae
1 <!DOCTYPE HTML>
2 <body>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <script>
7 description("Accessing navigator.getBattery() on a closed window.");
9 window.jsTestIsAsync = true;
11 var w;
12 var nav;
14 function processMessage(event) {
15 if (event.data == "opened") {
16 nav = w.navigator;
17 shouldBeTrue("typeof(nav.getBattery()) == 'object'");
18 w.close();
19 w = null;
20 } else if (event.data == "closed") {
21 shouldBeUndefined("nav.getBattery()");
22 finishJSTest();
26 if (window.testRunner) {
27 testRunner.dumpAsText();
28 testRunner.setCanOpenWindows();
30 w = window.open('../resources/window-postmessage-open-close.html');
31 window.addEventListener("message", processMessage, false);
32 </script>
33 </body>