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

Side by Side Diff: chrome/browser/ui/webui/inspect_ui_browsertest.cc

Issue 11728003: Change ExecuteJavaScript* helper functions in browser_test_utils.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding files for gpu_tests and NaCl browser tests. Created 7 years, 11 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 #include "chrome/browser/ui/browser_tabstrip.h" 6 #include "chrome/browser/ui/browser_tabstrip.h"
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "chrome/test/base/in_process_browser_test.h" 8 #include "chrome/test/base/in_process_browser_test.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
(...skipping 30 matching lines...) Expand all
41 NEW_FOREGROUND_TAB, 41 NEW_FOREGROUND_TAB,
42 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 42 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
43 43
44 WebContents* web_contents = chrome::GetActiveWebContents(browser()); 44 WebContents* web_contents = chrome::GetActiveWebContents(browser());
45 ASSERT_TRUE(web_contents != NULL); 45 ASSERT_TRUE(web_contents != NULL);
46 46
47 std::string result; 47 std::string result;
48 ASSERT_TRUE( 48 ASSERT_TRUE(
49 content::ExecuteJavaScriptAndExtractString( 49 content::ExecuteJavaScriptAndExtractString(
50 web_contents->GetRenderViewHost(), 50 web_contents->GetRenderViewHost(),
51 L"", 51 "",
52 L"window.domAutomationController.send(" 52 "window.domAutomationController.send("
53 L"'' + document.body.textContent);", 53 " '' + document.body.textContent);",
54 &result)); 54 &result));
55 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos); 55 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos);
56 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos); 56 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos);
57 } 57 }
58 58
59 } // namespace 59 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/bookmarks_ui_browsertest.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698