| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/notifications/desktop_notification_service.h" | 5 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 6 | 6 |
| 7 #include "base/ref_counted.h" | 7 #include "base/ref_counted.h" |
| 8 #include "base/waitable_event.h" | 8 #include "base/waitable_event.h" |
| 9 #include "chrome/browser/notifications/notifications_prefs_cache.h" | 9 #include "chrome/browser/notifications/notifications_prefs_cache.h" |
| 10 #include "chrome/browser/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/browser/prefs/scoped_pref_update.h" |
| 11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 12 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 12 #include "chrome/browser/scoped_pref_update.h" | |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "chrome/test/testing_profile.h" | 14 #include "chrome/test/testing_profile.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // NotificationsPrefsCache wants to be called on the IO thread. This class | 21 // NotificationsPrefsCache wants to be called on the IO thread. This class |
| 22 // routes calls to the cache on the IO thread. | 22 // routes calls to the cache on the IO thread. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 EXPECT_EQ(WebKit::WebNotificationPresenter::PermissionDenied, | 238 EXPECT_EQ(WebKit::WebNotificationPresenter::PermissionDenied, |
| 239 proxy_->CacheHasPermission(cache_, denied_url)); | 239 proxy_->CacheHasPermission(cache_, denied_url)); |
| 240 | 240 |
| 241 service_->ResetBlockedOrigin(denied_url); | 241 service_->ResetBlockedOrigin(denied_url); |
| 242 | 242 |
| 243 EXPECT_EQ(WebKit::WebNotificationPresenter::PermissionNotAllowed, | 243 EXPECT_EQ(WebKit::WebNotificationPresenter::PermissionNotAllowed, |
| 244 proxy_->CacheHasPermission(cache_, denied_url)); | 244 proxy_->CacheHasPermission(cache_, denied_url)); |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace | 247 } // namespace |
| OLD | NEW |