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 // Contains holistic tests of the bindings infrastructure | 5 // Contains holistic tests of the bindings infrastructure |
6 | 6 |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 | 8 |
9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
10 #include "chrome/browser/extensions/extension_process_manager.h" | 10 #include "chrome/browser/extensions/extension_process_manager.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, LastError) { | 24 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, LastError) { |
25 ASSERT_TRUE(LoadExtension( | 25 ASSERT_TRUE(LoadExtension( |
26 test_data_dir_.AppendASCII("browsertest").AppendASCII("last_error"))); | 26 test_data_dir_.AppendASCII("browsertest").AppendASCII("last_error"))); |
27 | 27 |
28 // Get the ExtensionHost that is hosting our background page. | 28 // Get the ExtensionHost that is hosting our background page. |
29 ExtensionProcessManager* manager = | 29 ExtensionProcessManager* manager = |
30 extensions::ExtensionSystem::Get(browser()->profile())->process_manager(); | 30 extensions::ExtensionSystem::Get(browser()->profile())->process_manager(); |
31 extensions::ExtensionHost* host = FindHostWithPath(manager, "/bg.html", 1); | 31 extensions::ExtensionHost* host = FindHostWithPath(manager, "/bg.html", 1); |
32 | 32 |
33 bool result = false; | 33 bool result = false; |
34 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 34 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
35 host->render_view_host(), "", "testLastError()", &result)); | 35 host->render_view_host(), "testLastError()", &result)); |
36 EXPECT_TRUE(result); | 36 EXPECT_TRUE(result); |
37 } | 37 } |
OLD | NEW |