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

Side by Side Diff: chrome/browser/cocoa/bug_report_window_controller_unittest.mm

Issue 371057: Fix NSString conversions to treat a null NSString as a string of length 0, in... (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « chrome/browser/cocoa/bug_report_window_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ref_counted.h" 7 #include "base/ref_counted.h"
8 #import "chrome/browser/cocoa/bug_report_window_controller.h" 8 #import "chrome/browser/cocoa/bug_report_window_controller.h"
9 #include "chrome/browser/renderer_host/site_instance.h" 9 #include "chrome/browser/renderer_host/site_instance.h"
10 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 10 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 delete tabContents; 48 delete tabContents;
49 [controller release]; 49 [controller release];
50 } 50 }
51 51
52 TEST_F(BugReportWindowControllerUnittest, ReportBugWithNoWindowOpen) { 52 TEST_F(BugReportWindowControllerUnittest, ReportBugWithNoWindowOpen) {
53 BugReportWindowController* controller = [[BugReportWindowController alloc] 53 BugReportWindowController* controller = [[BugReportWindowController alloc]
54 initWithTabContents:NULL 54 initWithTabContents:NULL
55 profile:profile_.get()]; 55 profile:profile_.get()];
56 56
57 // Make sure that no page title or URL are recorded. 57 // Make sure that no page title or URL are recorded. Note that IB reports
58 EXPECT_TRUE([[controller pageURL] isEqualToString:@""]); 58 // empty textfields as NULL values.
59 EXPECT_TRUE([[controller pageTitle] isEqualToString:@""]); 59 EXPECT_FALSE([controller pageURL]);
60 EXPECT_FALSE([controller pageTitle]);
60 61
61 // When we call "report bug" with empty tab contents, only menu options 62 // When we call "report bug" with empty tab contents, only menu options
62 // that don't refer to a specific page should be available, and the send 63 // that don't refer to a specific page should be available, and the send
63 // screenshot option should be turned off. 64 // screenshot option should be turned off.
64 EXPECT_EQ([[controller bugTypeList] count], 4U); 65 EXPECT_EQ([[controller bugTypeList] count], 4U);
65 EXPECT_FALSE([controller sendScreenshot]); 66 EXPECT_FALSE([controller sendScreenshot]);
66 67
67 [controller release]; 68 [controller release];
68 } 69 }
69 70
70 } // namespace 71 } // namespace
71 72
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bug_report_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698