| <html> |
| <head> |
| <script src="resources/document-location.js"></script> |
| <script> |
| function runTest() { |
| // Simulate clicking the Navigate button. |
| var button = document.getElementById("navigate"); |
| var x = button.offsetLeft + button.offsetWidth / 2; |
| var y = button.offsetTop + button.offsetHeight / 2; |
| eventSender.mouseMoveTo(x, y); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| } |
| </script> |
| </head> |
| <body onload="start()"> |
| This tests that assigning to document.location from a timeout in a button click |
| adds a back/forward item. |
| <button onclick="setTimeout('setLocation()', 0)" id="navigate">Navigate</button> |
| </body> |
| </html> |