Skip to content

Commit

Permalink
Fixes merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
grcoleman committed Jul 29, 2020
2 parents 84cea6b + fa60356 commit 5c447de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions WebView/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ class MainActivityTest {
webView,
jsObjName,
allowedOriginRules
) { message -> onMessageReceived.complete(message)
) { message ->
onMessageReceived.complete(message)
}
webView.loadDataWithBaseURL(
"https://example.com",
Expand All @@ -119,8 +120,8 @@ class MainActivityTest {
)
}
}
// evaluate what comes out -> it should be hello
assertEquals(expectedMessage, onMessageReceived.await())
// evaluate argument being passed into onMessageReceived
assertEquals(expectedMessage, onMessageReceived.await())
}

@Test
Expand All @@ -146,8 +147,11 @@ class MainActivityTest {
) { message -> onMessageReceived.complete(Looper.myLooper()!!) }
//Inject JsObject into Html
webView.loadDataWithBaseURL(
"https://example.com", "<html><script>${jsObjName}.postMessage(`${expectedMessage}`)</script></html>",
"text/html", "UTF-8", null
"https://example.com",
"<html><script>${jsObjName}.postMessage(`${expectedMessage}`)</script></html>",
"text/html",
"UTF-8",
null
)
}
}
Expand Down

0 comments on commit 5c447de

Please sign in to comment.