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

Unified Diff: chrome/browser/extensions/app_process_apitest.cc

Issue 10535077: TabContentsWrapper -> TabContents, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/app_process_apitest.cc
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 78481ba9e7bbaa2db5923a2c2ae88a74331a0e97..1c23037ea470b0eaf40e2b619414525ba430a8ef 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
@@ -386,8 +386,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_ReloadIntoAppProcess) {
ui_test_utils::WindowedNotificationObserver reload_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->web_contents()->
- GetController()));
+ &browser()->GetActiveWebContents()->GetController()));
browser()->Reload(CURRENT_TAB);
reload_observer.Wait();
EXPECT_TRUE(process_map->Contains(
@@ -398,8 +397,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_ReloadIntoAppProcess) {
ui_test_utils::WindowedNotificationObserver reload_observer2(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->web_contents()->
- GetController()));
+ &browser()->GetActiveWebContents()->GetController()));
browser()->Reload(CURRENT_TAB);
reload_observer2.Wait();
EXPECT_FALSE(process_map->Contains(
@@ -410,8 +408,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_ReloadIntoAppProcess) {
ui_test_utils::WindowedNotificationObserver js_reload_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->web_contents()->
- GetController()));
+ &browser()->GetActiveWebContents()->GetController()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
L"", L"location.reload();"));
js_reload_observer.Wait();
@@ -423,8 +420,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_ReloadIntoAppProcess) {
ui_test_utils::WindowedNotificationObserver js_reload_observer2(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->web_contents()->
- GetController()));
+ &browser()->GetActiveWebContents()->GetController()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
L"", L"location = location;"));
js_reload_observer2.Wait();
@@ -502,7 +498,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromExtension) {
// App has loaded, and chrome.app.isInstalled should be true.
bool is_installed = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
+ browser()->GetActiveWebContents()->GetRenderViewHost(), L"",
L"window.domAutomationController.send(chrome.app.isInstalled)",
&is_installed));
ASSERT_TRUE(is_installed);
@@ -577,12 +573,11 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_ReloadAppAfterCrash) {
ASSERT_TRUE(is_installed);
// Crash the tab and reload it, chrome.app.isInstalled should still be true.
- ui_test_utils::CrashTab(browser()->GetSelectedWebContents());
+ ui_test_utils::CrashTab(browser()->GetActiveWebContents());
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContentsWrapper()->web_contents()->
- GetController()));
+ &browser()->GetActiveWebContents()->GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui.cc ('k') | chrome/browser/extensions/chrome_app_api_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698