Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / show-context-menu-on-mouse-up.html
blob9b5f04fdb72ec1d6d07fe34d6827dd83a32307fa
1 <!DOCTYPE html>
2 <div id="region" style="width:100px; height:100px; position:absolute; left:0px; top:0px;"></div>
3 <script src="../../resources/js-test.js"></script>
4 <script>
6 var eventLog = "";
8 function appendEventLog(e)
10 if (!window.eventSender)
11 return;
13 if (eventLog != "")
14 eventLog += " ";
16 eventLog += e.type;
19 function clearEventLog()
21 eventLog = "";
24 function testEvents(settingFlag, expectedString)
26 internals.settings.setShowContextMenuOnMouseUp(settingFlag);
27 debug("setShowContextMenuOnMouseUp setting = " + settingFlag);
28 if (window.eventSender) {
29 eventSender.mouseMoveTo(50, 50);
30 eventSender.mouseDown(2);
31 eventSender.mouseUp(2);
33 shouldBeEqualToString("eventLog", expectedString);
34 debug("");
35 clearEventLog();
38 var region = document.getElementById("region");
40 region.addEventListener("mousedown", appendEventLog, false);
41 region.addEventListener("mouseup", appendEventLog, false);
42 region.addEventListener("contextmenu", appendEventLog, false);
44 testEvents(false, "mousedown contextmenu mouseup");
45 testEvents(true, "mousedown mouseup contextmenu");
47 </script>