Add test coverage for PushSubscriptionOptions.userVisibleOnly
commit6a55c1954c8536f1ea2f0745f7da09600bd3ecb0
authorpeter <peter@chromium.org>
Thu, 7 May 2015 14:08:50 +0000 (7 07:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 7 May 2015 14:09:19 +0000 (7 14:09 +0000)
tree4d22b7a24471d4302dc6ab5224848f6b739a9b7a
parentceac0671164d41e64b2797797b81ac431513090d
Add test coverage for PushSubscriptionOptions.userVisibleOnly

This CL changes the Push API browser test suite to use the new
PushSubscriptionOptions dictionary instead of relying on the manifest
for providing the userVisibleOnly value. In order to make sure that we
don't break backwards compatibility, add a new test to cover that as well.

Additionally, Blink has switched over to the new methods, so get rid of
the old ones.

This CL is part of a series of four:
  [1] https://codereview.chromium.org/1047533002/
  [2] https://codereview.chromium.org/1043723003/
  [3] https://codereview.chromium.org/1044663002/
  [4] This patch.

BUG=471534, 446883

Review URL: https://codereview.chromium.org/1044673002

Cr-Commit-Position: refs/heads/master@{#328757}
13 files changed:
chrome/browser/push_messaging/push_messaging_browsertest.cc
chrome/test/data/push_messaging/manifest.json
chrome/test/data/push_messaging/manifest_with_user_visible_false.json [copied from chrome/test/data/push_messaging/manifest.json with 52% similarity]
chrome/test/data/push_messaging/manifest_with_user_visible_true.json [copied from chrome/test/data/push_messaging/manifest.json with 52% similarity]
chrome/test/data/push_messaging/manifest_without_user_visible_only.json [deleted file]
chrome/test/data/push_messaging/push_test.js
chrome/test/data/push_messaging/test_bad_manifest.html
chrome/test/data/push_messaging/test_no_subscription_options.html [new file with mode: 0644]
chrome/test/data/push_messaging/test_user_visible_only_manifest.html [new file with mode: 0644]
content/child/push_messaging/push_provider.cc
content/child/push_messaging/push_provider.h
content/renderer/push_messaging/push_messaging_dispatcher.cc
content/renderer/push_messaging/push_messaging_dispatcher.h