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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html

Issue 2194793006: Do not commit: Revert of r404081 and r402757 for perf testing purposes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/offset-parent-does-not-leak-ua-shadow-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <body> 3 <body>
4 <div id="container" style="position: relative;"></div> 4 <div id="container" style="position: relative;"></div>
5 <script> 5 <script>
6 description('offsetParent should not leak nodes in user agent Shadow DOM.'); 6 description('offsetParent should not leak nodes in user agent Shadow DOM.');
7 7
8 if (!window.internals) 8 if (!window.internals)
9 fail('This test requires window.internals to manipulate user agent Shadow DO M.'); 9 fail('This test requires window.internals to manipulate user agent Shadow DO M.');
10 10
(...skipping 13 matching lines...) Expand all
24 var shadow = host.createShadowRoot(); 24 var shadow = host.createShadowRoot();
25 configureShadowRoot(shadow); 25 configureShadowRoot(shadow);
26 shouldBe('child.offsetParent', 'shadow.positionedElement'); 26 shouldBe('child.offsetParent', 'shadow.positionedElement');
27 27
28 // Test that offsetParent works 'through' Shadow DOM when there is no 28 // Test that offsetParent works 'through' Shadow DOM when there is no
29 // positioned ancestor in user agent Shadow DOM 29 // positioned ancestor in user agent Shadow DOM
30 shadow.positionedElement.removeAttribute('style'); 30 shadow.positionedElement.removeAttribute('style');
31 shouldBe('child.offsetParent', 'container'); 31 shouldBe('child.offsetParent', 'container');
32 32
33 // Test that when the offsetParent is in user agent Shadow DOM, it is 33 // Test that when the offsetParent is in user agent Shadow DOM, it is
34 // not exposed to script, but its shadow host or the host's ancestor 34 // not exposed to script
35 // which is appropriate as an offsetParent is returned.
36 host = document.createElement('details'); 35 host = document.createElement('details');
37 container.appendChild(host); 36 container.appendChild(host);
38 host.setAttribute('open', 'open'); 37 host.setAttribute('open', 'open');
39 host.appendChild(child); 38 host.appendChild(child);
40 var shadow = window.internals.youngestShadowRoot(host); // this is a UA shadow root 39 var shadow = window.internals.youngestShadowRoot(host); // this is a UA shadow root
41 configureShadowRoot(shadow); 40 configureShadowRoot(shadow);
42 shouldBe('child.offsetParent', 'container'); 41 shouldBe('child.offsetParent', 'null');
43 42
44 // Test that offsetParent works 'through' user agent Shadow DOM when there is no 43 // Test that offsetParent works 'through' user agent Shadow DOM when there is no
45 // positioned ancestor in user agent Shadow DOM 44 // positioned ancestor in user agent Shadow DOM
46 shadow.positionedElement.removeAttribute('style'); 45 shadow.positionedElement.removeAttribute('style');
47 shouldBe('child.offsetParent', 'container'); 46 shouldBe('child.offsetParent', 'container');
48 47
49 container.remove(); 48 container.remove();
50 49
51 successfullyParsed = true; 50 successfullyParsed = true;
52 </script> 51 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/offset-parent-does-not-leak-ua-shadow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698