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

Side by Side Diff: chrome/browser/browser_init_browsertest.cc

Issue 329017: Remove deprecated CommandLine(std::wstring) ctor. (Closed)
Patch Set: Created 11 years, 2 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 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/browser_init.h" 6 #include "chrome/browser/browser_init.h"
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/browser_window.h" 8 #include "chrome/browser/browser_window.h"
9 #include "chrome/test/in_process_browser_test.h" 9 #include "chrome/test/in_process_browser_test.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 28 matching lines...) Expand all
39 // platform UI toolkit messages, and those messages are not sent during unit 39 // platform UI toolkit messages, and those messages are not sent during unit
40 // testing sessions. 40 // testing sessions.
41 41
42 OpenURLsPopupObserver observer; 42 OpenURLsPopupObserver observer;
43 BrowserList::AddObserver(&observer); 43 BrowserList::AddObserver(&observer);
44 44
45 Browser* popup = Browser::CreateForPopup(browser()->profile()); 45 Browser* popup = Browser::CreateForPopup(browser()->profile());
46 ASSERT_EQ(popup->type(), Browser::TYPE_POPUP); 46 ASSERT_EQ(popup->type(), Browser::TYPE_POPUP);
47 ASSERT_EQ(popup, observer.added_browser_); 47 ASSERT_EQ(popup, observer.added_browser_);
48 48
49 CommandLine dummy((std::wstring())); 49 CommandLine dummy(CommandLine::ARGUMENTS_ONLY);
50 BrowserInit::LaunchWithProfile launch(std::wstring(), dummy); 50 BrowserInit::LaunchWithProfile launch(std::wstring(), dummy);
51 // This should create a new window, but re-use the profile from |popup|. If 51 // This should create a new window, but re-use the profile from |popup|. If
52 // it used a NULL or invalid profile, it would crash. 52 // it used a NULL or invalid profile, it would crash.
53 launch.OpenURLsInBrowser(popup, false, urls); 53 launch.OpenURLsInBrowser(popup, false, urls);
54 ASSERT_NE(popup, observer.added_browser_); 54 ASSERT_NE(popup, observer.added_browser_);
55 BrowserList::RemoveObserver(&observer); 55 BrowserList::RemoveObserver(&observer);
56 } 56 }
57 57
58 } // namespace 58 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/extensions/extensions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698