| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 ASSERT_TRUE(test_server()->Start()); | 1403 ASSERT_TRUE(test_server()->Start()); |
| 1404 | 1404 |
| 1405 // Load an app | 1405 // Load an app |
| 1406 host_resolver()->AddRule("www.example.com", "127.0.0.1"); | 1406 host_resolver()->AddRule("www.example.com", "127.0.0.1"); |
| 1407 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); | 1407 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app/"))); |
| 1408 const Extension* extension_app = GetExtension(); | 1408 const Extension* extension_app = GetExtension(); |
| 1409 | 1409 |
| 1410 // Launch it in a window, as AppLauncherHandler::HandleLaunchApp() would. | 1410 // Launch it in a window, as AppLauncherHandler::HandleLaunchApp() would. |
| 1411 WebContents* app_window = OpenApplication( | 1411 WebContents* app_window = OpenApplication( |
| 1412 AppLaunchParams(browser()->profile(), extension_app, | 1412 AppLaunchParams(browser()->profile(), extension_app, |
| 1413 extensions::LAUNCH_WINDOW, NEW_WINDOW)); | 1413 extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW)); |
| 1414 ASSERT_TRUE(app_window); | 1414 ASSERT_TRUE(app_window); |
| 1415 | 1415 |
| 1416 // Apps launched in a window from the NTP have an extensions tab helper but | 1416 // Apps launched in a window from the NTP have an extensions tab helper but |
| 1417 // do not have extension_app set in it. | 1417 // do not have extension_app set in it. |
| 1418 ASSERT_TRUE(extensions::TabHelper::FromWebContents(app_window)); | 1418 ASSERT_TRUE(extensions::TabHelper::FromWebContents(app_window)); |
| 1419 EXPECT_FALSE( | 1419 EXPECT_FALSE( |
| 1420 extensions::TabHelper::FromWebContents(app_window)->extension_app()); | 1420 extensions::TabHelper::FromWebContents(app_window)->extension_app()); |
| 1421 EXPECT_EQ(extensions::AppLaunchInfo::GetFullLaunchURL(extension_app), | 1421 EXPECT_EQ(extensions::AppLaunchInfo::GetFullLaunchURL(extension_app), |
| 1422 app_window->GetURL()); | 1422 app_window->GetURL()); |
| 1423 | 1423 |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 exp_commit_size.Enlarge(wcv_resize_insets.width(), | 2552 exp_commit_size.Enlarge(wcv_resize_insets.width(), |
| 2553 wcv_resize_insets.height() + height_inset); | 2553 wcv_resize_insets.height() + height_inset); |
| 2554 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2554 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
| 2555 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2555 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
| 2556 // Sizes of RenderWidgetHostView and WebContentsView before and after | 2556 // Sizes of RenderWidgetHostView and WebContentsView before and after |
| 2557 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. | 2557 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. |
| 2558 EXPECT_EQ(rwhv_commit_size2, | 2558 EXPECT_EQ(rwhv_commit_size2, |
| 2559 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2559 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
| 2560 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); | 2560 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); |
| 2561 } | 2561 } |
| OLD | NEW |