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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/background/background_contents_service.h" | 8 #include "chrome/browser/background/background_contents_service.h" |
9 #include "chrome/browser/background/background_contents_service_factory.h" | 9 #include "chrome/browser/background/background_contents_service_factory.h" |
10 #include "chrome/browser/background/background_mode_manager.h" | 10 #include "chrome/browser/background/background_mode_manager.h" |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 UnloadExtensionViaTask(extension->id()); | 598 UnloadExtensionViaTask(extension->id()); |
599 content::RunAllPendingInMessageLoop(); | 599 content::RunAllPendingInMessageLoop(); |
600 ASSERT_TRUE(WaitForBackgroundMode(false)); | 600 ASSERT_TRUE(WaitForBackgroundMode(false)); |
601 } | 601 } |
602 | 602 |
603 // Verify active NaCl embeds cause many keepalive impulses to be sent. | 603 // Verify active NaCl embeds cause many keepalive impulses to be sent. |
604 // Disabled on Windows due to flakiness: http://crbug.com/346278 | 604 // Disabled on Windows due to flakiness: http://crbug.com/346278 |
605 #if defined(OS_WIN) | 605 #if defined(OS_WIN) |
606 #define MAYBE_BackgroundKeepaliveActive DISABLED_BackgroundKeepaliveActive | 606 #define MAYBE_BackgroundKeepaliveActive DISABLED_BackgroundKeepaliveActive |
607 #else | 607 #else |
608 #define MAYBE_BackgroundKeepaliveActive BackgroundKeepaliveActive | 608 // Disabling other platforms too since the test started failing |
| 609 // consistently. http://crbug.com/490440 |
| 610 #define MAYBE_BackgroundKeepaliveActive DISABLED_BackgroundKeepaliveActive |
609 #endif | 611 #endif |
610 IN_PROC_BROWSER_TEST_F(AppBackgroundPageNaClTest, | 612 IN_PROC_BROWSER_TEST_F(AppBackgroundPageNaClTest, |
611 MAYBE_BackgroundKeepaliveActive) { | 613 MAYBE_BackgroundKeepaliveActive) { |
612 #if !defined(DISABLE_NACL) | 614 #if !defined(DISABLE_NACL) |
613 ExtensionTestMessageListener nacl_modules_loaded("nacl_modules_loaded", true); | 615 ExtensionTestMessageListener nacl_modules_loaded("nacl_modules_loaded", true); |
614 LaunchTestingApp(); | 616 LaunchTestingApp(); |
615 extensions::ProcessManager* manager = | 617 extensions::ProcessManager* manager = |
616 extensions::ProcessManager::Get(browser()->profile()); | 618 extensions::ProcessManager::Get(browser()->profile()); |
617 ImpulseCallbackCounter active_impulse_counter(manager, extension()->id()); | 619 ImpulseCallbackCounter active_impulse_counter(manager, extension()->id()); |
618 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); | 620 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); |
(...skipping 23 matching lines...) Expand all Loading... |
642 extensions::ProcessManager::Get(browser()->profile()); | 644 extensions::ProcessManager::Get(browser()->profile()); |
643 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id()); | 645 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id()); |
644 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); | 646 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); |
645 | 647 |
646 manager->SetKeepaliveImpulseDecrementCallbackForTesting( | 648 manager->SetKeepaliveImpulseDecrementCallbackForTesting( |
647 idle_impulse_counter.SetGoalAndGetCallback(1)); | 649 idle_impulse_counter.SetGoalAndGetCallback(1)); |
648 nacl_modules_loaded.Reply("be idle"); | 650 nacl_modules_loaded.Reply("be idle"); |
649 idle_impulse_counter.Wait(); | 651 idle_impulse_counter.Wait(); |
650 #endif | 652 #endif |
651 } | 653 } |
OLD | NEW |