| OLD | NEW | 
|   1 <!DOCTYPE html> |   1 <!DOCTYPE html> | 
|   2 <script src="../../../resources/testharness.js"></script> |   2 <script src="../../../resources/testharness.js"></script> | 
|   3 <script src="../../../resources/testharnessreport.js"></script> |   3 <script src="../../../resources/testharnessreport.js"></script> | 
|   4 <script src="resources/shadow-dom.js"></script> |   4 <script src="resources/shadow-dom.js"></script> | 
|   5  |   5  | 
|   6 <input id="input"></input> |   6 <input id="input"></input> | 
|   7 <div id="sandbox"> |   7 <div id="sandbox"> | 
|   8     <div id = "host"> |   8     <div id = "host"> | 
|   9         <template> |   9         <template> | 
|  10             <input id="target" value="test"></div> |  10             <input id="target" value="test"></div> | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
|  27 var input = document.getElementById('input'); |  27 var input = document.getElementById('input'); | 
|  28 async_test(function(t) { |  28 async_test(function(t) { | 
|  29     input.onselect = function(e) { |  29     input.onselect = function(e) { | 
|  30         t.step(function() { assert_true(e.scoped); t.done(); }); |  30         t.step(function() { assert_true(e.scoped); t.done(); }); | 
|  31     }; |  31     }; | 
|  32 }, 'UA select events scoped should be set to true.'); |  32 }, 'UA select events scoped should be set to true.'); | 
|  33 input.select(); |  33 input.select(); | 
|  34  |  34  | 
|  35 var sandbox = document.getElementById('sandbox'); |  35 var sandbox = document.getElementById('sandbox'); | 
|  36 convertTemplatesToShadowRootsWithin(sandbox); |  36 convertTemplatesToShadowRootsWithin(sandbox); | 
|  37 var target = getNodeInTreeOfTrees('host/target'); |  37 var target = getNodeInComposedTree('host/target'); | 
|  38 var host = getNodeInTreeOfTrees('host'); |  38 var host = getNodeInComposedTree('host'); | 
|  39  |  39  | 
|  40 async_test(function(t) { |  40 async_test(function(t) { | 
|  41     target.onselect = function(e) { |  41     target.onselect = function(e) { | 
|  42         t.step(function() { |  42         t.step(function() { | 
|  43             assert_true(e.deepPath().includes(target)); |  43             assert_true(e.deepPath().includes(target)); | 
|  44             assert_false(e.deepPath().includes(host)); |  44             assert_false(e.deepPath().includes(host)); | 
|  45             t.done(); |  45             t.done(); | 
|  46         }); |  46         }); | 
|  47     } |  47     } | 
|  48 }, 'Select events should stop if created by UA.'); |  48 }, 'Select events should stop if created by UA.'); | 
|  49  |  49  | 
|  50 async_test(function(t) { |  50 async_test(function(t) { | 
|  51     target.onerror = function(e) { |  51     target.onerror = function(e) { | 
|  52         t.step(function() { |  52         t.step(function() { | 
|  53             assert_true(e.deepPath().includes(target)); |  53             assert_true(e.deepPath().includes(target)); | 
|  54             assert_true(e.deepPath().includes(host)); |  54             assert_true(e.deepPath().includes(host)); | 
|  55             t.done(); |  55             t.done(); | 
|  56         }); |  56         }); | 
|  57     } |  57     } | 
|  58 }, 'Only certain trusted events should stop in bubbling.'); |  58 }, 'Only certain trusted events should stop in bubbling.'); | 
|  59  |  59  | 
|  60 target.select(); |  60 target.select(); | 
|  61 var userError = new Event('error'); |  61 var userError = new Event('error'); | 
|  62 target.dispatchEvent(userError); |  62 target.dispatchEvent(userError); | 
|  63 </script> |  63 </script> | 
| OLD | NEW |