WebKit Bugzilla
Attachment 371578 Details for
Bug 197908
: resize-observer/element-leak.html fails on Windows platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
test cases
win-element-leak.diff (text/plain), 22.03 KB, created by
cathiechen
on 2019-06-07 02:49:28 PDT
(
hide
)
Description:
test cases
Filename:
MIME Type:
Creator:
cathiechen
Created:
2019-06-07 02:49:28 PDT
Size:
22.03 KB
patch
obsolete
>diff --git a/LayoutTests/resize-observer/element-leak-with-RO-20-expected.txt b/LayoutTests/resize-observer/element-leak-with-RO-20-expected.txt >new file mode 100644 >index 0000000000..f8cda4adac >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-with-RO-20-expected.txt >@@ -0,0 +1,24 @@ >+CONSOLE MESSAGE: line 31: Got notified: 1 >+CONSOLE MESSAGE: line 31: Got notified: 2 >+CONSOLE MESSAGE: line 31: Got notified: 3 >+CONSOLE MESSAGE: line 31: Got notified: 4 >+CONSOLE MESSAGE: line 31: Got notified: 5 >+CONSOLE MESSAGE: line 31: Got notified: 6 >+CONSOLE MESSAGE: line 31: Got notified: 7 >+CONSOLE MESSAGE: line 31: Got notified: 8 >+CONSOLE MESSAGE: line 31: Got notified: 9 >+CONSOLE MESSAGE: line 31: Got notified: 10 >+CONSOLE MESSAGE: line 31: Got notified: 11 >+CONSOLE MESSAGE: line 31: Got notified: 12 >+CONSOLE MESSAGE: line 31: Got notified: 13 >+CONSOLE MESSAGE: line 31: Got notified: 14 >+CONSOLE MESSAGE: line 31: Got notified: 15 >+CONSOLE MESSAGE: line 31: Got notified: 16 >+CONSOLE MESSAGE: line 31: Got notified: 17 >+CONSOLE MESSAGE: line 31: Got notified: 18 >+CONSOLE MESSAGE: line 31: Got notified: 19 >+CONSOLE MESSAGE: line 31: Got notified: 20 >+ >+PASS ResizeObserver implemented >+PASS Test elements leak with 20 iframes >+ >diff --git a/LayoutTests/resize-observer/element-leak-with-RO-20.html b/LayoutTests/resize-observer/element-leak-with-RO-20.html >new file mode 100644 >index 0000000000..dbbf4ab685 >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-with-RO-20.html >@@ -0,0 +1,86 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> >+<html> >+<meta name="timeout" content="long"> >+<head> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<script src="../resources/gc.js"></script> >+</head> >+<body> >+<script> >+setup({ explicit_timeout: true }); >+ >+let iframeCount = 20; >+function prepareFrame() { >+ return new Promise(function(resolve, reject) { >+ let container = document.createElement("div"); >+ for (let i = 0; i < iframeCount; ++i) { >+ let ifrm = document.createElement("iframe"); >+ ifrm.style.height = "1px"; >+ ifrm.setAttribute("src", "resources/element-leak-frame-with-RO.html"); >+ container.appendChild(ifrm); >+ } >+ document.body.appendChild(container); >+ >+ let notifyTimer = setTimeout(() => reject("prepareFrame: wait Notified timed out"), 100000); >+ let notifyCount = 0; >+ window.addEventListener('message', event => { >+ switch(event.data) { >+ case 'Notified': >+ notifyCount++; >+ console.log("Got notified: " + notifyCount); >+ if (notifyCount == iframeCount) { >+ clearTimeout(notifyTimer); >+ resolve("All iframes notified"); >+ } >+ break; >+ } >+ }, false); >+ }) >+} >+ >+function testElementLeak(resolve, reject) { >+ return new Promise(function(resolve, reject) { >+ let documentIdentifierArray = new Array(iframeCount); >+ let count = 0; >+ document.querySelectorAll('iframe').forEach(iframe => { >+ documentIdentifierArray[count++] = internals.documentIdentifier(iframe.contentDocument); >+ iframe.remove(); >+ }); >+ >+ let gcTimer = setTimeout(() => reject("testElementLeak timed out"), 100000); >+ let handle = setInterval(function() { >+ gc(); >+ documentIdentifierArray.forEach(function(frameDocumentIdentifier) { >+ if (internals && !internals.isDocumentAlive(frameDocumentIdentifier)) { >+ clearInterval(handle); >+ clearTimeout(gcTimer); >+ documentIdentifierArray = []; >+ resolve("Detected document release."); >+ } >+ }); >+ }, 10); >+ }); >+} >+ >+function startTest() { >+ return prepareFrame().then(function(){ >+ return testElementLeak().catch(function(result){ >+ assert_false(true, "testElementLeak rejection: " + result); >+ }); >+ }).catch(function(result){ >+ assert_false(true, "prepareFrame rejection: " + result); >+ }); >+} >+ >+test(_ => { >+ assert_own_property(window, "ResizeObserver"); >+}, "ResizeObserver implemented"); >+ >+promise_test(async () => { >+ return startTest(); >+}, 'Test elements leak with 20 iframes'); >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/resize-observer/element-leak-with-RO-50-expected.txt b/LayoutTests/resize-observer/element-leak-with-RO-50-expected.txt >new file mode 100644 >index 0000000000..2ea5c6544d >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-with-RO-50-expected.txt >@@ -0,0 +1,54 @@ >+CONSOLE MESSAGE: line 31: Got notified: 1 >+CONSOLE MESSAGE: line 31: Got notified: 2 >+CONSOLE MESSAGE: line 31: Got notified: 3 >+CONSOLE MESSAGE: line 31: Got notified: 4 >+CONSOLE MESSAGE: line 31: Got notified: 5 >+CONSOLE MESSAGE: line 31: Got notified: 6 >+CONSOLE MESSAGE: line 31: Got notified: 7 >+CONSOLE MESSAGE: line 31: Got notified: 8 >+CONSOLE MESSAGE: line 31: Got notified: 9 >+CONSOLE MESSAGE: line 31: Got notified: 10 >+CONSOLE MESSAGE: line 31: Got notified: 11 >+CONSOLE MESSAGE: line 31: Got notified: 12 >+CONSOLE MESSAGE: line 31: Got notified: 13 >+CONSOLE MESSAGE: line 31: Got notified: 14 >+CONSOLE MESSAGE: line 31: Got notified: 15 >+CONSOLE MESSAGE: line 31: Got notified: 16 >+CONSOLE MESSAGE: line 31: Got notified: 17 >+CONSOLE MESSAGE: line 31: Got notified: 18 >+CONSOLE MESSAGE: line 31: Got notified: 19 >+CONSOLE MESSAGE: line 31: Got notified: 20 >+CONSOLE MESSAGE: line 31: Got notified: 21 >+CONSOLE MESSAGE: line 31: Got notified: 22 >+CONSOLE MESSAGE: line 31: Got notified: 23 >+CONSOLE MESSAGE: line 31: Got notified: 24 >+CONSOLE MESSAGE: line 31: Got notified: 25 >+CONSOLE MESSAGE: line 31: Got notified: 26 >+CONSOLE MESSAGE: line 31: Got notified: 27 >+CONSOLE MESSAGE: line 31: Got notified: 28 >+CONSOLE MESSAGE: line 31: Got notified: 29 >+CONSOLE MESSAGE: line 31: Got notified: 30 >+CONSOLE MESSAGE: line 31: Got notified: 31 >+CONSOLE MESSAGE: line 31: Got notified: 32 >+CONSOLE MESSAGE: line 31: Got notified: 33 >+CONSOLE MESSAGE: line 31: Got notified: 34 >+CONSOLE MESSAGE: line 31: Got notified: 35 >+CONSOLE MESSAGE: line 31: Got notified: 36 >+CONSOLE MESSAGE: line 31: Got notified: 37 >+CONSOLE MESSAGE: line 31: Got notified: 38 >+CONSOLE MESSAGE: line 31: Got notified: 39 >+CONSOLE MESSAGE: line 31: Got notified: 40 >+CONSOLE MESSAGE: line 31: Got notified: 41 >+CONSOLE MESSAGE: line 31: Got notified: 42 >+CONSOLE MESSAGE: line 31: Got notified: 43 >+CONSOLE MESSAGE: line 31: Got notified: 44 >+CONSOLE MESSAGE: line 31: Got notified: 45 >+CONSOLE MESSAGE: line 31: Got notified: 46 >+CONSOLE MESSAGE: line 31: Got notified: 47 >+CONSOLE MESSAGE: line 31: Got notified: 48 >+CONSOLE MESSAGE: line 31: Got notified: 49 >+CONSOLE MESSAGE: line 31: Got notified: 50 >+ >+PASS ResizeObserver implemented >+PASS Test elements leak with 50 iframes >+ >diff --git a/LayoutTests/resize-observer/element-leak-with-RO-50.html b/LayoutTests/resize-observer/element-leak-with-RO-50.html >new file mode 100644 >index 0000000000..c0dd0093e4 >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-with-RO-50.html >@@ -0,0 +1,86 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> >+<html> >+<meta name="timeout" content="long"> >+<head> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<script src="../resources/gc.js"></script> >+</head> >+<body> >+<script> >+setup({ explicit_timeout: true }); >+ >+let iframeCount = 50; >+function prepareFrame() { >+ return new Promise(function(resolve, reject) { >+ let container = document.createElement("div"); >+ for (let i = 0; i < iframeCount; ++i) { >+ let ifrm = document.createElement("iframe"); >+ ifrm.style.height = "1px"; >+ ifrm.setAttribute("src", "resources/element-leak-frame-with-RO.html"); >+ container.appendChild(ifrm); >+ } >+ document.body.appendChild(container); >+ >+ let notifyTimer = setTimeout(() => reject("prepareFrame: wait Notified timed out"), 100000); >+ let notifyCount = 0; >+ window.addEventListener('message', event => { >+ switch(event.data) { >+ case 'Notified': >+ notifyCount++; >+ console.log("Got notified: " + notifyCount); >+ if (notifyCount == iframeCount) { >+ clearTimeout(notifyTimer); >+ resolve("All iframes notified"); >+ } >+ break; >+ } >+ }, false); >+ }) >+} >+ >+function testElementLeak(resolve, reject) { >+ return new Promise(function(resolve, reject) { >+ let documentIdentifierArray = new Array(iframeCount); >+ let count = 0; >+ document.querySelectorAll('iframe').forEach(iframe => { >+ documentIdentifierArray[count++] = internals.documentIdentifier(iframe.contentDocument); >+ iframe.remove(); >+ }); >+ >+ let gcTimer = setTimeout(() => reject("testElementLeak timed out"), 100000); >+ let handle = setInterval(function() { >+ gc(); >+ documentIdentifierArray.forEach(function(frameDocumentIdentifier) { >+ if (internals && !internals.isDocumentAlive(frameDocumentIdentifier)) { >+ clearInterval(handle); >+ clearTimeout(gcTimer); >+ documentIdentifierArray = []; >+ resolve("Detected document release."); >+ } >+ }); >+ }, 10); >+ }); >+} >+ >+function startTest() { >+ return prepareFrame().then(function(){ >+ return testElementLeak().catch(function(result){ >+ assert_false(true, "testElementLeak rejection: " + result); >+ }); >+ }).catch(function(result){ >+ assert_false(true, "prepareFrame rejection: " + result); >+ }); >+} >+ >+test(_ => { >+ assert_own_property(window, "ResizeObserver"); >+}, "ResizeObserver implemented"); >+ >+promise_test(async () => { >+ return startTest(); >+}, 'Test elements leak with 50 iframes'); >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/resize-observer/element-leak-without-RO-20-expected.txt b/LayoutTests/resize-observer/element-leak-without-RO-20-expected.txt >new file mode 100644 >index 0000000000..f8cda4adac >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-without-RO-20-expected.txt >@@ -0,0 +1,24 @@ >+CONSOLE MESSAGE: line 31: Got notified: 1 >+CONSOLE MESSAGE: line 31: Got notified: 2 >+CONSOLE MESSAGE: line 31: Got notified: 3 >+CONSOLE MESSAGE: line 31: Got notified: 4 >+CONSOLE MESSAGE: line 31: Got notified: 5 >+CONSOLE MESSAGE: line 31: Got notified: 6 >+CONSOLE MESSAGE: line 31: Got notified: 7 >+CONSOLE MESSAGE: line 31: Got notified: 8 >+CONSOLE MESSAGE: line 31: Got notified: 9 >+CONSOLE MESSAGE: line 31: Got notified: 10 >+CONSOLE MESSAGE: line 31: Got notified: 11 >+CONSOLE MESSAGE: line 31: Got notified: 12 >+CONSOLE MESSAGE: line 31: Got notified: 13 >+CONSOLE MESSAGE: line 31: Got notified: 14 >+CONSOLE MESSAGE: line 31: Got notified: 15 >+CONSOLE MESSAGE: line 31: Got notified: 16 >+CONSOLE MESSAGE: line 31: Got notified: 17 >+CONSOLE MESSAGE: line 31: Got notified: 18 >+CONSOLE MESSAGE: line 31: Got notified: 19 >+CONSOLE MESSAGE: line 31: Got notified: 20 >+ >+PASS ResizeObserver implemented >+PASS Test elements leak with 20 iframes >+ >diff --git a/LayoutTests/resize-observer/element-leak-without-RO-20.html b/LayoutTests/resize-observer/element-leak-without-RO-20.html >new file mode 100644 >index 0000000000..41a740da52 >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-without-RO-20.html >@@ -0,0 +1,86 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> >+<html> >+<meta name="timeout" content="long"> >+<head> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<script src="../resources/gc.js"></script> >+</head> >+<body> >+<script> >+setup({ explicit_timeout: true }); >+ >+let iframeCount = 20; >+function prepareFrame() { >+ return new Promise(function(resolve, reject) { >+ let container = document.createElement("div"); >+ for (let i = 0; i < iframeCount; ++i) { >+ let ifrm = document.createElement("iframe"); >+ ifrm.style.height = "1px"; >+ ifrm.setAttribute("src", "resources/element-leak-frame-without-RO.html"); >+ container.appendChild(ifrm); >+ } >+ document.body.appendChild(container); >+ >+ let notifyTimer = setTimeout(() => reject("prepareFrame: wait Notified timed out"), 100000); >+ let notifyCount = 0; >+ window.addEventListener('message', event => { >+ switch(event.data) { >+ case 'Notified': >+ notifyCount++; >+ console.log("Got notified: " + notifyCount); >+ if (notifyCount == iframeCount) { >+ clearTimeout(notifyTimer); >+ resolve("All iframes notified"); >+ } >+ break; >+ } >+ }, false); >+ }) >+} >+ >+function testElementLeak(resolve, reject) { >+ return new Promise(function(resolve, reject) { >+ let documentIdentifierArray = new Array(iframeCount); >+ let count = 0; >+ document.querySelectorAll('iframe').forEach(iframe => { >+ documentIdentifierArray[count++] = internals.documentIdentifier(iframe.contentDocument); >+ iframe.remove(); >+ }); >+ >+ let gcTimer = setTimeout(() => reject("testElementLeak timed out"), 100000); >+ let handle = setInterval(function() { >+ gc(); >+ documentIdentifierArray.forEach(function(frameDocumentIdentifier) { >+ if (internals && !internals.isDocumentAlive(frameDocumentIdentifier)) { >+ clearInterval(handle); >+ clearTimeout(gcTimer); >+ documentIdentifierArray = []; >+ resolve("Detected document release."); >+ } >+ }); >+ }, 10); >+ }); >+} >+ >+function startTest() { >+ return prepareFrame().then(function(){ >+ return testElementLeak().catch(function(result){ >+ assert_false(true, "testElementLeak rejection: " + result); >+ }); >+ }).catch(function(result){ >+ assert_false(true, "prepareFrame rejection: " + result); >+ }); >+} >+ >+test(_ => { >+ assert_own_property(window, "ResizeObserver"); >+}, "ResizeObserver implemented"); >+ >+promise_test(async () => { >+ return startTest(); >+}, 'Test elements leak with 20 iframes'); >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/resize-observer/element-leak-without-RO-50-expected.txt b/LayoutTests/resize-observer/element-leak-without-RO-50-expected.txt >new file mode 100644 >index 0000000000..2ea5c6544d >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-without-RO-50-expected.txt >@@ -0,0 +1,54 @@ >+CONSOLE MESSAGE: line 31: Got notified: 1 >+CONSOLE MESSAGE: line 31: Got notified: 2 >+CONSOLE MESSAGE: line 31: Got notified: 3 >+CONSOLE MESSAGE: line 31: Got notified: 4 >+CONSOLE MESSAGE: line 31: Got notified: 5 >+CONSOLE MESSAGE: line 31: Got notified: 6 >+CONSOLE MESSAGE: line 31: Got notified: 7 >+CONSOLE MESSAGE: line 31: Got notified: 8 >+CONSOLE MESSAGE: line 31: Got notified: 9 >+CONSOLE MESSAGE: line 31: Got notified: 10 >+CONSOLE MESSAGE: line 31: Got notified: 11 >+CONSOLE MESSAGE: line 31: Got notified: 12 >+CONSOLE MESSAGE: line 31: Got notified: 13 >+CONSOLE MESSAGE: line 31: Got notified: 14 >+CONSOLE MESSAGE: line 31: Got notified: 15 >+CONSOLE MESSAGE: line 31: Got notified: 16 >+CONSOLE MESSAGE: line 31: Got notified: 17 >+CONSOLE MESSAGE: line 31: Got notified: 18 >+CONSOLE MESSAGE: line 31: Got notified: 19 >+CONSOLE MESSAGE: line 31: Got notified: 20 >+CONSOLE MESSAGE: line 31: Got notified: 21 >+CONSOLE MESSAGE: line 31: Got notified: 22 >+CONSOLE MESSAGE: line 31: Got notified: 23 >+CONSOLE MESSAGE: line 31: Got notified: 24 >+CONSOLE MESSAGE: line 31: Got notified: 25 >+CONSOLE MESSAGE: line 31: Got notified: 26 >+CONSOLE MESSAGE: line 31: Got notified: 27 >+CONSOLE MESSAGE: line 31: Got notified: 28 >+CONSOLE MESSAGE: line 31: Got notified: 29 >+CONSOLE MESSAGE: line 31: Got notified: 30 >+CONSOLE MESSAGE: line 31: Got notified: 31 >+CONSOLE MESSAGE: line 31: Got notified: 32 >+CONSOLE MESSAGE: line 31: Got notified: 33 >+CONSOLE MESSAGE: line 31: Got notified: 34 >+CONSOLE MESSAGE: line 31: Got notified: 35 >+CONSOLE MESSAGE: line 31: Got notified: 36 >+CONSOLE MESSAGE: line 31: Got notified: 37 >+CONSOLE MESSAGE: line 31: Got notified: 38 >+CONSOLE MESSAGE: line 31: Got notified: 39 >+CONSOLE MESSAGE: line 31: Got notified: 40 >+CONSOLE MESSAGE: line 31: Got notified: 41 >+CONSOLE MESSAGE: line 31: Got notified: 42 >+CONSOLE MESSAGE: line 31: Got notified: 43 >+CONSOLE MESSAGE: line 31: Got notified: 44 >+CONSOLE MESSAGE: line 31: Got notified: 45 >+CONSOLE MESSAGE: line 31: Got notified: 46 >+CONSOLE MESSAGE: line 31: Got notified: 47 >+CONSOLE MESSAGE: line 31: Got notified: 48 >+CONSOLE MESSAGE: line 31: Got notified: 49 >+CONSOLE MESSAGE: line 31: Got notified: 50 >+ >+PASS ResizeObserver implemented >+PASS Test elements leak with 50 iframes >+ >diff --git a/LayoutTests/resize-observer/element-leak-without-RO-50.html b/LayoutTests/resize-observer/element-leak-without-RO-50.html >new file mode 100644 >index 0000000000..8e9ea12283 >--- /dev/null >+++ b/LayoutTests/resize-observer/element-leak-without-RO-50.html >@@ -0,0 +1,86 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> >+<html> >+<meta name="timeout" content="long"> >+<head> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<script src="../resources/gc.js"></script> >+</head> >+<body> >+<script> >+setup({ explicit_timeout: true }); >+ >+let iframeCount = 50; >+function prepareFrame() { >+ return new Promise(function(resolve, reject) { >+ let container = document.createElement("div"); >+ for (let i = 0; i < iframeCount; ++i) { >+ let ifrm = document.createElement("iframe"); >+ ifrm.style.height = "1px"; >+ ifrm.setAttribute("src", "resources/element-leak-frame-without-RO.html"); >+ container.appendChild(ifrm); >+ } >+ document.body.appendChild(container); >+ >+ let notifyTimer = setTimeout(() => reject("prepareFrame: wait Notified timed out"), 100000); >+ let notifyCount = 0; >+ window.addEventListener('message', event => { >+ switch(event.data) { >+ case 'Notified': >+ notifyCount++; >+ console.log("Got notified: " + notifyCount); >+ if (notifyCount == iframeCount) { >+ clearTimeout(notifyTimer); >+ resolve("All iframes notified"); >+ } >+ break; >+ } >+ }, false); >+ }) >+} >+ >+function testElementLeak(resolve, reject) { >+ return new Promise(function(resolve, reject) { >+ let documentIdentifierArray = new Array(iframeCount); >+ let count = 0; >+ document.querySelectorAll('iframe').forEach(iframe => { >+ documentIdentifierArray[count++] = internals.documentIdentifier(iframe.contentDocument); >+ iframe.remove(); >+ }); >+ >+ let gcTimer = setTimeout(() => reject("testElementLeak timed out"), 100000); >+ let handle = setInterval(function() { >+ gc(); >+ documentIdentifierArray.forEach(function(frameDocumentIdentifier) { >+ if (internals && !internals.isDocumentAlive(frameDocumentIdentifier)) { >+ clearInterval(handle); >+ clearTimeout(gcTimer); >+ documentIdentifierArray = []; >+ resolve("Detected document release."); >+ } >+ }); >+ }, 10); >+ }); >+} >+ >+function startTest() { >+ return prepareFrame().then(function(){ >+ return testElementLeak().catch(function(result){ >+ assert_false(true, "testElementLeak rejection: " + result); >+ }); >+ }).catch(function(result){ >+ assert_false(true, "prepareFrame rejection: " + result); >+ }); >+} >+ >+test(_ => { >+ assert_own_property(window, "ResizeObserver"); >+}, "ResizeObserver implemented"); >+ >+promise_test(async () => { >+ return startTest(); >+}, 'Test elements leak with 50 iframes'); >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/resize-observer/resources/element-leak-frame-with-RO.html b/LayoutTests/resize-observer/resources/element-leak-frame-with-RO.html >new file mode 100644 >index 0000000000..b162d44d42 >--- /dev/null >+++ b/LayoutTests/resize-observer/resources/element-leak-frame-with-RO.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<body></body> >+<script src="../../resources/gc.js"></script> >+<script type="text/javascript"> >+ >+const targetCount = 1000; >+var resizeObserver = new ResizeObserver( entries => { >+ for (let entry of entries) >+ entry.target.myEntry = entry; >+ >+ resizeObserver.disconnect(); >+ document.querySelectorAll('div').forEach(target => target.remove()); >+ // Make sure targets be added to m_opaqueRoots. >+ gc(); >+ parent.postMessage('Notified', '*'); >+}); >+ >+for (let i = 0; i < targetCount; ++i) { >+ var target = document.createElement('div'); >+ document.body.appendChild(target); >+} >+ >+document.querySelectorAll('div').forEach(target => resizeObserver.observe(target)); >+ >+</script> >+</html> >\ No newline at end of file >diff --git a/LayoutTests/resize-observer/resources/element-leak-frame-without-RO.html b/LayoutTests/resize-observer/resources/element-leak-frame-without-RO.html >new file mode 100644 >index 0000000000..eaae099d09 >--- /dev/null >+++ b/LayoutTests/resize-observer/resources/element-leak-frame-without-RO.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<body></body> >+<script src="../../resources/gc.js"></script> >+<script type="text/javascript"> >+ >+const targetCount = 1000; >+for (let i = 0; i < targetCount; ++i) { >+ var target = document.createElement('div'); >+ document.body.appendChild(target); >+} >+ >+setTimeout(function() { >+ document.querySelectorAll('div').forEach(target => target.remove()); >+ gc(); >+ parent.postMessage('Notified', '*'); >+}, 100); >+ >+</script> >+</html> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197908
:
369932
|
369933
|
369948
|
369954
|
370042
|
370045
|
371578
|
371595
|
371597
|
371645
|
371650