Skip to content

Commit dd019bd

Browse files
committed
Print versions in tests for future debugging
1 parent 8957dda commit dd019bd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

protocol-generator/cdp-json-parser/src/main/kotlin/org/hildan/chrome/devtools/protocol/json/JsonProtocolTypes.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ data class ChromeProtocolDescriptor(
1717
data class ChromeProtocolVersion(
1818
val major: Int,
1919
val minor: Int
20-
)
20+
) {
21+
override fun toString(): String = "$major.$minor"
22+
}
2123

2224
@Serializable
2325
data class JsonDomain(

src/jvmTest/kotlin/IntegrationTestBase.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ abstract class IntegrationTestBase {
5959
assertTrue(version.browser.contains("Chrome"))
6060
assertTrue(version.userAgent.contains("HeadlessChrome"))
6161
assertTrue(version.webSocketDebuggerUrl.startsWith("ws://"), "the debugger URL should start with ws://, but was: ${version.webSocketDebuggerUrl}")
62+
println("Chrome version: $version")
6263

6364
val protocolJson = chrome.protocolJson()
6465
assertTrue(protocolJson.isNotEmpty(), "the JSON definition of the protocol should not be empty")
66+
val descriptor = Json.decodeFromString<ChromeProtocolDescriptor>(protocolJson)
67+
println("Chrome protocol JSON version: ${descriptor.version}")
6568
}
6669
}
6770

0 commit comments

Comments
 (0)