| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/first_run/first_run.h" | 10 #include "chrome/browser/first_run/first_run.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 BrowserInit::IsFirstRun first_run = FirstRun::IsChromeFirstRun() ? | 282 BrowserInit::IsFirstRun first_run = FirstRun::IsChromeFirstRun() ? |
| 283 BrowserInit::IS_FIRST_RUN : BrowserInit::IS_NOT_FIRST_RUN; | 283 BrowserInit::IS_FIRST_RUN : BrowserInit::IS_NOT_FIRST_RUN; |
| 284 BrowserInit::LaunchWithProfile launch(FilePath(), command_line, first_run); | 284 BrowserInit::LaunchWithProfile launch(FilePath(), command_line, first_run); |
| 285 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false)); | 285 ASSERT_TRUE(launch.Launch(browser()->profile(), std::vector<GURL>(), false)); |
| 286 | 286 |
| 287 // The launch should have created a new browser, with a panel type. | 287 // The launch should have created a new browser, with a panel type. |
| 288 Browser* new_browser = NULL; | 288 Browser* new_browser = NULL; |
| 289 ASSERT_NO_FATAL_FAILURE(FindOneOtherBrowser(&new_browser)); | 289 ASSERT_NO_FATAL_FAILURE(FindOneOtherBrowser(&new_browser)); |
| 290 | 290 |
| 291 // Expect an app panel. | 291 // Expect an app panel. |
| 292 #if defined(USE_AURA) |
| 293 // In aura, apps open in popup windows. |
| 294 EXPECT_TRUE(new_browser->is_type_popup() && new_browser->is_app()); |
| 295 #else |
| 292 EXPECT_TRUE(new_browser->is_type_panel() && new_browser->is_app()); | 296 EXPECT_TRUE(new_browser->is_type_panel() && new_browser->is_app()); |
| 297 #endif |
| 293 | 298 |
| 294 // The new browser's app_name should include the app's ID. | 299 // The new browser's app_name should include the app's ID. |
| 295 EXPECT_NE( | 300 EXPECT_NE( |
| 296 new_browser->app_name_.find(extension_app->id()), | 301 new_browser->app_name_.find(extension_app->id()), |
| 297 std::string::npos) << new_browser->app_name_; | 302 std::string::npos) << new_browser->app_name_; |
| 298 } | 303 } |
| 299 | 304 |
| 300 #endif // !defined(OS_MACOSX) | 305 #endif // !defined(OS_MACOSX) |
| OLD | NEW |