OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |