Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: LayoutTests/fast/events/event-listener-on-attribute-inside-shadow-dom.html

Issue 519003003: Tell synthetic attribute nodes inside shadow DOM about move to new Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/event-listener-on-attribute-inside-shadow-dom-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3
4 <div id="div1"></div>
5 <div id="div2"></div>
6
7 <script>
8 description('This tests ensures that an event listener on an attribute node insi de a shadow DOM is properly unregistered when parent element of the attribute is moved to a new document.');
9
10 var div1 = document.getElementById('div1');
11 var div2 = document.getElementById('div2');
12 var shadowRoot = div2.createShadowRoot();
13
14 // Register an event listener on an attribute node.
15 div1.attributes[0].addEventListener('touchstart', function() { });
16 if (window.internals)
17 shouldBe('window.internals.touchEventHandlerCount(document)', '1');
18
19 // Move the parent element into a shadow DOM.
20 shadowRoot.appendChild(div1);
21
22 // Move the shadow host into a new document.
23 var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html');
24 doc.adoptNode(div2);
25
26 // Make sure the handler was unregistered.
27 if (window.internals)
28 shouldBe('window.internals.touchEventHandlerCount(document)', '0');
29
30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/event-listener-on-attribute-inside-shadow-dom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698