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

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

Issue 10795090: Move ExecuteJavaScript functions from ui_test_utils.h to browser_test_utils.h so they can be reused… (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/app_process_apitest.cc
===================================================================
--- chrome/browser/extensions/app_process_apitest.cc (revision 148111)
+++ chrome/browser/extensions/app_process_apitest.cc (working copy)
@@ -25,6 +25,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/base/mock_host_resolver.h"
@@ -212,7 +213,7 @@
EXPECT_EQ(tab->GetRenderProcessHost(),
chrome::GetWebContentsAt(browser(), 6)->GetRenderProcessHost());
bool windowOpenerValid = false;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
chrome::GetWebContentsAt(browser(), 6)->GetRenderViewHost(), L"",
L"window.domAutomationController.send(window.opener != null)",
&windowOpenerValid));
@@ -412,8 +413,8 @@
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&chrome::GetActiveWebContents(browser())->GetController()));
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
- L"", L"location.reload();"));
+ ASSERT_TRUE(content::ExecuteJavaScript(contents->GetRenderViewHost(),
+ L"", L"location.reload();"));
js_reload_observer.Wait();
EXPECT_TRUE(process_map->Contains(
contents->GetRenderProcessHost()->GetID()));
@@ -424,8 +425,8 @@
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&chrome::GetActiveWebContents(browser())->GetController()));
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
- L"", L"location = location;"));
+ ASSERT_TRUE(content::ExecuteJavaScript(contents->GetRenderViewHost(),
+ L"", L"location = location;"));
js_reload_observer2.Wait();
EXPECT_FALSE(process_map->Contains(
contents->GetRenderProcessHost()->GetID()));
@@ -500,7 +501,7 @@
// App has loaded, and chrome.app.isInstalled should be true.
bool is_installed = false;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
L"window.domAutomationController.send(chrome.app.isInstalled)",
&is_installed));
@@ -569,7 +570,7 @@
EXPECT_TRUE(process_map->Contains(
contents->GetRenderProcessHost()->GetID()));
bool is_installed = false;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
contents->GetRenderViewHost(), L"",
L"window.domAutomationController.send(chrome.app.isInstalled)",
&is_installed));
@@ -583,7 +584,7 @@
&chrome::GetActiveWebContents(browser())->GetController()));
chrome::Reload(browser(), CURRENT_TAB);
observer.Wait();
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
contents->GetRenderViewHost(), L"",
L"window.domAutomationController.send(chrome.app.isInstalled)",
&is_installed));

Powered by Google App Engine
This is Rietveld 408576698