Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / loader / navigation-scheduler-user-gesture.html
blobc709df4b0d8269a43f03e28887fc18587b3225c3
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>
5 Check that the NavigationScheduler correctly tracks user gestures.
6 </p>
7 <div id='log'></div>
8 <a href='about:blank' target='_blank'></a>
9 <button>click me</button>
10 <script>
11 if (window.testRunner) {
12 testRunner.dumpAsText();
13 testRunner.waitUntilDone();
14 testRunner.setCanOpenWindows();
15 testRunner.setPopupBlockingEnabled(true);
18 function popup() {
19 // Previously, this made the NavigationController create an additional
20 // user gesture.
21 window.open('javascript:', '_self', '');
22 // Consume one gesture.
23 window.open('about:blank').close();
24 var w = window.open('about:blank');
25 if (w == undefined)
26 document.querySelector('#log').innerText = 'PASS: only one window opened';
27 else
28 document.querySelector('#log').innerText = 'FAIL: could open two windows';
29 if (window.testRunner)
30 testRunner.notifyDone();
33 var button = document.querySelector('button');
34 button.onclick = popup;
36 if (window.testRunner) {
37 eventSender.mouseMoveTo(button.offsetLeft + 2, button.offsetTop + 2);
38 eventSender.mouseDown();
39 eventSender.mouseUp();
41 </script>
42 </body>
43 </html>