| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 bool GetName(std::string* name) WARN_UNUSED_RESULT; | 58 bool GetName(std::string* name) WARN_UNUSED_RESULT; |
| 59 | 59 |
| 60 // Gets the version string of this extension. Returns true on success. | 60 // Gets the version string of this extension. Returns true on success. |
| 61 bool GetVersion(std::string* version) WARN_UNUSED_RESULT; | 61 bool GetVersion(std::string* version) WARN_UNUSED_RESULT; |
| 62 | 62 |
| 63 // Gets the index (zero-based) of this extension's browser action in | 63 // Gets the index (zero-based) of this extension's browser action in |
| 64 // the browser action toolbar. |index| will be set to -1 if the extension | 64 // the browser action toolbar. |index| will be set to -1 if the extension |
| 65 // does not have a browser action in the toolbar. Returns true on success. | 65 // does not have a browser action in the toolbar. Returns true on success. |
| 66 bool GetBrowserActionIndex(int* index) WARN_UNUSED_RESULT; | 66 bool GetBrowserActionIndex(int* index) WARN_UNUSED_RESULT; |
| 67 | 67 |
| 68 // Asserts that |expected_id| matches this extension's id. | |
| 69 void EnsureIdMatches(const std::string& expected_id); | |
| 70 | |
| 71 // Asserts that |expected_name| matches this extension's name. | |
| 72 void EnsureNameMatches(const std::string& expected_name); | |
| 73 | |
| 74 // Asserts that |expected_version| matches this extension's name. | |
| 75 void EnsureVersionMatches(const std::string& expected_version); | |
| 76 | |
| 77 // Asserts that |expected_index| matches the index (zero-based) of this | |
| 78 // extension's browser action in the browser action toolbar. | |
| 79 void EnsureBrowserActionIndexMatches(int expected_index); | |
| 80 | |
| 81 private: | 68 private: |
| 82 // Gets the string value of the property of type |type|. Returns true on | 69 // Gets the string value of the property of type |type|. Returns true on |
| 83 // success. | 70 // success. |
| 84 bool GetProperty(AutomationMsg_ExtensionProperty type, std::string* value) | 71 bool GetProperty(AutomationMsg_ExtensionProperty type, std::string* value) |
| 85 WARN_UNUSED_RESULT; | 72 WARN_UNUSED_RESULT; |
| 86 }; | 73 }; |
| 87 | 74 |
| 88 #endif // CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ | 75 #endif // CHROME_TEST_AUTOMATION_EXTENSION_PROXY_H_ |
| OLD | NEW |