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

Unified Diff: extensions/renderer/native_extension_bindings_system_unittest.cc

Issue 2909673003: [Extensions Bindings] Request JS execution from messaging bindings (Closed)
Patch Set: . Created 3 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: 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 31af1e27599a770f29956da4cc41c0f3e448d186..921a96059a45e87f125d3513aab932a981faf389 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,

Powered by Google App Engine
This is Rietveld 408576698