| OLD | NEW | 
|   1 <!DOCTYPE html> |   1 <!DOCTYPE html> | 
|   2 <html> |   2 <html> | 
|   3 <body onload="test()"> |   3 <body onload="test()"> | 
|   4 <script src="../../../resources/js-test.js"></script> |   4 <script src="../../../resources/js-test.js"></script> | 
|   5 <script src="resources/shadow-dom.js"></script> |   5 <script src="resources/shadow-dom.js"></script> | 
|   6 <div id="container"> |   6 <div id="container"> | 
|   7 </div> |   7 </div> | 
|   8  |   8  | 
|   9 <script> |   9 <script> | 
|  10 window.jsTestIsAsync = true; |  10 window.jsTestIsAsync = true; | 
|  11  |  11  | 
|  12 function setup() |  12 function setup() | 
|  13 { |  13 { | 
|  14    var D = createDOM; |  14    var D = createDOM; | 
|  15    var S = createShadowRoot; |  15    var S = createShadowRoot; | 
|  16    var cases = []; |  16    var cases = []; | 
|  17  |  17  | 
|  18    label1 = 'Case1: Non-Nested'; |  18    label1 = 'Case1: Non-Nested'; | 
|  19    container.appendChild(D('div', {'id': 'host1'}, S(D('a', {'id': 'target1', 't
    itle': label1}, document.createTextNode("Hello1"))))); |  19    container.appendChild(D('div', {'id': 'host1'}, S(D('a', {'id': 'target1', 't
    itle': label1}, document.createTextNode("Hello1"))))); | 
|  20    cases.push({ target: getNodeInTreeOfTrees('host1/target1'), expected: label1 
    }); |  20    cases.push({ target: getNodeInComposedTree('host1/target1'), expected: label1
     }); | 
|  21  |  21  | 
|  22    label2 = 'Case 2: Nested'; |  22    label2 = 'Case 2: Nested'; | 
|  23    container.appendChild(D('div', {'id': 'host2'}, S(D('div', {'id': 'host2b'}, 
    S(D('a', {'id': 'target2', 'title': label2}, document.createTextNode("Hello2")))
    )))); |  23    container.appendChild(D('div', {'id': 'host2'}, S(D('div', {'id': 'host2b'}, 
    S(D('a', {'id': 'target2', 'title': label2}, document.createTextNode("Hello2")))
    )))); | 
|  24    cases.push({ target: getNodeInTreeOfTrees('host2/host2b/target2'), expected: 
    label2 }); |  24    cases.push({ target: getNodeInComposedTree('host2/host2b/target2'), expected:
     label2 }); | 
|  25  |  25  | 
|  26    label3 = 'Case 3: Multiple Shadow'; |  26    label3 = 'Case 3: Multiple Shadow'; | 
|  27    container.appendChild(D('div', {'id': 'host3'}, S(D('div', {'id': 'scope3a'})
    ), S(D('a', {'id': 'scope3b', 'title': label3 }, document.createTextNode("Hello3
    "))))); |  27    container.appendChild(D('div', {'id': 'host3'}, S(D('div', {'id': 'scope3a'})
    ), S(D('a', {'id': 'scope3b', 'title': label3 }, document.createTextNode("Hello3
    "))))); | 
|  28    cases.push({ target: getNodeInTreeOfTrees('host3//scope3b'), expected: label3
     }); |  28    cases.push({ target: getNodeInComposedTree('host3//scope3b'), expected: label
    3 }); | 
|  29  |  29  | 
|  30    return cases; |  30    return cases; | 
|  31 } |  31 } | 
|  32  |  32  | 
|  33 function moveTo(target) |  33 function moveTo(target) | 
|  34 { |  34 { | 
|  35     if (window.eventSender) { |  35     if (window.eventSender) { | 
|  36         eventSender.dragMode = false; |  36         eventSender.dragMode = false; | 
|  37         eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.off
    setHeight / 2); |  37         eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.off
    setHeight / 2); | 
|  38     } |  38     } | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  50             shouldBe("harness.expected", "testRunner.tooltipText"); |  50             shouldBe("harness.expected", "testRunner.tooltipText"); | 
|  51     } |  51     } | 
|  52  |  52  | 
|  53     container.style.display = "none"; |  53     container.style.display = "none"; | 
|  54     finishJSTest(); |  54     finishJSTest(); | 
|  55  |  55  | 
|  56 } |  56 } | 
|  57 </script> |  57 </script> | 
|  58 </body> |  58 </body> | 
|  59 </html> |  59 </html> | 
| OLD | NEW |