Chromium Code Reviews| Index: ios/web/public/test/web_js_test.h |
| diff --git a/ios/web/public/test/web_js_test.h b/ios/web/public/test/web_js_test.h |
| index 74550e4de0784e1929b62adaee6b0345717b43c1..0322aac18dd2c15e2ee404b94f62574992529edf 100644 |
| --- a/ios/web/public/test/web_js_test.h |
| +++ b/ios/web/public/test/web_js_test.h |
| @@ -20,7 +20,7 @@ template <class WebTestT> |
| class WebJsTest : public WebTestT { |
| public: |
| WebJsTest(NSArray* java_script_paths) |
| - : java_script_paths_([java_script_paths retain]) {} |
| + : java_script_paths_([java_script_paths copy]) {} |
| protected: |
| // Loads |html| and inject JavaScripts at |javaScriptPaths_|. |
| @@ -60,11 +60,10 @@ class WebJsTest : public WebTestT { |
| template <class WebTestT> |
| void WebJsTest<WebTestT>::Inject() { |
| - // Wait until main web injection has occured. |
| - NSString* beacon = nil; |
| - do { |
| - beacon = WebTestT::EvaluateJavaScriptAsString(@"typeof __gCrWeb"); |
| - } while (![beacon isEqualToString:@"object"]); |
| + // Main web injection should have occured. |
| + DCHECK([WebTestT::EvaluateJavaScriptAsString(@"typeof __gCrWeb") |
|
Eugene But (OOO till 7-30)
2016/07/13 18:16:35
NIT:
DCHECK_NSEQ[@"object", WebTestT::ExecuteJava
vabr (Chromium)
2016/07/13 18:51:25
Done.
|
| + isEqualToString:@"object"]); |
| + |
| for (NSString* java_script_path in java_script_paths_.get()) { |
| NSString* path = |
| [base::mac::FrameworkBundle() pathForResource:java_script_path |