|
| 1 | +<html> |
| 2 | + <head><title>OSR Test</title></head> |
| 3 | + <style> |
| 4 | + .red_hover:hover {color:red;} |
| 5 | + #li { width: 530px; } |
| 6 | + body {background:rgba(255, 0, 0, 0.5); } |
| 7 | + input {-webkit-appearance: none; } |
| 8 | + #LI11select {width: 75px;} |
| 9 | + </style> |
| 10 | + <script> |
| 11 | + function sendBrowserMessage(paramString) { |
| 12 | + app.sendMessage("osrtest", [paramString]); |
| 13 | + } |
| 14 | + |
| 15 | + function getElement(id) { return document.getElementById(id); } |
| 16 | + function makeH1Red() { getElement('LI00').style.color='red'; } |
| 17 | + function makeH1Black() { getElement('LI00').style.color='black'; } |
| 18 | + function navigate() { location.href='?k='+getElement('editbox').value; } |
| 19 | + function load() { var select = document.getElementById('LI11select'); |
| 20 | + for (var i = 1; i < 21; i++) |
| 21 | + select.options.add(new Option('Option ' + i, i)); |
| 22 | + } |
| 23 | + |
| 24 | + function onEventTest(event) { |
| 25 | + var param = event.type; |
| 26 | + |
| 27 | + if (event.type == "click") |
| 28 | + param += event.button; |
| 29 | + |
| 30 | + sendBrowserMessage(param); |
| 31 | + } |
| 32 | + |
| 33 | + </script> |
| 34 | + <body onfocus='onEventTest(event)' onblur='onEventTest(event)' onload='load();'> |
| 35 | + <h1 id='LI00' onclick="onEventTest(event)"> |
| 36 | + OSR Testing h1 - Focus and blur |
| 37 | + <select id='LI11select'> |
| 38 | + <option value='0'>Default</option> |
| 39 | + </select> |
| 40 | + this page and will get this red black |
| 41 | + </h1> |
| 42 | + <ol> |
| 43 | + <li id='LI01'>OnPaint should be called each time a page loads</li> |
| 44 | + <li id='LI02' style='cursor:pointer;'><span>Move mouse |
| 45 | + to require an OnCursorChange call</span></li> |
| 46 | + <li id='LI03' onmousemove="onEventTest(event)"><span>Hover will color this with |
| 47 | + red. Will trigger OnPaint once on enter and once on leave</span></li> |
| 48 | + <li id='LI04'>Right clicking will show contextual menu and will request |
| 49 | + GetScreenPoint</li> |
| 50 | + <li id='LI05'>IsWindowRenderingDisabled should be true</li> |
| 51 | + <li id='LI06'>WasResized should trigger full repaint if size changes. |
| 52 | + </li> |
| 53 | + <li id='LI07'>Invalidate should trigger OnPaint once</li> |
| 54 | + <li id='LI08'>Click and write here with SendKeyEvent to trigger repaints: |
| 55 | + <input id='editbox' type='text' value='' size="5"></li> |
| 56 | + <li id='LI09'>Click here with SendMouseClickEvent to navigate: |
| 57 | + <input id='btnnavigate' type='button' onclick='navigate()' |
| 58 | + value='Click here to navigate' id='editbox' /></li> |
| 59 | + <li id='LI10' title='EXPECTED_TOOLTIP'>Mouse over this element will |
| 60 | + trigger show a tooltip</li> |
| 61 | + </ol> |
| 62 | + <br /> |
| 63 | + <br /> |
| 64 | + <br /> |
| 65 | + <br /> |
| 66 | + <br /> |
| 67 | + <br /> |
| 68 | + </body> |
| 69 | +</html> |
0 commit comments