OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 "data:text/html;charset=utf-8," | 30 "data:text/html;charset=utf-8," |
31 "<!DOCTYPE html>" | 31 "<!DOCTYPE html>" |
32 "<html>" | 32 "<html>" |
33 "<head>" | 33 "<head>" |
34 "<title>Mouse event trace events reported.</title>" | 34 "<title>Mouse event trace events reported.</title>" |
35 "<script src=\"../../resources/testharness.js\"></script>" | 35 "<script src=\"../../resources/testharness.js\"></script>" |
36 "<script src=\"../../resources/testharnessreport.js\"></script>" | 36 "<script src=\"../../resources/testharnessreport.js\"></script>" |
37 "<style>" | 37 "<style>" |
38 "body {" | 38 "body {" |
39 " height:3000px;" | 39 " height:3000px;" |
| 40 // Prevent text selection logic from triggering, as it makes the test flaky. |
| 41 " user-select: none;" |
40 "}" | 42 "}" |
41 "</style>" | 43 "</style>" |
42 "</head>" | 44 "</head>" |
43 "<body>" | 45 "<body>" |
44 "</body>" | 46 "</body>" |
45 "</html>"; | 47 "</html>"; |
46 | 48 |
47 } // namespace | 49 } // namespace |
48 | 50 |
49 namespace content { | 51 namespace content { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 182 } |
181 | 183 |
182 // We see two events per async slice, a begin and an end. | 184 // We see two events per async slice, a begin and an end. |
183 EXPECT_THAT( | 185 EXPECT_THAT( |
184 trace_event_names, | 186 trace_event_names, |
185 testing::ElementsAre("InputLatency::MouseDown", "InputLatency::MouseDown", | 187 testing::ElementsAre("InputLatency::MouseDown", "InputLatency::MouseDown", |
186 "InputLatency::MouseUp", "InputLatency::MouseUp")); | 188 "InputLatency::MouseUp", "InputLatency::MouseUp")); |
187 } | 189 } |
188 | 190 |
189 } // namespace content | 191 } // namespace content |
OLD | NEW |