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

Side by Side Diff: chrome/browser/extensions/docs/examples/apps/calculator_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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/ui/browser_tabstrip.h" 7 #include "chrome/browser/ui/browser_tabstrip.h"
8 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 10 matching lines...) Expand all
21 test_file = test_file.DirName().DirName() 21 test_file = test_file.DirName().DirName()
22 .AppendASCII("common").AppendASCII("extensions").AppendASCII("docs") 22 .AppendASCII("common").AppendASCII("extensions").AppendASCII("docs")
23 .AppendASCII("examples").AppendASCII("apps").AppendASCII("calculator") 23 .AppendASCII("examples").AppendASCII("apps").AppendASCII("calculator")
24 .AppendASCII("tests").AppendASCII("automatic.html"); 24 .AppendASCII("tests").AppendASCII("automatic.html");
25 25
26 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file)); 26 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file));
27 27
28 bool success; 28 bool success;
29 bool executed = content::ExecuteJavaScriptAndExtractBool( 29 bool executed = content::ExecuteJavaScriptAndExtractBool(
30 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), 30 chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
31 L"", L"window.domAutomationController.send(window.runTests().success)", 31 "",
32 "window.domAutomationController.send(window.runTests().success)",
32 &success); 33 &success);
33 34
34 ASSERT_TRUE(executed); 35 ASSERT_TRUE(executed);
35 ASSERT_TRUE(success); 36 ASSERT_TRUE(success);
36 } 37 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/content_script_apitest.cc ('k') | chrome/browser/extensions/extension_bindings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698