(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestIsWebSocketUpgrade(t *testing.T) { |
| 49 | for _, tt := range isWebSocketUpgradeTests { |
| 50 | ok := IsWebSocketUpgrade(&http.Request{Header: tt.h}) |
| 51 | if tt.ok != ok { |
| 52 | t.Errorf("IsWebSocketUpgrade(%v) returned %v, want %v", tt.h, ok, tt.ok) |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | var checkSameOriginTests = []struct { |
| 58 | ok bool |
nothing calls this directly
no test coverage detected