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

Unified Diff: LayoutTests/inspector/console/command-line-api-getEventListeners.html

Issue 145133008: DevTools: Make getEventListeners() of Console API work for window. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/inspector/console/command-line-api-getEventListeners-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/command-line-api-getEventListeners.html
diff --git a/LayoutTests/inspector/console/command-line-api-getEventListeners.html b/LayoutTests/inspector/console/command-line-api-getEventListeners.html
index 4c64261b14ab147ceb3e468fca9829d634b3d857..675450c7777b48e5bc38d2449e7e55807be0a9be 100644
--- a/LayoutTests/inspector/console/command-line-api-getEventListeners.html
+++ b/LayoutTests/inspector/console/command-line-api-getEventListeners.html
@@ -37,9 +37,14 @@ document.getElementById("inner").addEventListener("keydown", listener2, true);
document.getElementById("outer").addEventListener("mousemove", listener1, false);
document.getElementById("outer").addEventListener("mousedown", listener2, true);
document.getElementById("outer").addEventListener("keydown", listener2, true);
+window.addEventListener("popstate", listener1, false);
function dumpObject(object, prefix)
{
+ if (!object) {
+ output("FAIL: object is " + (typeof object));
caseq 2014/01/23 15:17:16 nit: for null, this would give you "FAIL: Object i
aandrey 2014/01/23 15:19:19 Done.
+ return;
+ }
prefix = prefix || "";
var keys = Object.keys(object);
for (var i = 0; i < keys.length; ++i) {
@@ -82,6 +87,8 @@ function runTestsInPage(getEventListeners)
dumpObject(getEventListeners(document.getElementById("outer")));
output("- attribute event listeners -");
dumpObject(getEventListeners(document.getElementById("button")));
+ output("- window -");
+ dumpObject(getEventListeners(window));
output("- empty -");
dumpObject(getEventListeners(document.getElementById("empty")));
output("- invalid -");
@@ -92,8 +99,6 @@ function runTestsInPage(getEventListeners)
output(typeof getEventListeners(null));
output("- undefined -");
output(typeof getEventListeners(undefined));
- output("- window -");
- output(typeof getEventListeners(window));
}
</script>
« no previous file with comments | « no previous file | LayoutTests/inspector/console/command-line-api-getEventListeners-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698