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

Unified Diff: extensions/renderer/native_extension_bindings_system_unittest.cc

Issue 2615773002: [Extensions Bindings] Add enum support (Closed)
Patch Set: rebase Created 3 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
« extensions/renderer/api_binding.cc ('K') | « extensions/renderer/argument_spec.h ('k') | no next file » | 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 5045c8744ce793bf02ab76a20ffc8f9252a923a9..be585ca0e0bbe062e22aa866443ef42f076ffc42 100644
--- a/extensions/renderer/native_extension_bindings_system_unittest.cc
+++ b/extensions/renderer/native_extension_bindings_system_unittest.cc
@@ -148,10 +148,15 @@ TEST_F(NativeExtensionBindingsSystemUnittest, Basic) {
ASSERT_FALSE(idle.IsEmpty());
ASSERT_TRUE(idle->IsObject());
- v8::Local<v8::Value> idle_query_state = GetPropertyFromObject(
- v8::Local<v8::Object>::Cast(idle), context, "queryState");
+ v8::Local<v8::Object> idle_object = v8::Local<v8::Object>::Cast(idle);
+ v8::Local<v8::Value> idle_query_state =
+ GetPropertyFromObject(idle_object, context, "queryState");
ASSERT_FALSE(idle_query_state.IsEmpty());
+ EXPECT_EQ(ReplaceSingleQuotes(
+ "{'ACTIVE':'active','IDLE':'idle','LOCKED':'locked'}"),
+ GetStringPropertyFromObject(idle_object, context, "IdleState"));
+
{
// Try calling the function with an invalid invocation - an error should be
// thrown.
« extensions/renderer/api_binding.cc ('K') | « extensions/renderer/argument_spec.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698