Chromium Code Reviews| Index: ppapi/tests/testing_instance.cc |
| diff --git a/ppapi/tests/testing_instance.cc b/ppapi/tests/testing_instance.cc |
| index b1eaae460e3b83007848706f5424b692704c2ffa..7f05fb278c1d76f70305bc3464bd95e50882b02d 100644 |
| --- a/ppapi/tests/testing_instance.cc |
| +++ b/ppapi/tests/testing_instance.cc |
| @@ -13,8 +13,10 @@ |
| #include "ppapi/cpp/core.h" |
| #include "ppapi/cpp/module.h" |
| #include "ppapi/cpp/var.h" |
| +#include "ppapi/cpp/var_dictionary.h" |
| #include "ppapi/cpp/view.h" |
| #include "ppapi/tests/test_case.h" |
| +#include "ppapi/tests/test_utils.h" |
| TestCaseFactory* TestCaseFactory::head_ = NULL; |
| @@ -93,6 +95,14 @@ pp::Var TestingInstance::GetInstanceObject() { |
| void TestingInstance::HandleMessage(const pp::Var& message_data) { |
| if (current_case_) |
| current_case_->HandleMessage(message_data); |
| + |
| + if (message_data.is_string() && (message_data.AsString() == "isPeripheral")) { |
| + pp::VarDictionary message; |
| + message.Set( |
| + "isPeripheral", |
| + pp::Var(PP_ToBool(GetTestingInterface()->IsPeripheral(pp_instance())))); |
| + PostMessage(message); |
| + } |
|
raymes
2015/04/17 01:13:44
It's a bit weird to have this here because this is
tommycli
2015/04/17 23:45:33
Done.
|
| } |
| void TestingInstance::DidChangeView(const pp::View& view) { |