Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: ui/gfx/display_change_notifier_unittest.cc

Issue 1059383003: Make sure observers are not nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/observer_list.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display_change_notifier_unittest.cc
diff --git a/ui/gfx/display_change_notifier_unittest.cc b/ui/gfx/display_change_notifier_unittest.cc
index 47b5bd064b64c2c3ff574af9fd751d9dd4459925..9c1dda2fdcae1fe0672b564a1b3e9161f6e6b295 100644
--- a/ui/gfx/display_change_notifier_unittest.cc
+++ b/ui/gfx/display_change_notifier_unittest.cc
@@ -70,13 +70,6 @@ TEST(DisplayChangeNotifierTest, AddObserver_Smoke) {
EXPECT_EQ(1, observer.display_added());
}
-TEST(DisplayChangeNotifierTest, AddObserver_Null) {
- DisplayChangeNotifier change_notifier;
-
- change_notifier.AddObserver(NULL);
- // Should not crash.
-}
-
TEST(DisplayChangeNotifier, RemoveObserver_Smoke) {
DisplayChangeNotifier change_notifier;
MockDisplayObserver observer;
@@ -93,13 +86,6 @@ TEST(DisplayChangeNotifier, RemoveObserver_Smoke) {
EXPECT_EQ(0, observer.display_added());
}
-TEST(DisplayChangeNotifierTest, RemoveObserver_Null) {
- DisplayChangeNotifier change_notifier;
-
- change_notifier.RemoveObserver(NULL);
- // Should not crash.
-}
-
TEST(DisplayChangeNotifierTest, RemoveObserver_Unknown) {
DisplayChangeNotifier change_notifier;
MockDisplayObserver observer;
« no previous file with comments | « base/observer_list.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698