|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <title>RUM Integ Test</title> |
| 5 | + <script src="./loader_dom_event_mutation_observer_enabled.js"></script> |
| 6 | + <link |
| 7 | + rel="icon" |
| 8 | + type="image/png" |
| 9 | + href="https://awsmedia.s3.amazonaws.com/favicon.ico" |
| 10 | + /> |
| 11 | + |
| 12 | + <script> |
| 13 | + // Common to all test pages |
| 14 | + function dispatch() { |
| 15 | + cwr('dispatch'); |
| 16 | + } |
| 17 | + |
| 18 | + function clearRequestResponse() { |
| 19 | + document.getElementById('request_url').innerText = ''; |
| 20 | + document.getElementById('request_header').innerText = ''; |
| 21 | + document.getElementById('request_body').innerText = ''; |
| 22 | + |
| 23 | + document.getElementById('response_status').innerText = ''; |
| 24 | + document.getElementById('response_header').innerText = ''; |
| 25 | + document.getElementById('response_body').innerText = ''; |
| 26 | + } |
| 27 | + |
| 28 | + // Specific to DOM Event plugin |
| 29 | + function disable() { |
| 30 | + cwr('disable'); |
| 31 | + } |
| 32 | + |
| 33 | + function enable() { |
| 34 | + cwr('enable'); |
| 35 | + } |
| 36 | + |
| 37 | + function dynamicallyCreateButton() { |
| 38 | + const parentButton = document.getElementById( |
| 39 | + 'dynamicallyCreateButton' |
| 40 | + ); |
| 41 | + const newButton = document.createElement('button'); |
| 42 | + newButton.innerHTML = 'Button Four'; |
| 43 | + newButton.id = 'button4'; |
| 44 | + newButton.setAttribute('label', 'label1'); |
| 45 | + parentButton.insertAdjacentElement('afterend', newButton); |
| 46 | + } |
| 47 | + |
| 48 | + function registerDomEvents() { |
| 49 | + cwr('registerDomEvents', [ |
| 50 | + { event: 'click', cssLocator: '[label="label2"]' } |
| 51 | + ]); |
| 52 | + } |
| 53 | + </script> |
| 54 | + |
| 55 | + <style> |
| 56 | + table { |
| 57 | + border-collapse: collapse; |
| 58 | + margin-top: 10px; |
| 59 | + margin-bottom: 10px; |
| 60 | + } |
| 61 | + |
| 62 | + td, |
| 63 | + th { |
| 64 | + border: 1px solid black; |
| 65 | + text-align: left; |
| 66 | + padding: 8px; |
| 67 | + } |
| 68 | + </style> |
| 69 | + </head> |
| 70 | + <body> |
| 71 | + <p id="welcome">This application is used for RUM integ testing.</p> |
| 72 | + <hr /> |
| 73 | + <button id="disable" onclick="disable()">Disable</button> |
| 74 | + <button id="enable" onclick="enable()">Enable</button> |
| 75 | + <hr /> |
| 76 | + <button id="button1">Button One</button> |
| 77 | + <a> Link One </a> |
| 78 | + <hr /> |
| 79 | + <button id="button2" label="label1">Button Two</button> |
| 80 | + <button id="button3" label="label1">Button Three</button> |
| 81 | + <hr /> |
| 82 | + <button |
| 83 | + id="dynamicallyCreateButton" |
| 84 | + onclick="dynamicallyCreateButton()" |
| 85 | + > |
| 86 | + Add Button |
| 87 | + </button> |
| 88 | + <button id="registerDomEvents" onclick="registerDomEvents()"> |
| 89 | + Update Plugin |
| 90 | + </button> |
| 91 | + <button id="button5" label="label2">Button Five</button> |
| 92 | + <hr /> |
| 93 | + <button id="dispatch" onclick="dispatch()">Dispatch</button> |
| 94 | + <button id="clearRequestResponse" onclick="clearRequestResponse()"> |
| 95 | + Clear |
| 96 | + </button> |
| 97 | + <hr /> |
| 98 | + <span id="request"></span> |
| 99 | + <span id="response"></span> |
| 100 | + <table> |
| 101 | + <tr> |
| 102 | + <td>Request URL</td> |
| 103 | + <td id="request_url"></td> |
| 104 | + </tr> |
| 105 | + <tr> |
| 106 | + <td>Request Header</td> |
| 107 | + <td id="request_header"></td> |
| 108 | + </tr> |
| 109 | + <tr> |
| 110 | + <td>Request Body</td> |
| 111 | + <td id="request_body"></td> |
| 112 | + </tr> |
| 113 | + </table> |
| 114 | + <table> |
| 115 | + <tr> |
| 116 | + <td>Response Status Code</td> |
| 117 | + <td id="response_status"></td> |
| 118 | + </tr> |
| 119 | + <tr> |
| 120 | + <td>Response Header</td> |
| 121 | + <td id="response_header"></td> |
| 122 | + </tr> |
| 123 | + <tr> |
| 124 | + <td>Response Body</td> |
| 125 | + <td id="response_body"></td> |
| 126 | + </tr> |
| 127 | + </table> |
| 128 | + </body> |
| 129 | +</html> |
0 commit comments