feat: webview manager and js bridge skeleton
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package top.yeij.hearth.webview
|
||||
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class JsBridgeTest {
|
||||
@Test
|
||||
fun getDeviceInfo_returnsJsonWithDarkMode() {
|
||||
val bridge = JsBridge(deviceWidthPx = 800, deviceHeightPx = 480, density = 2.0f, darkMode = true)
|
||||
val json = bridge.getDeviceInfo()
|
||||
assertTrue(json.contains("\"widthPx\":800"))
|
||||
assertTrue(json.contains("\"darkMode\":true"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user