| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> |
| 10 #include <string> |
| 11 |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 12 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 11 | 14 |
| 12 class Extension; | 15 class Extension; |
| 13 | 16 |
| 14 // The general flow of these API tests should work like this: | 17 // The general flow of these API tests should work like this: |
| 15 // (1) Setup initial browser state (e.g. create some bookmarks for the | 18 // (1) Setup initial browser state (e.g. create some bookmarks for the |
| 16 // bookmark test) | 19 // bookmark test) |
| 17 // (2) Call ASSERT_TRUE(RunExtensionTest(name)); | 20 // (2) Call ASSERT_TRUE(RunExtensionTest(name)); |
| 18 // (3) In your extension code, run your test and call chrome.test.pass or | 21 // (3) In your extension code, run your test and call chrome.test.pass or |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 74 |
| 72 // If it failed, what was the error message? | 75 // If it failed, what was the error message? |
| 73 std::string message_; | 76 std::string message_; |
| 74 | 77 |
| 75 private: | 78 private: |
| 76 bool RunExtensionTestImpl(const char* extension_name, | 79 bool RunExtensionTestImpl(const char* extension_name, |
| 77 const std::string& test_page); | 80 const std::string& test_page); |
| 78 }; | 81 }; |
| 79 | 82 |
| 80 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ | 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_APITEST_H_ |
| OLD | NEW |