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

Side by Side Diff: chrome/browser/cocoa/translate/translate_infobar_unittest.mm

Issue 3325012: Fix SessionStorage (Closed)
Patch Set: kill the last (new) dcheck Created 10 years, 3 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
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 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #import "base/string_util.h" 8 #import "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #import "chrome/app/chrome_dll_resource.h" // For translate menu command ids. 10 #import "chrome/app/chrome_dll_resource.h" // For translate menu command ids.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 public: 75 public:
76 // Each test gets a single Mock translate delegate for the lifetime of 76 // Each test gets a single Mock translate delegate for the lifetime of
77 // the test. 77 // the test.
78 virtual void SetUp() { 78 virtual void SetUp() {
79 CocoaTest::SetUp(); 79 CocoaTest::SetUp();
80 tab_contents.reset( 80 tab_contents.reset(
81 new TabContents(browser_helper_.profile(), 81 new TabContents(browser_helper_.profile(),
82 NULL, 82 NULL,
83 MSG_ROUTING_NONE, 83 MSG_ROUTING_NONE,
84 NULL,
84 NULL)); 85 NULL));
85 CreateInfoBar(); 86 CreateInfoBar();
86 } 87 }
87 88
88 void CreateInfoBar() { 89 void CreateInfoBar() {
89 CreateInfoBar(TranslateInfoBarDelegate::BEFORE_TRANSLATE); 90 CreateInfoBar(TranslateInfoBarDelegate::BEFORE_TRANSLATE);
90 } 91 }
91 92
92 void CreateInfoBar(TranslateInfoBarDelegate::Type type) { 93 void CreateInfoBar(TranslateInfoBarDelegate::Type type) {
93 TranslateErrors::Type error = TranslateErrors::NONE; 94 TranslateErrors::Type error = TranslateErrors::NONE;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 translate_prefs.IncrementTranslationDeniedCount("en"); 245 translate_prefs.IncrementTranslationDeniedCount("en");
245 } 246 }
246 CreateInfoBar(TranslateInfoBarDelegate::BEFORE_TRANSLATE); 247 CreateInfoBar(TranslateInfoBarDelegate::BEFORE_TRANSLATE);
247 BeforeTranslateInfobarController* controller = 248 BeforeTranslateInfobarController* controller =
248 (BeforeTranslateInfobarController*)infobar_controller.get(); 249 (BeforeTranslateInfobarController*)infobar_controller.get();
249 EXPECT_TRUE([[controller alwaysTranslateButton] superview] == nil); 250 EXPECT_TRUE([[controller alwaysTranslateButton] superview] == nil);
250 EXPECT_TRUE([[controller neverTranslateButton] superview] != nil); 251 EXPECT_TRUE([[controller neverTranslateButton] superview] != nil);
251 } 252 }
252 253
253 } // namespace 254 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tabpose_window_unittest.mm ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698