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

Side by Side Diff: chrome/browser/ui/startup/session_crashed_infobar_delegate_unittest.cc

Issue 2321453002: c/browser, c/common, components S-W: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/startup/session_crashed_infobar_delegate.h" 5 #include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 16 matching lines...) Expand all
27 ->SetLocalState(&pref_service); 27 ->SetLocalState(&pref_service);
28 chrome::RegisterLocalState(pref_service.registry()); 28 chrome::RegisterLocalState(pref_service.registry());
29 29
30 // This needs to be called after the local state is set, because it will 30 // This needs to be called after the local state is set, because it will
31 // create a browser which will try to read from the local state. 31 // create a browser which will try to read from the local state.
32 BrowserWithTestWindowTest::SetUp(); 32 BrowserWithTestWindowTest::SetUp();
33 33
34 // Make sure we have a Profile Manager. 34 // Make sure we have a Profile Manager.
35 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 35 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
36 TestingBrowserProcess::GetGlobal()->SetProfileManager( 36 TestingBrowserProcess::GetGlobal()->SetProfileManager(
37 new ProfileManagerWithoutInit(temp_dir_.path())); 37 new ProfileManagerWithoutInit(temp_dir_.GetPath()));
38 } 38 }
39 39
40 void TearDown() override { 40 void TearDown() override {
41 static_cast<TestingBrowserProcess*>(g_browser_process)->SetLocalState(NULL); 41 static_cast<TestingBrowserProcess*>(g_browser_process)->SetLocalState(NULL);
42 BrowserWithTestWindowTest::TearDown(); 42 BrowserWithTestWindowTest::TearDown();
43 43
44 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL); 44 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL);
45 } 45 }
46 46
47 private: 47 private:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 infobar_service = 92 infobar_service =
93 InfoBarService::FromWebContents(tab_strip->GetWebContentsAt(0)); 93 InfoBarService::FromWebContents(tab_strip->GetWebContentsAt(0));
94 EXPECT_EQ(1U, infobar_service->infobar_count()); 94 EXPECT_EQ(1U, infobar_service->infobar_count());
95 95
96 // This used to crash. 96 // This used to crash.
97 infobar->Accept(); 97 infobar->Accept();
98 98
99 // Ramp down the test. 99 // Ramp down the test.
100 tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE); 100 tab_strip->CloseWebContentsAt(0, TabStripModel::CLOSE_NONE);
101 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698