(t *testing.T)
| 93 | var jsCheckFlame string |
| 94 | |
| 95 | func TestSource(t *testing.T) { |
| 96 | maybeSkipBrowserTest(t) |
| 97 | |
| 98 | prof := makeFakeProfile() |
| 99 | server := makeTestServer(t, prof) |
| 100 | ctx := newContext(context.Background(), t) |
| 101 | |
| 102 | err := chromedp.Run(ctx, |
| 103 | chromedp.Navigate(server.URL+"/source?f=F3"), |
| 104 | chromedp.WaitVisible(`#content`, chromedp.ByID), |
| 105 | matchRegexp(t, "#content", `F3`), // Header |
| 106 | matchRegexp(t, "#content", `Total:.*100ms`), // Total for function |
| 107 | matchRegexp(t, "#content", `\b22\b.*100ms`), // Line 22 |
| 108 | ) |
| 109 | if err != nil { |
| 110 | t.Fatal(err) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | func newContext(ctx context.Context, t *testing.T) context.Context { |
| 115 | opts := append(chromedp.DefaultExecAllocatorOptions[:], |
nothing calls this directly
no test coverage detected
searching dependent graphs…