Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / screen_orientation / screenorientation-detached-notify-no-crash.html
blob087f4898a6adc6b6bc5e22119fdc8035f922261d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <iframe id=testIframe></iframe>
7 <script>
8 var notifyTest = async_test("Test that async event dispatch to detached frame is gracefully handled.");
10 function changeOrientationAndDetach() {
11 // Dispatch an orientationchange event; this is handled asynchronously,
12 // queueing a task/timer to do the actual dispatch.
13 window.testRunner.setMockScreenOrientation('portrait-secondary');
15 // Detach the iframe while the event dispatch is in-flight. If
16 // the screen orientation controller is finalized during the
17 // detach, the async event dispatch just after will be treated
18 // like a no-op -- there's no controller to handle the dispatch.
19 document.body.removeChild(testIframe);
20 setTimeout(function () { notifyTest.done(); }, 0);
22 notifyTest.step(function () {
23 // Force the creation of a ScreenOrientation and register it
24 // with the controller, so that orientationchange events are sent.
25 var currentType = window.screen.orientation.type;
26 testIframe.src = "resources/iframe-listen-orientation-change-detach.html";
27 });
28 </script>
29 </body>
30 </html>