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

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

Issue 10833029: Move ui_test_utils::CrashTab to browser_test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/extensions/extension_host.h" 6 #include "chrome/browser/extensions/extension_host.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/process_map.h" 8 #include "chrome/browser/extensions/process_map.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 EXPECT_TRUE(process_map->Contains( 570 EXPECT_TRUE(process_map->Contains(
571 contents->GetRenderProcessHost()->GetID())); 571 contents->GetRenderProcessHost()->GetID()));
572 bool is_installed = false; 572 bool is_installed = false;
573 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( 573 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
574 contents->GetRenderViewHost(), L"", 574 contents->GetRenderViewHost(), L"",
575 L"window.domAutomationController.send(chrome.app.isInstalled)", 575 L"window.domAutomationController.send(chrome.app.isInstalled)",
576 &is_installed)); 576 &is_installed));
577 ASSERT_TRUE(is_installed); 577 ASSERT_TRUE(is_installed);
578 578
579 // Crash the tab and reload it, chrome.app.isInstalled should still be true. 579 // Crash the tab and reload it, chrome.app.isInstalled should still be true.
580 ui_test_utils::CrashTab(chrome::GetActiveWebContents(browser())); 580 content::CrashTab(chrome::GetActiveWebContents(browser()));
581 content::WindowedNotificationObserver observer( 581 content::WindowedNotificationObserver observer(
582 content::NOTIFICATION_LOAD_STOP, 582 content::NOTIFICATION_LOAD_STOP,
583 content::Source<NavigationController>( 583 content::Source<NavigationController>(
584 &chrome::GetActiveWebContents(browser())->GetController())); 584 &chrome::GetActiveWebContents(browser())->GetController()));
585 chrome::Reload(browser(), CURRENT_TAB); 585 chrome::Reload(browser(), CURRENT_TAB);
586 observer.Wait(); 586 observer.Wait();
587 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( 587 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
588 contents->GetRenderViewHost(), L"", 588 contents->GetRenderViewHost(), L"",
589 L"window.domAutomationController.send(chrome.app.isInstalled)", 589 L"window.domAutomationController.send(chrome.app.isInstalled)",
590 &is_installed)); 590 &is_installed));
591 ASSERT_TRUE(is_installed); 591 ASSERT_TRUE(is_installed);
592 } 592 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_browsertest.cc ('k') | chrome/browser/extensions/isolated_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698