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

Unified Diff: extensions/renderer/native_extension_bindings_system_unittest.cc

Issue 2909673003: [Extensions Bindings] Request JS execution from messaging bindings (Closed)
Patch Set: lazyboy's Created 3 years, 6 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 | « extensions/renderer/native_extension_bindings_system.cc ('k') | extensions/renderer/resources/event.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/native_extension_bindings_system_unittest.cc
diff --git a/extensions/renderer/native_extension_bindings_system_unittest.cc b/extensions/renderer/native_extension_bindings_system_unittest.cc
index 0378253606c765c0befd231fab94c16c240a8488..698beb9663b9ae4c2b59a09bd5b6b554074274fb 100644
--- a/extensions/renderer/native_extension_bindings_system_unittest.cc
+++ b/extensions/renderer/native_extension_bindings_system_unittest.cc
@@ -600,6 +600,8 @@ TEST_F(NativeExtensionBindingsSystemUnittest, TestEventRegistration) {
v8::Local<v8::Value> argv[] = {listener};
RunFunction(add_listener, context, arraysize(argv), argv);
::testing::Mock::VerifyAndClearExpectations(event_change_handler());
+ EXPECT_TRUE(bindings_system()->HasEventListenerInContext(
+ "idle.onStateChanged", script_context));
// Remove the event listener. We should be notified again.
const char kRemoveListener[] =
@@ -614,6 +616,8 @@ TEST_F(NativeExtensionBindingsSystemUnittest, TestEventRegistration) {
FunctionFromString(context, kRemoveListener);
RunFunction(remove_listener, context, arraysize(argv), argv);
::testing::Mock::VerifyAndClearExpectations(event_change_handler());
+ EXPECT_FALSE(bindings_system()->HasEventListenerInContext(
+ "idle.onStateChanged", script_context));
}
TEST_F(NativeExtensionBindingsSystemUnittest,
« no previous file with comments | « extensions/renderer/native_extension_bindings_system.cc ('k') | extensions/renderer/resources/event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698