Skip to content

Commit

Permalink
01-beacon-type/0123: Disable sendBeacon so we can inspect ResourceTim…
Browse files Browse the repository at this point in the history
…ing for the correct type
  • Loading branch information
nicjansma committed Apr 4, 2018
1 parent 3201f02 commit f67eac2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/page-template-snippets/disableSendBeacon.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
// 2017-09-22: Disables sendBeacon() because the entries don't show up in
// ResourceTiming (which is used to validate some tests)
if (navigator && navigator.sendBeacon) {
navigator.sendBeacon = undefined;
}
</script>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%= header %>
<%= boomerangSnippet %>
<%= disableSendBeacon %>
<script src="00-resourcetiming-disabled.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%= header %>
<%= boomerangSnippet %>
<%= disableSendBeacon %>
<script src="01-resourcetiming-enabled-browser-supports-under-2k.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%= header %>
<%= boomerangSnippet %>
<%= disableSendBeacon %>
<script src="02-resourcetiming-enabled-browser-unsupported.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%= header %>
<%= boomerangSnippet %>
<%= disableSendBeacon %>
<script src="03-resourcetiming-enabled-browser-supports-over-2k.js" type="text/javascript"></script>
<script>
var len = 2000;
Expand Down

0 comments on commit f67eac2

Please sign in to comment.