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

Side by Side Diff: chrome/browser/chrome_browser_application_mac_unittest.mm

Issue 345051: Cleans up our autorelease handling so that we don't create a layered ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #import "chrome/browser/chrome_application_mac.h" 8 #import "chrome/browser/chrome_browser_application_mac.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace CrApplicationNSException { 11 namespace chrome_browser_application_mac {
12 12
13 // Generate an NSException with the given name. 13 // Generate an NSException with the given name.
14 NSException* ExceptionNamed(NSString* name) { 14 NSException* ExceptionNamed(NSString* name) {
15 return [NSException exceptionWithName:name 15 return [NSException exceptionWithName:name
16 reason:@"No reason given" 16 reason:@"No reason given"
17 userInfo:nil]; 17 userInfo:nil];
18 } 18 }
19 19
20 // Helper to keep binning expectations readible. 20 // Helper to keep binning expectations readible.
21 size_t BinForExceptionNamed(NSString* name) { 21 size_t BinForExceptionNamed(NSString* name) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 EXPECT_EQ(4, sample.counts(0)); 71 EXPECT_EQ(4, sample.counts(0));
72 EXPECT_EQ(1, sample.counts(1)); 72 EXPECT_EQ(1, sample.counts(1));
73 EXPECT_EQ(3, sample.counts(2)); 73 EXPECT_EQ(3, sample.counts(2));
74 EXPECT_EQ(2, sample.counts(3)); 74 EXPECT_EQ(2, sample.counts(3));
75 75
76 // The unknown exceptions should end up in the overflow bucket. 76 // The unknown exceptions should end up in the overflow bucket.
77 EXPECT_EQ(kUnknownNSException + 1, histograms[0]->bucket_count()); 77 EXPECT_EQ(kUnknownNSException + 1, histograms[0]->bucket_count());
78 EXPECT_EQ(4, sample.counts(kUnknownNSException)); 78 EXPECT_EQ(4, sample.counts(kUnknownNSException));
79 } 79 }
80 80
81 } // CrApplicationNSException 81 } // chrome_browser_application_mac
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698