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

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

Issue 60613004: Add KeepaliveImpulse to extension process manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tapted comments addressed Created 7 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 | Annotate | Revision Log
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/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "chrome/app/chrome_command_ids.h" 6 #include "chrome/app/chrome_command_ids.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 TestEnabledContextMenu(true); 602 TestEnabledContextMenu(true);
603 TestEnabledContextMenu(false); 603 TestEnabledContextMenu(false);
604 } 604 }
605 605
606 class ExtensionContextMenuBrowserLazyTest : 606 class ExtensionContextMenuBrowserLazyTest :
607 public ExtensionContextMenuBrowserTest { 607 public ExtensionContextMenuBrowserTest {
608 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 608 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
609 ExtensionContextMenuBrowserTest::SetUpCommandLine(command_line); 609 ExtensionContextMenuBrowserTest::SetUpCommandLine(command_line);
610 // Set shorter delays to prevent test timeouts. 610 // Set shorter delays to prevent test timeouts.
611 command_line->AppendSwitchASCII( 611 command_line->AppendSwitchASCII(
612 extensions::switches::kEventPageIdleTime, "0"); 612 extensions::switches::kEventPageIdleTime, "1");
613 command_line->AppendSwitchASCII( 613 command_line->AppendSwitchASCII(
614 extensions::switches::kEventPageSuspendingTime, "0"); 614 extensions::switches::kEventPageSuspendingTime, "0");
615 } 615 }
616 }; 616 };
617 617
618 IN_PROC_BROWSER_TEST_F(ExtensionContextMenuBrowserLazyTest, EventPage) { 618 IN_PROC_BROWSER_TEST_F(ExtensionContextMenuBrowserLazyTest, EventPage) {
619 GURL about_blank("about:blank"); 619 GURL about_blank("about:blank");
620 LazyBackgroundObserver page_complete; 620 LazyBackgroundObserver page_complete;
621 const extensions::Extension* extension = LoadContextMenuExtension( 621 const extensions::Extension* extension = LoadContextMenuExtension(
622 "event_page"); 622 "event_page");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 ASSERT_TRUE(LoadContextMenuExtensionIncognito("incognito")); 659 ASSERT_TRUE(LoadContextMenuExtensionIncognito("incognito"));
660 660
661 // Wait for the extension's processes to tell us they've created an item. 661 // Wait for the extension's processes to tell us they've created an item.
662 ASSERT_TRUE(created.WaitUntilSatisfied()); 662 ASSERT_TRUE(created.WaitUntilSatisfied());
663 ASSERT_TRUE(created_incognito.WaitUntilSatisfied()); 663 ASSERT_TRUE(created_incognito.WaitUntilSatisfied());
664 ASSERT_EQ(2u, GetItems().size()); 664 ASSERT_EQ(2u, GetItems().size());
665 665
666 browser()->profile()->DestroyOffTheRecordProfile(); 666 browser()->profile()->DestroyOffTheRecordProfile();
667 ASSERT_EQ(1u, GetItems().size()); 667 ASSERT_EQ(1u, GetItems().size());
668 } 668 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698