Documentation ¶
Overview ¶
Package diag is a library of common functionality to utilize the Chrome network diagnostic routines.
Index ¶
Constants ¶
const ( // VerdictUnknown is an unknown verdict. VerdictUnknown RoutineVerdict = -1 // VerdictNoProblem means that the routine did not detect any problems. VerdictNoProblem = 0 // VerdictProblem means that the routine detected at least one problem. VerdictProblem = 1 // VerdictNotRun means that the routine was not executed. VerdictNotRun = 2 )
const ( RoutineLanConnectivity = "lanConnectivity" RoutineDNSResolverPresent = "dnsResolverPresent" RoutineDNSResolution = "dnsResolution" RoutineDNSLatency = "dnsLatency" RoutineHTTPFirewall = "httpFirewall" RoutineHTTPSFirewall = "httpsFirewall" RoutineHTTPSLatency = "httpsLatency" RoutineSecureWiFiConnection = "hasSecureWiFiConnection" RoutineSignalStrength = "signalStrength" RoutineGatewayCanBePing = "gatewayCanBePinged" RoutineCaptivePortal = "captivePortal" RoutineVideoConferencing = "videoConferencing" )
List of network diagnostic routines
const NetDiagJs = `` /* 2767-byte string literal not displayed */
NetDiagJs is a stringified JS file that exposes the network diagnostics mojo API. TODO(crbug/1127165): convert this to a data file when supported by fixtures.
Variables ¶
This section is empty.
Functions ¶
func CheckRoutineResult ¶
func CheckRoutineResult(result, expectedResult *RoutineResult) error
CheckRoutineResult compares the routine result to the expected result. If they are not the same an error is returned.
Types ¶
type RoutineResult ¶
type RoutineResult struct { Verdict RoutineVerdict Problems []uint32 }
RoutineResult is a simplified data structure to hold the result of running a network diagnostic routine. It collapses the mojo problems union to a single Problems field for simplicity.
type RoutineVerdict ¶
type RoutineVerdict int32
RoutineVerdict represents the possible return values a diagnostic routine can have.