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

Side by Side Diff: chrome/browser/extensions/app_background_page_apitest.cc

Issue 2299803002: Revert of Disabled flaky test AppBackgroundPageApiTest.NoJsBackgroundPage (Closed)
Patch Set: Created 4 years, 3 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 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 (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 "base/location.h" 5 #include "base/location.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // the app was loaded. 297 // the app was loaded.
298 ASSERT_TRUE(WaitForBackgroundMode(true)); 298 ASSERT_TRUE(WaitForBackgroundMode(true));
299 299
300 const Extension* extension = GetSingleLoadedExtension(); 300 const Extension* extension = GetSingleLoadedExtension();
301 ASSERT_TRUE( 301 ASSERT_TRUE(
302 BackgroundContentsServiceFactory::GetForProfile(browser()->profile())-> 302 BackgroundContentsServiceFactory::GetForProfile(browser()->profile())->
303 GetAppBackgroundContents(ASCIIToUTF16(extension->id()))); 303 GetAppBackgroundContents(ASCIIToUTF16(extension->id())));
304 UnloadExtension(extension->id()); 304 UnloadExtension(extension->id());
305 } 305 }
306 306
307 // TODO(crbug.com/642482) Disabled test for flakyness. 307 IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, NoJsBackgroundPage) {
308 IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, DISABLED_NoJsBackgroundPage) {
309 // Keep the task manager up through this test to verify that a crash doesn't 308 // Keep the task manager up through this test to verify that a crash doesn't
310 // happen when window.open creates a background page that switches 309 // happen when window.open creates a background page that switches
311 // RenderViewHosts. See http://crbug.com/165138. 310 // RenderViewHosts. See http://crbug.com/165138.
312 chrome::ShowTaskManager(browser()); 311 chrome::ShowTaskManager(browser());
313 312
314 // Make sure that no BackgroundContentses get deleted (a signal that repeated 313 // Make sure that no BackgroundContentses get deleted (a signal that repeated
315 // window.open calls recreate instances, instead of being no-ops). 314 // window.open calls recreate instances, instead of being no-ops).
316 content::TestNotificationTracker background_deleted_tracker; 315 content::TestNotificationTracker background_deleted_tracker;
317 background_deleted_tracker.ListenFor( 316 background_deleted_tracker.ListenFor(
318 chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED, 317 chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 extensions::ProcessManager::Get(browser()->profile()); 634 extensions::ProcessManager::Get(browser()->profile());
636 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id()); 635 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id());
637 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); 636 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied());
638 637
639 manager->SetKeepaliveImpulseDecrementCallbackForTesting( 638 manager->SetKeepaliveImpulseDecrementCallbackForTesting(
640 idle_impulse_counter.SetGoalAndGetCallback(1)); 639 idle_impulse_counter.SetGoalAndGetCallback(1));
641 nacl_modules_loaded.Reply("be idle"); 640 nacl_modules_loaded.Reply("be idle");
642 idle_impulse_counter.Wait(); 641 idle_impulse_counter.Wait();
643 #endif 642 #endif
644 } 643 }
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