| Index: content/shell/renderer/test_runner/mock_web_push_client.cc
|
| diff --git a/content/shell/renderer/test_runner/mock_web_push_client.cc b/content/shell/renderer/test_runner/mock_web_push_client.cc
|
| index 98bd8d20090afc18d642b3d483ffdd4953b0681d..c3999563bcee5e31b0843badda52fa9e561ac8bb 100644
|
| --- a/content/shell/renderer/test_runner/mock_web_push_client.cc
|
| +++ b/content/shell/renderer/test_runner/mock_web_push_client.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "third_party/WebKit/public/platform/WebPushError.h"
|
| +#include "third_party/WebKit/public/platform/WebPushPermissionStatus.h"
|
| #include "third_party/WebKit/public/platform/WebPushRegistration.h"
|
| #include "third_party/WebKit/public/platform/WebString.h"
|
|
|
| @@ -56,4 +57,21 @@ void MockWebPushClient::registerPushMessaging(
|
| delete callbacks;
|
| }
|
|
|
| -} // namespace content
|
| +void MockWebPushClient::getPermissionStatus(
|
| + blink::WebPushPermissionStatusCallback* callback,
|
| + blink::WebServiceWorkerProvider* provider) {
|
| + blink::WebPushPermissionStatus status;
|
| + if (error_message_.empty())
|
| + status = blink::WebPushPermissionStatusGranted;
|
| + else if (error_message_.compare("deny_permission") == 0)
|
| + status = blink::WebPushPermissionStatusDenied;
|
| + else
|
| + status = blink::WebPushPermissionStatusDefault;
|
| +
|
| + fprintf(stderr, "ABOUT TO CALL ON SUCCESS");
|
| + callback->onSuccess(&status);
|
| + delete callback;
|
| +}
|
| +
|
| +
|
| +} // Namespace content
|
|
|