tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test-case-live-event-5.html (2104B)


      1 <!DOCTYPE html> 
      2 <html>
      3  <head>
      4    <title>ARIA 1.0 Live Region Event Test Case: Change text content (LOG role)</title>
      5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      6    <style>
      7      div#TEST_ID {
      8        margin: 0.5em; 
      9        padding: 0.25em; 
     10        border: medium gray solid; 
     11        width: 20em;
     12      } 
     13    </style>  
     14  </head>
     15  <body>
     16    <h1>ARIA 1.0 Live Region Event Test Case: Change text content (LOG role)</h1>
     17    
     18    <div id="TEST_ID" role="log">
     19      LOG ROLE TEST TEXT 1
     20    </div>
     21    
     22    <button onclick="tryAgain()">Try Again</button>
     23    
     24    <h2>Description</h2>
     25    <p>An element with an role attribute with the value "log" has a text content changed
     26    1.5 seconds after the document is loaded.</p>
     27    
     28    <h2>Expected Results</h2>
     29    
     30    <dl>
     31      <dt>ATK/AT-SPI</dt>
     32      <dd>ATK/AT-SPIevent: text_changed::delete event followed by text_changed::insert event</dd>
     33      
     34      <dt>AXAPI</dt>
     35      <dd></dd>
     36      <dd>AXLiveRegionChanged notification</dd>
     37      
     38      <dt>MSAA + IAccessible2</dt>
     39      <dd>IAccessible2: IA2_EVENT_TEXT_REMOVED event followed by IA2_EVENT_TEXT_INSERTED event</dd>
     40      
     41      <dt>MSAA + UIA Express</dt>
     42      <dd>TextPattern..::.TextChangedEvent event followed by another TextPattern..::.TextChangedEvent event</dd>
     43      
     44    </dl>
     45    
     46    
     47    <script>  
     48 
     49      function tryAgain() {
     50        changeText('LOG ROLE TEST TEXT 1')
     51        onLoad();        
     52      }  
     53 
     54      function changeText(str) {
     55        var node = document.getElementById('TEST_ID');  
     56        while (node.firstChild) node.removeChild(node.firstChild);
     57 
     58        if (typeof str !== 'string') str = 'log role changed test text 2';
     59        addText(str)
     60      }  
     61 
     62      function addText (str) {
     63        var node = document.getElementById('TEST_ID');          
     64        var text_node = document.createTextNode(str);        
     65        node.appendChild(text_node);
     66      }  
     67 
     68      function onLoad() {
     69        setTimeout(changeText,1500);       
     70      }
     71 
     72      window.addEventListener('load', onLoad);
     73    </script>
     74  </body>
     75  
     76 </html>