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

Side by Side Diff: chrome/browser/apps/guest_view/app_view_browsertest.cc

Issue 2527823002: Disable flaky KillGuestCommunicatingWithWrongAppView on Linux. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <utility> 5 #include <utility>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "components/guest_view/browser/guest_view_manager.h" 10 #include "components/guest_view/browser/guest_view_manager.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 int invalid_guest_instance_id = 231 int invalid_guest_instance_id =
232 test_guest_view_manager()->GetNextInstanceID(); 232 test_guest_view_manager()->GetNextInstanceID();
233 // Call the desired function to verify that the |bad_app| gets killed if 233 // Call the desired function to verify that the |bad_app| gets killed if
234 // the provided |guest_instance_id| is not mapped to any "GuestView"'s. 234 // the provided |guest_instance_id| is not mapped to any "GuestView"'s.
235 extensions::AppViewGuest::CompletePendingRequest( 235 extensions::AppViewGuest::CompletePendingRequest(
236 browser()->profile(), GURL("about:blank"), invalid_guest_instance_id, 236 browser()->profile(), GURL("about:blank"), invalid_guest_instance_id,
237 bad_app->id(), bad_app_render_process_host); 237 bad_app->id(), bad_app_render_process_host);
238 exit_observer.WaitUntilRenderProcessHostKilled(); 238 exit_observer.WaitUntilRenderProcessHostKilled();
239 } 239 }
240 240
241 IN_PROC_BROWSER_TEST_P(AppViewTest, KillGuestCommunicatingWithWrongAppView) { 241 #if defined(OS_LINUX)
242 #define MAYBE_KillGuestCommunicatingWithWrongAppView \
243 DISABLED_KillGuestCommunicatingWithWrongAppView
244 #else
245 #define MAYBE_KillGuestCommunicatingWithWrongAppView \
246 KillGuestCommunicatingWithWrongAppView
247 #endif
248 IN_PROC_BROWSER_TEST_P(AppViewTest,
249 MAYBE_KillGuestCommunicatingWithWrongAppView) {
242 const extensions::Extension* host_app = 250 const extensions::Extension* host_app =
243 LoadAndLaunchPlatformApp("app_view/host_app", "AppViewTest.LAUNCHED"); 251 LoadAndLaunchPlatformApp("app_view/host_app", "AppViewTest.LAUNCHED");
244 const extensions::Extension* guest_app = 252 const extensions::Extension* guest_app =
245 InstallPlatformApp("app_view/guest_app"); 253 InstallPlatformApp("app_view/guest_app");
246 const extensions::Extension* bad_app = 254 const extensions::Extension* bad_app =
247 LoadAndLaunchPlatformApp("app_view/bad_app", "AppViewTest.LAUNCHED"); 255 LoadAndLaunchPlatformApp("app_view/bad_app", "AppViewTest.LAUNCHED");
248 // The host app attemps to embed the guest 256 // The host app attemps to embed the guest
249 EXPECT_TRUE(content::ExecuteScript( 257 EXPECT_TRUE(content::ExecuteScript(
250 extensions::AppWindowRegistry::Get(browser()->profile()) 258 extensions::AppWindowRegistry::Get(browser()->profile())
251 ->GetCurrentAppWindowForApp(host_app->id()) 259 ->GetCurrentAppWindowForApp(host_app->id())
(...skipping 19 matching lines...) Expand all
271 extensions::AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( 279 extensions::AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent(
272 browser()->profile(), std::move(fake_embed_request_param), bad_app); 280 browser()->profile(), std::move(fake_embed_request_param), bad_app);
273 bad_app_obs.WaitUntilRenderProcessHostKilled(); 281 bad_app_obs.WaitUntilRenderProcessHostKilled();
274 // Now ask the guest to continue embedding. 282 // Now ask the guest to continue embedding.
275 ASSERT_TRUE( 283 ASSERT_TRUE(
276 ExecuteScript(extensions::ProcessManager::Get(browser()->profile()) 284 ExecuteScript(extensions::ProcessManager::Get(browser()->profile())
277 ->GetBackgroundHostForExtension(guest_app->id()) 285 ->GetBackgroundHostForExtension(guest_app->id())
278 ->web_contents(), 286 ->web_contents(),
279 "continueEmbedding();")); 287 "continueEmbedding();"));
280 } 288 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698