|
3 | 3 | <head>
|
4 | 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
5 | 5 | <title>Original</title>
|
| 6 | + <!-- Note the timeouts in the functions are chosen such they constitute |
| 7 | + a set with distinct subset sums. That is is a combination of any two |
| 8 | + or more were to be executed the total time for that distinct combination |
| 9 | + would be unique. This was done so we could do a ALL/AND/OR type of test |
| 10 | + and know that with the combination of expected conditions the execution |
| 11 | + was successful as the unique time took place. --> |
| 12 | + <!-- The set we are using is {6,9,11,12,13} --> |
| 13 | + <!-- (could also use {3,5,6,7} which would reduce total time)--> |
6 | 14 | <script type="text/javascript">
|
7 | 15 | function add_content(target_container, content) {
|
8 | 16 | p = document.createElement('p');
|
|
28 | 36 | document.title='Delayed';
|
29 | 37 | },600);
|
30 | 38 | }
|
| 39 | + |
| 40 | + function delayed_add_element() { |
| 41 | + setTimeout(function(){ |
| 42 | + const newElem = document.createElement("input"); |
| 43 | + newElem.setAttribute("type", "button"); |
| 44 | + newElem.setAttribute("id", "added_btn"); |
| 45 | + newElem.setAttribute("value", "Added Button"); |
| 46 | + const container = document.getElementById("container"); |
| 47 | + document.body.insertBefore(newElem, container); |
| 48 | + },1100); |
| 49 | + } |
31 | 50 | </script>
|
32 | 51 | </head>
|
33 | 52 | <body>
|
34 | 53 | <a href="javascript:return false;" onclick="document.title='Changed'; return false;">change title</a><br/>
|
35 | 54 | <a href="javascript:return false;" onclick="delayed_title_change(); return false;">delayed change title</a><br/>
|
| 55 | + <a href="javascript:return false;" onclick="delayed_add_element(); return fales;">delayed add element</a><br/> |
36 | 56 | <a href="javascript:return false;" onclick="add_content('target', 'added content'); return false;">add content</a><br/>
|
37 | 57 | <a id="unicode" href="javascript:return false;" onclick="document.title='äää'; return false;">title to ääää</a><br/>
|
38 | 58 | <p>
|
|
56 | 76 | <input type=button id=enabledDisabledBtn value="Disabled"
|
57 | 77 | disabled />
|
58 | 78 | </p>
|
| 79 | + <p> |
| 80 | + <div id="container"></div> |
| 81 | + </p> |
59 | 82 | <p>
|
60 | 83 | <form name=titleChanger>
|
61 | 84 | <td>
|
|
0 commit comments