| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "extensions/common/manifest_constants.h" | 22 #include "extensions/common/manifest_constants.h" |
| 23 #include "extensions/common/switches.h" | 23 #include "extensions/common/switches.h" |
| 24 #include "extensions/common/value_builder.h" | 24 #include "extensions/common/value_builder.h" |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 | 27 |
| 28 class DebuggerApiTest : public ExtensionApiTest { | 28 class DebuggerApiTest : public ExtensionApiTest { |
| 29 protected: | 29 protected: |
| 30 virtual ~DebuggerApiTest() {} | 30 virtual ~DebuggerApiTest() {} |
| 31 | 31 |
| 32 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 32 virtual void SetUpCommandLine(base::CommandLine* command_line) override; |
| 33 virtual void SetUpOnMainThread() OVERRIDE; | 33 virtual void SetUpOnMainThread() override; |
| 34 | 34 |
| 35 // Run the attach function. If |expected_error| is not empty, then the | 35 // Run the attach function. If |expected_error| is not empty, then the |
| 36 // function should fail with the error. Otherwise, the function is expected | 36 // function should fail with the error. Otherwise, the function is expected |
| 37 // to succeed. | 37 // to succeed. |
| 38 testing::AssertionResult RunAttachFunction(const GURL& url, | 38 testing::AssertionResult RunAttachFunction(const GURL& url, |
| 39 const std::string& expected_error); | 39 const std::string& expected_error); |
| 40 | 40 |
| 41 const Extension* extension() const { return extension_.get(); } | 41 const Extension* extension() const { return extension_.get(); } |
| 42 base::CommandLine* command_line() const { return command_line_; } | 42 base::CommandLine* command_line() const { return command_line_; } |
| 43 | 43 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 extension()->id().c_str())), | 137 extension()->id().c_str())), |
| 138 std::string())); | 138 std::string())); |
| 139 | 139 |
| 140 // Append extensions on chrome urls switch. The extension should now be able | 140 // Append extensions on chrome urls switch. The extension should now be able |
| 141 // to debug any extension. | 141 // to debug any extension. |
| 142 command_line()->AppendSwitch(switches::kExtensionsOnChromeURLs); | 142 command_line()->AppendSwitch(switches::kExtensionsOnChromeURLs); |
| 143 EXPECT_TRUE(RunAttachFunction(other_ext_url, std::string())); | 143 EXPECT_TRUE(RunAttachFunction(other_ext_url, std::string())); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace extensions | 146 } // namespace extensions |
| OLD | NEW |