| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); | 1311 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); |
| 1312 const Extension* extension_app = GetExtension(); | 1312 const Extension* extension_app = GetExtension(); |
| 1313 | 1313 |
| 1314 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 1314 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
| 1315 command_line.AppendSwitchASCII(switches::kAppId, extension_app->id()); | 1315 command_line.AppendSwitchASCII(switches::kAppId, extension_app->id()); |
| 1316 | 1316 |
| 1317 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? | 1317 chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? |
| 1318 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; | 1318 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; |
| 1319 StartupBrowserCreatorImpl launch(base::FilePath(), command_line, first_run); | 1319 StartupBrowserCreatorImpl launch(base::FilePath(), command_line, first_run); |
| 1320 | 1320 |
| 1321 bool new_bookmark_apps_enabled = | 1321 bool new_bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled(); |
| 1322 extensions::util::IsStreamlinedHostedAppsEnabled(); | |
| 1323 | 1322 |
| 1324 // If the new bookmark app flow is enabled, the app should open as an tab. | 1323 // If the new bookmark app flow is enabled, the app should open as an tab. |
| 1325 // Otherwise the app should open as an app window. | 1324 // Otherwise the app should open as an app window. |
| 1326 EXPECT_EQ(!new_bookmark_apps_enabled, | 1325 EXPECT_EQ(!new_bookmark_apps_enabled, |
| 1327 launch.OpenApplicationWindow(browser()->profile(), NULL)); | 1326 launch.OpenApplicationWindow(browser()->profile(), NULL)); |
| 1328 EXPECT_EQ(new_bookmark_apps_enabled, | 1327 EXPECT_EQ(new_bookmark_apps_enabled, |
| 1329 launch.OpenApplicationTab(browser()->profile())); | 1328 launch.OpenApplicationTab(browser()->profile())); |
| 1330 | 1329 |
| 1331 // Check that a the number of browsers and tabs is correct. | 1330 // Check that a the number of browsers and tabs is correct. |
| 1332 unsigned int expected_browsers = 1; | 1331 unsigned int expected_browsers = 1; |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2744 #endif | 2743 #endif |
| 2745 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2744 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
| 2746 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2745 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
| 2747 gfx::Size exp_final_size(initial_wcv_size); | 2746 gfx::Size exp_final_size(initial_wcv_size); |
| 2748 exp_final_size.Enlarge(wcv_resize_insets.width(), | 2747 exp_final_size.Enlarge(wcv_resize_insets.width(), |
| 2749 wcv_resize_insets.height() + height_inset); | 2748 wcv_resize_insets.height() + height_inset); |
| 2750 EXPECT_EQ(exp_final_size, | 2749 EXPECT_EQ(exp_final_size, |
| 2751 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2750 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
| 2752 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); | 2751 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); |
| 2753 } | 2752 } |
| OLD | NEW |