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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybots Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "chrome/browser/notifications/balloon_collection.h" 8 #include "chrome/browser/notifications/balloon_collection.h"
9 #include "chrome/browser/notifications/notification.h" 9 #include "chrome/browser/notifications/notification.h"
10 #include "chrome/browser/notifications/notification_object_proxy.h" 10 #include "chrome/browser/notifications/notification_object_proxy.h"
(...skipping 13 matching lines...) Expand all
24 @implementation TestBalloonController 24 @implementation TestBalloonController
25 - (void)initializeHost {} 25 - (void)initializeHost {}
26 @end 26 @end
27 27
28 namespace { 28 namespace {
29 29
30 // Use a dummy balloon collection for testing. 30 // Use a dummy balloon collection for testing.
31 class MockBalloonCollection : public BalloonCollection { 31 class MockBalloonCollection : public BalloonCollection {
32 virtual void Add(const Notification& notification, 32 virtual void Add(const Notification& notification,
33 Profile* profile) OVERRIDE {} 33 Profile* profile) OVERRIDE {}
34 virtual bool DoesIdExist(const std::string& id) OVERRIDE { return false; } 34 virtual bool DoesIdExist(const std::string& id,
35 Notification* matched_notification) OVERRIDE {
36 return false;
37 }
35 virtual bool RemoveById(const std::string& id) OVERRIDE { return false; } 38 virtual bool RemoveById(const std::string& id) OVERRIDE { return false; }
36 virtual bool RemoveBySourceOrigin(const GURL& origin) OVERRIDE { 39 virtual bool RemoveBySourceOrigin(const GURL& origin) OVERRIDE {
37 return false; 40 return false;
38 } 41 }
39 virtual bool RemoveByProfile(Profile* profile) OVERRIDE { return false; } 42 virtual bool RemoveByProfile(Profile* profile) OVERRIDE { return false; }
40 virtual void RemoveAll() OVERRIDE {} 43 virtual void RemoveAll() OVERRIDE {}
41 virtual bool HasSpace() const OVERRIDE { return true; } 44 virtual bool HasSpace() const OVERRIDE { return true; }
42 virtual void ResizeBalloon( 45 virtual void ResizeBalloon(
43 Balloon* balloon, 46 Balloon* balloon,
44 const gfx::Size& size) OVERRIDE { 47 const gfx::Size& size) OVERRIDE {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 108
106 [controller showWindow:nil]; 109 [controller showWindow:nil];
107 110
108 EXPECT_TRUE([controller desiredTotalWidth] > 100); 111 EXPECT_TRUE([controller desiredTotalWidth] > 100);
109 EXPECT_TRUE([controller desiredTotalHeight] > 100); 112 EXPECT_TRUE([controller desiredTotalHeight] > 100);
110 113
111 [controller closeBalloon:YES]; 114 [controller closeBalloon:YES];
112 } 115 }
113 116
114 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698