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

Unified Diff: chrome/browser/apps/guest_view/app_view_browsertest.cc

Issue 1864283002: Implement <appview> based on out-of-process iframes GuestView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extensionoptions
Patch Set: app shell test Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | extensions/browser/guest_view/app_view/app_view_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/guest_view/app_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/app_view_browsertest.cc b/chrome/browser/apps/guest_view/app_view_browsertest.cc
index a98d943877ea714413651180c4a8dced6f020284..822acb3480725a6a31189e41668d0eb34b1da031 100644
--- a/chrome/browser/apps/guest_view/app_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/app_view_browsertest.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_process_host_observer.h"
+#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api/app_runtime/app_runtime_api.h"
@@ -27,6 +28,7 @@
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
+#include "testing/gtest/include/gtest/gtest.h"
using extensions::ExtensionsAPIClient;
using guest_view::GuestViewManager;
@@ -75,7 +77,8 @@ class RenderProcessHostObserverForExit
} // namespace
-class AppViewTest : public extensions::PlatformAppBrowserTest {
+class AppViewTest : public extensions::PlatformAppBrowserTest,
+ public testing::WithParamInterface<bool> {
public:
AppViewTest() {
GuestViewManager::set_factory_for_testing(&factory_);
@@ -129,6 +132,10 @@ class AppViewTest : public extensions::PlatformAppBrowserTest {
private:
void SetUpCommandLine(base::CommandLine* command_line) override {
extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
+
+ bool use_cross_process_frames_for_guests = GetParam();
+ if (use_cross_process_frames_for_guests)
+ command_line->AppendSwitch(switches::kUseCrossProcessFramesForGuests);
}
void SetUpOnMainThread() override {
@@ -147,8 +154,10 @@ class AppViewTest : public extensions::PlatformAppBrowserTest {
DISALLOW_COPY_AND_ASSIGN(AppViewTest);
};
+INSTANTIATE_TEST_CASE_P(AppViewTests, AppViewTest, testing::Bool());
+
// Tests that <appview> is able to navigate to another installed app.
-IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewWithUndefinedDataShouldSucceed) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, TestAppViewWithUndefinedDataShouldSucceed) {
const extensions::Extension* skeleton_app =
InstallPlatformApp("app_view/shim/skeleton");
TestHelper("testAppViewWithUndefinedDataShouldSucceed",
@@ -158,7 +167,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewWithUndefinedDataShouldSucceed) {
}
// Tests that <appview> correctly processes parameters passed on connect.
-IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewRefusedDataShouldFail) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, TestAppViewRefusedDataShouldFail) {
const extensions::Extension* skeleton_app =
InstallPlatformApp("app_view/shim/skeleton");
TestHelper("testAppViewRefusedDataShouldFail",
@@ -168,7 +177,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewRefusedDataShouldFail) {
}
// Tests that <appview> correctly processes parameters passed on connect.
-IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewGoodDataShouldSucceed) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, TestAppViewGoodDataShouldSucceed) {
const extensions::Extension* skeleton_app =
InstallPlatformApp("app_view/shim/skeleton");
TestHelper("testAppViewGoodDataShouldSucceed",
@@ -178,7 +187,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewGoodDataShouldSucceed) {
}
// Tests that <appview> correctly handles multiple successive connects.
-IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewMultipleConnects) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, TestAppViewMultipleConnects) {
const extensions::Extension* skeleton_app =
InstallPlatformApp("app_view/shim/skeleton");
TestHelper("testAppViewMultipleConnects",
@@ -188,7 +197,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewMultipleConnects) {
}
// Tests that <appview> does not embed self (the app which owns appview).
-IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewEmbedSelfShouldFail) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, TestAppViewEmbedSelfShouldFail) {
const extensions::Extension* skeleton_app =
InstallPlatformApp("app_view/shim/skeleton");
TestHelper("testAppViewEmbedSelfShouldFail",
@@ -197,7 +206,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewEmbedSelfShouldFail) {
NO_TEST_SERVER);
}
-IN_PROC_BROWSER_TEST_F(AppViewTest, KillGuestWithInvalidInstanceID) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, KillGuestWithInvalidInstanceID) {
const extensions::Extension* bad_app =
LoadAndLaunchPlatformApp("app_view/bad_app", "AppViewTest.LAUNCHED");
@@ -221,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(AppViewTest, KillGuestWithInvalidInstanceID) {
exit_observer.WaitUntilRenderProcessHostKilled();
}
-IN_PROC_BROWSER_TEST_F(AppViewTest, KillGuestCommunicatingWithWrongAppView) {
+IN_PROC_BROWSER_TEST_P(AppViewTest, KillGuestCommunicatingWithWrongAppView) {
const extensions::Extension* host_app =
LoadAndLaunchPlatformApp("app_view/host_app", "AppViewTest.LAUNCHED");
const extensions::Extension* guest_app =
« no previous file with comments | « no previous file | extensions/browser/guest_view/app_view/app_view_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698