package cwclient import ( "log" "net/http" "testing" ) func TestPort(t *testing.T) { cli := New("http://localhost:7123") ltest := cli.Register("test", func(tid, content string) { log.Println(tid, content) }) ltest.SetContentConditionFromFile("example.js") cli.Connect() log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) http.ListenAndServe(":42311", nil) } func TestChrome(t *testing.T) { { defer func() { log.Println(123) }() log.Println(456) } log.Println(321) }