| 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 "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 test_root_path = test_root_path.AppendASCII("extensions"); | 200 test_root_path = test_root_path.AppendASCII("extensions"); |
| 201 test_protocol_handler_ = | 201 test_protocol_handler_ = |
| 202 base::Bind(&ExtensionProtocolTestHandler, test_root_path); | 202 base::Bind(&ExtensionProtocolTestHandler, test_root_path); |
| 203 extensions::SetExtensionProtocolTestHandler(&test_protocol_handler_); | 203 extensions::SetExtensionProtocolTestHandler(&test_protocol_handler_); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void ExtensionBrowserTest::TearDownOnMainThread() { | 206 void ExtensionBrowserTest::TearDownOnMainThread() { |
| 207 ExtensionMessageBubbleFactory::set_override_for_tests( | 207 ExtensionMessageBubbleFactory::set_override_for_tests( |
| 208 ExtensionMessageBubbleFactory::NO_OVERRIDE); | 208 ExtensionMessageBubbleFactory::NO_OVERRIDE); |
| 209 extensions::SetExtensionProtocolTestHandler(nullptr); | 209 extensions::SetExtensionProtocolTestHandler(nullptr); |
| 210 InProcessBrowserTest::TearDownOnMainThread(); | |
| 211 } | 210 } |
| 212 | 211 |
| 213 const Extension* ExtensionBrowserTest::LoadExtension( | 212 const Extension* ExtensionBrowserTest::LoadExtension( |
| 214 const base::FilePath& path) { | 213 const base::FilePath& path) { |
| 215 return LoadExtensionWithFlags(path, kFlagEnableFileAccess); | 214 return LoadExtensionWithFlags(path, kFlagEnableFileAccess); |
| 216 } | 215 } |
| 217 | 216 |
| 218 const Extension* ExtensionBrowserTest::LoadExtensionIncognito( | 217 const Extension* ExtensionBrowserTest::LoadExtensionIncognito( |
| 219 const base::FilePath& path) { | 218 const base::FilePath& path) { |
| 220 return LoadExtensionWithFlags(path, | 219 return LoadExtensionWithFlags(path, |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 602 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
| 604 profile(), extension_id, script); | 603 profile(), extension_id, script); |
| 605 } | 604 } |
| 606 | 605 |
| 607 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 606 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
| 608 const std::string& extension_id, | 607 const std::string& extension_id, |
| 609 const std::string& script) { | 608 const std::string& script) { |
| 610 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 609 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
| 611 profile(), extension_id, script); | 610 profile(), extension_id, script); |
| 612 } | 611 } |
| OLD | NEW |