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

Side by Side Diff: chrome/browser/task_manager/task_manager_browsertest.cc

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments Created 8 years, 4 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 | 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 "chrome/browser/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
10 #include "chrome/browser/background/background_contents_service.h" 10 #include "chrome/browser/background/background_contents_service.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 // Kill the extension process and make sure we notice it. 448 // Kill the extension process and make sure we notice it.
449 TaskManager::GetInstance()->KillProcess(2); 449 TaskManager::GetInstance()->KillProcess(2);
450 TaskManagerBrowserTestUtil::WaitForResourceChange(2); 450 TaskManagerBrowserTestUtil::WaitForResourceChange(2);
451 451
452 // Reload the extension using the "crashed extension" infobar while the task 452 // Reload the extension using the "crashed extension" infobar while the task
453 // manager is still visible. Make sure we don't crash and the extension 453 // manager is still visible. Make sure we don't crash and the extension
454 // gets reloaded and noticed in the task manager. 454 // gets reloaded and noticed in the task manager.
455 InfoBarTabHelper* infobar_helper = 455 InfoBarTabHelper* infobar_helper =
456 chrome::GetActiveTabContents(browser())->infobar_tab_helper(); 456 chrome::GetActiveTabContents(browser())->infobar_tab_helper();
457 ASSERT_EQ(1U, infobar_helper->infobar_count()); 457 ASSERT_EQ(1U, infobar_helper->GetInfoBarCount());
458 ConfirmInfoBarDelegate* delegate = infobar_helper-> 458 ConfirmInfoBarDelegate* delegate = infobar_helper->
459 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); 459 GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate();
460 ASSERT_TRUE(delegate); 460 ASSERT_TRUE(delegate);
461 delegate->Accept(); 461 delegate->Accept();
462 TaskManagerBrowserTestUtil::WaitForResourceChange(3); 462 TaskManagerBrowserTestUtil::WaitForResourceChange(3);
463 } 463 }
464 464
465 #if defined(OS_WIN) 465 #if defined(OS_WIN)
466 // http://crbug.com/93158. 466 // http://crbug.com/93158.
467 #define MAYBE_ReloadExtension DISABLED_ReloadExtension 467 #define MAYBE_ReloadExtension DISABLED_ReloadExtension
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 TaskManagerBrowserTestUtil::WaitForResourceChange(3); 531 TaskManagerBrowserTestUtil::WaitForResourceChange(3);
532 532
533 // Check that we get some value for the cache columns. 533 // Check that we get some value for the cache columns.
534 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2), 534 DCHECK_NE(model()->GetResourceWebCoreImageCacheSize(2),
535 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); 535 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT));
536 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2), 536 DCHECK_NE(model()->GetResourceWebCoreScriptsCacheSize(2),
537 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); 537 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT));
538 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2), 538 DCHECK_NE(model()->GetResourceWebCoreCSSCacheSize(2),
539 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT)); 539 l10n_util::GetStringUTF16(IDS_TASK_MANAGER_NA_CELL_TEXT));
540 } 540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698