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

Unified Diff: third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html

Issue 1950613005: Fixes tests that use internals.observeGC to work with Ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments and fixes more tests. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html
diff --git a/third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html b/third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html
index 10ec4fb82fc8bd698b73ada8174b9d071dd83fdf..f7e1c2e4f3a1e0c25c88069e833e330e580eb767 100644
--- a/third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html
+++ b/third_party/WebKit/LayoutTests/netinfo/gc-frame-listeners.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<head>
<script src="../resources/js-test.js"></script>
+<script src="../resources/observeGC.js"></script>
<script src="resources/netinfo_common.js"></script>
</head>
<body>
@@ -12,17 +13,17 @@ shouldBe('typeof window.internals.observeGC', '"function"',
'this test requires window.internals');
var childFrame = document.createElement('iframe');
-var childFrameObserver = internals.observeGC(childFrame);
+var childFrameObserver = observeGC(() => {return childFrame;});
document.body.appendChild(childFrame);
var childConnection = childFrame.contentWindow.navigator.connection;
-var childConnectionObserver = internals.observeGC(childConnection);
+var childConnectionObserver = observeGC(() => {return childConnection;});
var callback = function(e) {
testFailed("Should not get here.");
};
-var callbackObserver = internals.observeGC(callback);
+var callbackObserver = observeGC(() => {return callback;});
// Add the event listener and make sure it doesn't get collected.
childConnection.addEventListener('typechange', callback);

Powered by Google App Engine
This is Rietveld 408576698