OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_V8_UNIT_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_V8_UNIT_TEST_H_ |
6 #define CHROME_TEST_BASE_V8_UNIT_TEST_H_ | 6 #define CHROME_TEST_BASE_V8_UNIT_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // capture and hold the results for analysis by |RunJavascriptF|. | 67 // capture and hold the results for analysis by |RunJavascriptF|. |
68 static v8::Handle<v8::Value> ChromeSend(const v8::Arguments& args); | 68 static v8::Handle<v8::Value> ChromeSend(const v8::Arguments& args); |
69 | 69 |
70 private: | 70 private: |
71 // Executes all added javascript libraries. Returns true if no errors. | 71 // Executes all added javascript libraries. Returns true if no errors. |
72 bool ExecuteJavascriptLibraries(); | 72 bool ExecuteJavascriptLibraries(); |
73 | 73 |
74 // Initializes paths and libraries. | 74 // Initializes paths and libraries. |
75 void InitPathsAndLibraries(); | 75 void InitPathsAndLibraries(); |
76 | 76 |
| 77 v8::Isolate* isolate_; |
| 78 |
77 // Handle scope that is used throughout the life of this class. | 79 // Handle scope that is used throughout the life of this class. |
78 v8::HandleScope handle_scope_; | 80 v8::HandleScope handle_scope_; |
79 | 81 |
80 // Context for the JavaScript in the test. | 82 // Context for the JavaScript in the test. |
81 v8::Handle<v8::Context> context_; | 83 v8::Persistent<v8::Context> context_; |
82 | 84 |
83 // User added libraries. | 85 // User added libraries. |
84 std::vector<base::FilePath> user_libraries_; | 86 std::vector<base::FilePath> user_libraries_; |
85 }; | 87 }; |
86 | 88 |
87 #endif // CHROME_TEST_BASE_V8_UNIT_TEST_H_ | 89 #endif // CHROME_TEST_BASE_V8_UNIT_TEST_H_ |
OLD | NEW |