Index: ppapi/tests/blink_deprecated_test_plugin.cc |
diff --git a/ppapi/tests/blink_deprecated_test_plugin.cc b/ppapi/tests/blink_deprecated_test_plugin.cc |
index 064cc90f2dafaa013b16919825c0881a74d1943c..cda8f207469dc46e5c064e61df4ee0e2e4403651 100644 |
--- a/ppapi/tests/blink_deprecated_test_plugin.cc |
+++ b/ppapi/tests/blink_deprecated_test_plugin.cc |
@@ -49,6 +49,8 @@ |
// Properties: |
// * plugin.testObject (read-only): a TestObject instance (see below). |
// |
+// * plugin.testGetUndefined (read-only): returns undefined. |
+// |
// |
// TestObject exposes the following interface: |
// Properties: |
@@ -199,6 +201,9 @@ class InstanceSO : public ScriptableBase { |
properties_.insert(std::make_pair( |
"testObject", base::Bind(&InstanceSO::TestObjectAccessor, |
base::Unretained(this)))); |
+ properties_.insert(std::make_pair( |
+ "testGetUndefined", base::Bind(&InstanceSO::TestGetUndefinedAccessor, |
+ base::Unretained(this)))); |
} |
~InstanceSO() override {} |
@@ -274,6 +279,12 @@ class InstanceSO : public ScriptableBase { |
*var = test_object_; |
} |
+ void TestGetUndefinedAccessor(bool set, pp::Var* var) { |
+ if (set) |
+ return; |
+ *var = pp::Var(); |
+ } |
+ |
pp::VarPrivate test_object_; |
pp::Var remembered_; |
}; |