Commit 8ca0f9d3 authored by vabr's avatar vabr Committed by Commit bot

Revert of Improve ios/web/public/test/web_js_test.h (patchset #2 id:20001 of...

Revert of Improve ios/web/public/test/web_js_test.h (patchset #2 id:20001 of https://codereview.chromium.org/2148723003/ )

Reason for revert:
I'm afraid DCHECK_NSEQ is not defined, just EXPECT and ASSERT. It seems to break compilation downstream. Let me revert and fix.

Vaclav

Original issue's description:
> Improve ios/web/public/test/web_js_test.h
>
> This CL does some minor changes to web_js_test.h based on eugenebut's
> recommendations in https://codereview.chromium.org/2150513002/#msg21.
>
> R=eugenebut@chromium.org
> BUG=627775
>
> Committed: https://crrev.com/2de879b6567bdd5383db462d0d3ee194bb4d998b
> Cr-Commit-Position: refs/heads/master@{#405234}

TBR=eugenebut@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=627775

Review-Url: https://codereview.chromium.org/2146793003
Cr-Commit-Position: refs/heads/master@{#405280}
parent 4aaa1c3f
...@@ -20,7 +20,7 @@ template <class WebTestT> ...@@ -20,7 +20,7 @@ template <class WebTestT>
class WebJsTest : public WebTestT { class WebJsTest : public WebTestT {
public: public:
WebJsTest(NSArray* java_script_paths) WebJsTest(NSArray* java_script_paths)
: java_script_paths_([java_script_paths copy]) {} : java_script_paths_([java_script_paths retain]) {}
protected: protected:
// Loads |html| and inject JavaScripts at |javaScriptPaths_|. // Loads |html| and inject JavaScripts at |javaScriptPaths_|.
...@@ -60,10 +60,11 @@ class WebJsTest : public WebTestT { ...@@ -60,10 +60,11 @@ class WebJsTest : public WebTestT {
template <class WebTestT> template <class WebTestT>
void WebJsTest<WebTestT>::Inject() { void WebJsTest<WebTestT>::Inject() {
// Main web injection should have occured. // Wait until main web injection has occured.
DCHECK_NSEQ(@"object", NSString* beacon = nil;
WebTestT::EvaluateJavaScriptAsString(@"typeof __gCrWeb")); do {
beacon = WebTestT::EvaluateJavaScriptAsString(@"typeof __gCrWeb");
} while (![beacon isEqualToString:@"object"]);
for (NSString* java_script_path in java_script_paths_.get()) { for (NSString* java_script_path in java_script_paths_.get()) {
NSString* path = NSString* path =
[base::mac::FrameworkBundle() pathForResource:java_script_path [base::mac::FrameworkBundle() pathForResource:java_script_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment