51 |
52 |
55 |
56 |
57 |
58 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.0.9/scripts/linenumber.js:
--------------------------------------------------------------------------------
1 | /*global document */
2 | (function() {
3 | var source = document.getElementsByClassName('prettyprint source linenums');
4 | var i = 0;
5 | var lineNumber = 0;
6 | var lineId;
7 | var lines;
8 | var totalLines;
9 | var anchorHash;
10 |
11 | if (source && source[0]) {
12 | anchorHash = document.location.hash.substring(1);
13 | lines = source[0].getElementsByTagName('li');
14 | totalLines = lines.length;
15 |
16 | for (; i < totalLines; i++) {
17 | lineNumber++;
18 | lineId = 'line' + lineNumber;
19 | lines[i].id = lineId;
20 | if (lineId === anchorHash) {
21 | lines[i].className += ' selected';
22 | }
23 | }
24 | }
25 | })();
26 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.0.9/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.0.9/styles/prettify-jsdoc.css:
--------------------------------------------------------------------------------
1 | /* JSDoc prettify.js theme */
2 |
3 | /* plain text */
4 | .pln {
5 | color: #000000;
6 | font-weight: normal;
7 | font-style: normal;
8 | }
9 |
10 | /* string content */
11 | .str {
12 | color: #006400;
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
17 | /* a keyword */
18 | .kwd {
19 | color: #000000;
20 | font-weight: bold;
21 | font-style: normal;
22 | }
23 |
24 | /* a comment */
25 | .com {
26 | font-weight: normal;
27 | font-style: italic;
28 | }
29 |
30 | /* a type name */
31 | .typ {
32 | color: #000000;
33 | font-weight: normal;
34 | font-style: normal;
35 | }
36 |
37 | /* a literal value */
38 | .lit {
39 | color: #006400;
40 | font-weight: normal;
41 | font-style: normal;
42 | }
43 |
44 | /* punctuation */
45 | .pun {
46 | color: #000000;
47 | font-weight: bold;
48 | font-style: normal;
49 | }
50 |
51 | /* lisp open bracket */
52 | .opn {
53 | color: #000000;
54 | font-weight: bold;
55 | font-style: normal;
56 | }
57 |
58 | /* lisp close bracket */
59 | .clo {
60 | color: #000000;
61 | font-weight: bold;
62 | font-style: normal;
63 | }
64 |
65 | /* a markup tag name */
66 | .tag {
67 | color: #006400;
68 | font-weight: normal;
69 | font-style: normal;
70 | }
71 |
72 | /* a markup attribute name */
73 | .atn {
74 | color: #006400;
75 | font-weight: normal;
76 | font-style: normal;
77 | }
78 |
79 | /* a markup attribute value */
80 | .atv {
81 | color: #006400;
82 | font-weight: normal;
83 | font-style: normal;
84 | }
85 |
86 | /* a declaration */
87 | .dec {
88 | color: #000000;
89 | font-weight: bold;
90 | font-style: normal;
91 | }
92 |
93 | /* a variable name */
94 | .var {
95 | color: #000000;
96 | font-weight: normal;
97 | font-style: normal;
98 | }
99 |
100 | /* a function name */
101 | .fun {
102 | color: #000000;
103 | font-weight: bold;
104 | font-style: normal;
105 | }
106 |
107 | /* Specify class=linenums on a pre to get line numbering */
108 | ol.linenums {
109 | margin-top: 0;
110 | margin-bottom: 0;
111 | }
112 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.0.9/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Italic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Italic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Light-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Light-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-LightItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-LightItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-LightItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-LightItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Regular-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.0/fonts/OpenSans-Regular-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/scripts/linenumber.js:
--------------------------------------------------------------------------------
1 | /*global document */
2 | (function() {
3 | var source = document.getElementsByClassName('prettyprint source linenums');
4 | var i = 0;
5 | var lineNumber = 0;
6 | var lineId;
7 | var lines;
8 | var totalLines;
9 | var anchorHash;
10 |
11 | if (source && source[0]) {
12 | anchorHash = document.location.hash.substring(1);
13 | lines = source[0].getElementsByTagName('li');
14 | totalLines = lines.length;
15 |
16 | for (; i < totalLines; i++) {
17 | lineNumber++;
18 | lineId = 'line' + lineNumber;
19 | lines[i].id = lineId;
20 | if (lineId === anchorHash) {
21 | lines[i].className += ' selected';
22 | }
23 | }
24 | }
25 | })();
26 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/styles/prettify-jsdoc.css:
--------------------------------------------------------------------------------
1 | /* JSDoc prettify.js theme */
2 |
3 | /* plain text */
4 | .pln {
5 | color: #000000;
6 | font-weight: normal;
7 | font-style: normal;
8 | }
9 |
10 | /* string content */
11 | .str {
12 | color: #006400;
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
17 | /* a keyword */
18 | .kwd {
19 | color: #000000;
20 | font-weight: bold;
21 | font-style: normal;
22 | }
23 |
24 | /* a comment */
25 | .com {
26 | font-weight: normal;
27 | font-style: italic;
28 | }
29 |
30 | /* a type name */
31 | .typ {
32 | color: #000000;
33 | font-weight: normal;
34 | font-style: normal;
35 | }
36 |
37 | /* a literal value */
38 | .lit {
39 | color: #006400;
40 | font-weight: normal;
41 | font-style: normal;
42 | }
43 |
44 | /* punctuation */
45 | .pun {
46 | color: #000000;
47 | font-weight: bold;
48 | font-style: normal;
49 | }
50 |
51 | /* lisp open bracket */
52 | .opn {
53 | color: #000000;
54 | font-weight: bold;
55 | font-style: normal;
56 | }
57 |
58 | /* lisp close bracket */
59 | .clo {
60 | color: #000000;
61 | font-weight: bold;
62 | font-style: normal;
63 | }
64 |
65 | /* a markup tag name */
66 | .tag {
67 | color: #006400;
68 | font-weight: normal;
69 | font-style: normal;
70 | }
71 |
72 | /* a markup attribute name */
73 | .atn {
74 | color: #006400;
75 | font-weight: normal;
76 | font-style: normal;
77 | }
78 |
79 | /* a markup attribute value */
80 | .atv {
81 | color: #006400;
82 | font-weight: normal;
83 | font-style: normal;
84 | }
85 |
86 | /* a declaration */
87 | .dec {
88 | color: #000000;
89 | font-weight: bold;
90 | font-style: normal;
91 | }
92 |
93 | /* a variable name */
94 | .var {
95 | color: #000000;
96 | font-weight: normal;
97 | font-style: normal;
98 | }
99 |
100 | /* a function name */
101 | .fun {
102 | color: #000000;
103 | font-weight: bold;
104 | font-style: normal;
105 | }
106 |
107 | /* Specify class=linenums on a pre to get line numbering */
108 | ol.linenums {
109 | margin-top: 0;
110 | margin-bottom: 0;
111 | }
112 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.0/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Italic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Italic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Light-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Light-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-LightItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-LightItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-LightItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-LightItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Regular-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.1/fonts/OpenSans-Regular-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/scripts/linenumber.js:
--------------------------------------------------------------------------------
1 | /*global document */
2 | (function() {
3 | var source = document.getElementsByClassName('prettyprint source linenums');
4 | var i = 0;
5 | var lineNumber = 0;
6 | var lineId;
7 | var lines;
8 | var totalLines;
9 | var anchorHash;
10 |
11 | if (source && source[0]) {
12 | anchorHash = document.location.hash.substring(1);
13 | lines = source[0].getElementsByTagName('li');
14 | totalLines = lines.length;
15 |
16 | for (; i < totalLines; i++) {
17 | lineNumber++;
18 | lineId = 'line' + lineNumber;
19 | lines[i].id = lineId;
20 | if (lineId === anchorHash) {
21 | lines[i].className += ' selected';
22 | }
23 | }
24 | }
25 | })();
26 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/styles/prettify-jsdoc.css:
--------------------------------------------------------------------------------
1 | /* JSDoc prettify.js theme */
2 |
3 | /* plain text */
4 | .pln {
5 | color: #000000;
6 | font-weight: normal;
7 | font-style: normal;
8 | }
9 |
10 | /* string content */
11 | .str {
12 | color: #006400;
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
17 | /* a keyword */
18 | .kwd {
19 | color: #000000;
20 | font-weight: bold;
21 | font-style: normal;
22 | }
23 |
24 | /* a comment */
25 | .com {
26 | font-weight: normal;
27 | font-style: italic;
28 | }
29 |
30 | /* a type name */
31 | .typ {
32 | color: #000000;
33 | font-weight: normal;
34 | font-style: normal;
35 | }
36 |
37 | /* a literal value */
38 | .lit {
39 | color: #006400;
40 | font-weight: normal;
41 | font-style: normal;
42 | }
43 |
44 | /* punctuation */
45 | .pun {
46 | color: #000000;
47 | font-weight: bold;
48 | font-style: normal;
49 | }
50 |
51 | /* lisp open bracket */
52 | .opn {
53 | color: #000000;
54 | font-weight: bold;
55 | font-style: normal;
56 | }
57 |
58 | /* lisp close bracket */
59 | .clo {
60 | color: #000000;
61 | font-weight: bold;
62 | font-style: normal;
63 | }
64 |
65 | /* a markup tag name */
66 | .tag {
67 | color: #006400;
68 | font-weight: normal;
69 | font-style: normal;
70 | }
71 |
72 | /* a markup attribute name */
73 | .atn {
74 | color: #006400;
75 | font-weight: normal;
76 | font-style: normal;
77 | }
78 |
79 | /* a markup attribute value */
80 | .atv {
81 | color: #006400;
82 | font-weight: normal;
83 | font-style: normal;
84 | }
85 |
86 | /* a declaration */
87 | .dec {
88 | color: #000000;
89 | font-weight: bold;
90 | font-style: normal;
91 | }
92 |
93 | /* a variable name */
94 | .var {
95 | color: #000000;
96 | font-weight: normal;
97 | font-style: normal;
98 | }
99 |
100 | /* a function name */
101 | .fun {
102 | color: #000000;
103 | font-weight: bold;
104 | font-style: normal;
105 | }
106 |
107 | /* Specify class=linenums on a pre to get line numbering */
108 | ol.linenums {
109 | margin-top: 0;
110 | margin-bottom: 0;
111 | }
112 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.1/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Italic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Italic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Light-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Light-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-LightItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-LightItalic-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-LightItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-LightItalic-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Regular-webfont.eot
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/docs/reference-docs/stable/v0.1.4/fonts/OpenSans-Regular-webfont.woff
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/scripts/linenumber.js:
--------------------------------------------------------------------------------
1 | /*global document */
2 | (function() {
3 | var source = document.getElementsByClassName('prettyprint source linenums');
4 | var i = 0;
5 | var lineNumber = 0;
6 | var lineId;
7 | var lines;
8 | var totalLines;
9 | var anchorHash;
10 |
11 | if (source && source[0]) {
12 | anchorHash = document.location.hash.substring(1);
13 | lines = source[0].getElementsByTagName('li');
14 | totalLines = lines.length;
15 |
16 | for (; i < totalLines; i++) {
17 | lineNumber++;
18 | lineId = 'line' + lineNumber;
19 | lines[i].id = lineId;
20 | if (lineId === anchorHash) {
21 | lines[i].className += ' selected';
22 | }
23 | }
24 | }
25 | })();
26 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/scripts/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/styles/prettify-jsdoc.css:
--------------------------------------------------------------------------------
1 | /* JSDoc prettify.js theme */
2 |
3 | /* plain text */
4 | .pln {
5 | color: #000000;
6 | font-weight: normal;
7 | font-style: normal;
8 | }
9 |
10 | /* string content */
11 | .str {
12 | color: #006400;
13 | font-weight: normal;
14 | font-style: normal;
15 | }
16 |
17 | /* a keyword */
18 | .kwd {
19 | color: #000000;
20 | font-weight: bold;
21 | font-style: normal;
22 | }
23 |
24 | /* a comment */
25 | .com {
26 | font-weight: normal;
27 | font-style: italic;
28 | }
29 |
30 | /* a type name */
31 | .typ {
32 | color: #000000;
33 | font-weight: normal;
34 | font-style: normal;
35 | }
36 |
37 | /* a literal value */
38 | .lit {
39 | color: #006400;
40 | font-weight: normal;
41 | font-style: normal;
42 | }
43 |
44 | /* punctuation */
45 | .pun {
46 | color: #000000;
47 | font-weight: bold;
48 | font-style: normal;
49 | }
50 |
51 | /* lisp open bracket */
52 | .opn {
53 | color: #000000;
54 | font-weight: bold;
55 | font-style: normal;
56 | }
57 |
58 | /* lisp close bracket */
59 | .clo {
60 | color: #000000;
61 | font-weight: bold;
62 | font-style: normal;
63 | }
64 |
65 | /* a markup tag name */
66 | .tag {
67 | color: #006400;
68 | font-weight: normal;
69 | font-style: normal;
70 | }
71 |
72 | /* a markup attribute name */
73 | .atn {
74 | color: #006400;
75 | font-weight: normal;
76 | font-style: normal;
77 | }
78 |
79 | /* a markup attribute value */
80 | .atv {
81 | color: #006400;
82 | font-weight: normal;
83 | font-style: normal;
84 | }
85 |
86 | /* a declaration */
87 | .dec {
88 | color: #000000;
89 | font-weight: bold;
90 | font-style: normal;
91 | }
92 |
93 | /* a variable name */
94 | .var {
95 | color: #000000;
96 | font-weight: normal;
97 | font-style: normal;
98 | }
99 |
100 | /* a function name */
101 | .fun {
102 | color: #000000;
103 | font-weight: bold;
104 | font-style: normal;
105 | }
106 |
107 | /* Specify class=linenums on a pre to get line numbering */
108 | ol.linenums {
109 | margin-top: 0;
110 | margin-bottom: 0;
111 | }
112 |
--------------------------------------------------------------------------------
/docs/reference-docs/stable/v0.1.4/styles/prettify-tomorrow.css:
--------------------------------------------------------------------------------
1 | /* Tomorrow Theme */
2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3 | /* Pretty printing styles. Used with prettify.js. */
4 | /* SPAN elements with the classes below are added by prettyprint. */
5 | /* plain text */
6 | .pln {
7 | color: #4d4d4c; }
8 |
9 | @media screen {
10 | /* string content */
11 | .str {
12 | color: #718c00; }
13 |
14 | /* a keyword */
15 | .kwd {
16 | color: #8959a8; }
17 |
18 | /* a comment */
19 | .com {
20 | color: #8e908c; }
21 |
22 | /* a type name */
23 | .typ {
24 | color: #4271ae; }
25 |
26 | /* a literal value */
27 | .lit {
28 | color: #f5871f; }
29 |
30 | /* punctuation */
31 | .pun {
32 | color: #4d4d4c; }
33 |
34 | /* lisp open bracket */
35 | .opn {
36 | color: #4d4d4c; }
37 |
38 | /* lisp close bracket */
39 | .clo {
40 | color: #4d4d4c; }
41 |
42 | /* a markup tag name */
43 | .tag {
44 | color: #c82829; }
45 |
46 | /* a markup attribute name */
47 | .atn {
48 | color: #f5871f; }
49 |
50 | /* a markup attribute value */
51 | .atv {
52 | color: #3e999f; }
53 |
54 | /* a declaration */
55 | .dec {
56 | color: #f5871f; }
57 |
58 | /* a variable name */
59 | .var {
60 | color: #c82829; }
61 |
62 | /* a function name */
63 | .fun {
64 | color: #4271ae; } }
65 | /* Use higher contrast and text-weight for printable form. */
66 | @media print, projection {
67 | .str {
68 | color: #060; }
69 |
70 | .kwd {
71 | color: #006;
72 | font-weight: bold; }
73 |
74 | .com {
75 | color: #600;
76 | font-style: italic; }
77 |
78 | .typ {
79 | color: #404;
80 | font-weight: bold; }
81 |
82 | .lit {
83 | color: #044; }
84 |
85 | .pun, .opn, .clo {
86 | color: #440; }
87 |
88 | .tag {
89 | color: #006;
90 | font-weight: bold; }
91 |
92 | .atn {
93 | color: #404; }
94 |
95 | .atv {
96 | color: #060; } }
97 | /* Style */
98 | /*
99 | pre.prettyprint {
100 | background: white;
101 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
102 | font-size: 12px;
103 | line-height: 1.5;
104 | border: 1px solid #ccc;
105 | padding: 10px; }
106 | */
107 |
108 | /* Specify class=linenums on a pre to get line numbering */
109 | ol.linenums {
110 | margin-top: 0;
111 | margin-bottom: 0; }
112 |
113 | /* IE indents via margin-left */
114 | li.L0,
115 | li.L1,
116 | li.L2,
117 | li.L3,
118 | li.L4,
119 | li.L5,
120 | li.L6,
121 | li.L7,
122 | li.L8,
123 | li.L9 {
124 | /* */ }
125 |
126 | /* Alternate shading for lines */
127 | li.L1,
128 | li.L3,
129 | li.L5,
130 | li.L7,
131 | li.L9 {
132 | /* */ }
133 |
--------------------------------------------------------------------------------
/gulp-tasks/clean.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | /* eslint-env node */
17 |
18 | 'use strict';
19 |
20 | const gulp = require('gulp');
21 | const del = require('del');
22 |
23 | gulp.task('clean', function() {
24 | return del([global.config.dest]);
25 | });
26 |
--------------------------------------------------------------------------------
/gulp-tasks/scripts.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | /* eslint-env node */
17 |
18 | 'use strict';
19 |
20 | const gulp = require('gulp');
21 | const uglify = require('gulp-uglify');
22 | const sourcemaps = require('gulp-sourcemaps');
23 | const browserify = require('browserify');
24 | const buffer = require('vinyl-buffer');
25 | const source = require('vinyl-source-stream');
26 | const path = require('path');
27 | const glob = require('glob');
28 | const runSequence = require('run-sequence');
29 |
30 | const bundleJS = function(fullFilePath) {
31 | const browserifyBundles = browserify({
32 | entries: fullFilePath
33 | });
34 |
35 | // Rollupify reduces the size of the final output but increases build
36 | // time to do it so enable for production build only
37 | if (global.config.env === 'prod') {
38 | browserifyBundles.transform('rollupify');
39 | }
40 |
41 | let stream = browserifyBundles
42 | .transform('babelify', {presets: ['es2015']})
43 | .bundle()
44 | // `source` Converts Browserify's Node Stream to a Gulp Stream
45 | // Use path.relative to make the file have the correct home in `dest`
46 | .pipe(
47 | source(path.join('.', path.relative(global.config.src, fullFilePath)))
48 | )
49 | .pipe(buffer())
50 | .pipe(sourcemaps.init());
51 |
52 | if (global.config.env === 'prod') {
53 | stream = stream.pipe(uglify());
54 | }
55 |
56 | return stream.pipe(sourcemaps.write('.'))
57 | .pipe(gulp.dest(global.config.dest));
58 | };
59 |
60 | const build = function() {
61 | const globResponse = glob.sync(global.config.src +
62 | '/browser/**/*.js', {
63 | dot: false
64 | });
65 |
66 | return Promise.all(globResponse.map(file => {
67 | return new Promise((resolve, reject) => {
68 | bundleJS(file).on('error', reject).on('end', resolve);
69 | });
70 | }));
71 | };
72 |
73 | gulp.task('scripts:transpile', function() {
74 | return build();
75 | });
76 |
77 | gulp.task('scripts:copyNode', function() {
78 | return gulp.src([
79 | '!' + path.join(global.config.src, 'browser', '**', '*.js'),
80 | path.join(global.config.src, '**', '*.js')
81 | ])
82 | .pipe(gulp.dest(global.config.dest));
83 | });
84 |
85 | gulp.task('scripts', function(cb) {
86 | runSequence(
87 | [
88 | 'scripts:copyNode',
89 | 'scripts:transpile'
90 | ],
91 | cb);
92 | });
93 |
--------------------------------------------------------------------------------
/gulp-tasks/test.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | /* eslint-env node */
17 |
18 | 'use strict';
19 |
20 | const gulp = require('gulp');
21 | const path = require('path');
22 | const TestServer = require('../src/index').TestServer;
23 |
24 | gulp.task('test:manual', function() {
25 | let testServer = new TestServer();
26 | testServer.startServer(path.join(__dirname, '..'), 8888)
27 | .then(portNumber => {
28 | /* eslint-disable no-console */
29 | console.log('http://localhost:' + portNumber);
30 | /* eslint-enable no-console */
31 | });
32 | });
33 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an "AS IS" BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | */
13 |
14 | 'use strict';
15 |
16 | /* eslint-env node */
17 |
18 | const gulp = require('gulp');
19 | const requireDir = require('require-dir');
20 | const runSequence = require('run-sequence');
21 |
22 | requireDir('./gulp-tasks');
23 |
24 | global.config = {
25 | env: 'prod',
26 | src: 'src',
27 | dest: 'build'
28 | };
29 |
30 | gulp.task('default', function(cb) {
31 | runSequence(
32 | 'clean',
33 | 'scripts',
34 | cb);
35 | });
36 |
--------------------------------------------------------------------------------
/jsdoc.conf:
--------------------------------------------------------------------------------
1 | {
2 | "source": {
3 | "include": [
4 | "./src"
5 | ]
6 | },
7 | "opts": {
8 | "template": "node_modules/npm-publish-scripts/jsdoc-theme/",
9 | "recurse": true
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sw-testing-helpers",
3 | "version": "1.0.1",
4 | "description": "A set of helper files used to test Propel and sw-toolbox.",
5 | "main": "./build/index.js",
6 | "files": [
7 | "build/",
8 | "src/"
9 | ],
10 | "scripts": {
11 | "build": "gulp",
12 | "build-docs": "jsdoc -c ./jsdoc.conf -d",
13 | "bundle": "./project/copy-build-files.sh",
14 | "pretest": "node ./test/helpers/download-test-browsers.js",
15 | "test": "npm run build && npm run lint && mocha",
16 | "lint": "eslint '.'",
17 | "publish-release": "publish-release.sh",
18 | "publish-docs": "publish-docs.sh"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "git+https://github.com/GoogleChrome/sw-testing-helpers.git"
23 | },
24 | "license": "Apache-2.0",
25 | "bugs": {
26 | "url": "https://github.com/GoogleChrome/sw-testing-helpers/issues"
27 | },
28 | "homepage": "https://github.com/GoogleChrome/sw-testing-helpers#readme",
29 | "dependencies": {
30 | "chai": "^3.5.0",
31 | "del": "^2.2.0",
32 | "express": "^4.13.4",
33 | "mocha": "^3.0.2"
34 | },
35 | "devDependencies": {
36 | "babel-preset-es2015": "^6.6.0",
37 | "babelify": "^7.2.0",
38 | "browserify": "^13.0.0",
39 | "chromedriver": "^2.28.0",
40 | "eslint": "^3.12.1",
41 | "eslint-config-google": "^0.7.1",
42 | "geckodriver": "1.4.0",
43 | "glob": "^7.0.3",
44 | "gulp": "^3.9.1",
45 | "gulp-mocha": "^3.0.1",
46 | "gulp-sourcemaps": "^1.6.0",
47 | "gulp-uglify": "^2.0.0",
48 | "jsdoc": "^3.4.0",
49 | "node-fetch": "^1.5.0",
50 | "npm-publish-scripts": "^2.0.6",
51 | "require-dir": "^0.3.0",
52 | "rollupify": "^0.3.1",
53 | "run-sequence": "^1.1.5",
54 | "selenium-assistant": "^5.0.4",
55 | "vinyl-buffer": "^1.0.0",
56 | "vinyl-source-stream": "^1.1.0"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/project/copy-build-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | #########################################################################
5 | #
6 | # GUIDE TO USE OF THIS SCRIPT
7 | #
8 | #########################################################################
9 | #
10 | # - This script is used by npm run bundle in this probject and serves
11 | # solely as an example
12 | #
13 | #########################################################################
14 |
15 | if [ "$BASH_VERSION" = '' ]; then
16 | echo " Please run this script via this command: './project/publish-docs.sh'"
17 | exit 1;
18 | fi
19 |
20 | if [ -z "$1" ]; then
21 | echo " Bad input: Expected a directory as the first argument for the path to put the final bundle files into (i.e. ./tagged-release)";
22 | exit 1;
23 | fi
24 |
25 | # This isn't needed unless run outside of publish-release script
26 | mkdir -p $1
27 |
28 | cp -r ./docs $1
29 | cp -r ./src $1
30 | cp -r ./build/. $1
31 | cp -r ./project $1
32 | cp LICENSE $1
33 | cp package.json $1
34 | cp README.md $1
35 |
--------------------------------------------------------------------------------
/src/browser/mocha-utils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All rights reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 |
18 | /* global require */
19 | /* eslint-env browser */
20 |
21 | (() => {
22 | const mochaUtils = require('../utils/mocha.js');
23 |
24 | /* eslint-disable no-negated-condition */
25 | if (typeof window === 'undefined') {
26 | self.goog = self.goog || {};
27 | self.goog.mochaUtils = self.goog.mochaUtils || mochaUtils;
28 |
29 | self.addEventListener('message', event => {
30 | switch (event.data) {
31 | case 'ready-check': {
32 | event.ports[0].postMessage({
33 | ready: true
34 | });
35 | break;
36 | }
37 | case 'start-tests': {
38 | self.goog.mochaUtils.startInBrowserMochaTests()
39 | .then(results => {
40 | event.ports[0].postMessage(results);
41 | });
42 | break;
43 | }
44 | default: {
45 | event.ports[0].postMessage({
46 | error: 'Unknown test name: ' + event.data
47 | });
48 | break;
49 | }
50 | }
51 | });
52 | } else {
53 | window.goog = window.goog || {};
54 | window.goog.mochaUtils = window.goog.mochaUtils || mochaUtils;
55 | }
56 | })();
57 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All rights reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 |
18 | 'use strict';
19 |
20 | /* eslint-env node */
21 |
22 | const TestServer = require('./node/test-server');
23 | const mochaUtils = require('./utils/mocha');
24 |
25 | /**
26 | *
sw-testing-helpers can be used in node, a browser or in a service worker.
27 | * Different classes are exposed depending on what is imported and where.
28 | *
29 | *
When you require `sw-testing-helpers` you'll have access to a few
30 | * parameters
34 | *
35 | * @module sw-testing-helpers
36 | * @property {TestServer} TestServer The TestServer class that can be
37 | * extended and instantiated.
38 | * @property {MochaUtils} mochaUtils An instance of the MochaUtils class.
39 | */
40 | module.exports = {
41 | TestServer: TestServer,
42 | mochaUtils: mochaUtils
43 | };
44 |
--------------------------------------------------------------------------------
/test/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "node": true,
4 | "mocha": true
5 | },
6 | "rules": {
7 | "max-len": 0,
8 | "no-console": 0,
9 | "padded-blocks": 0,
10 | "no-multiple-empty-lines": 0,
11 | "no-unused-expressions": 0,
12 | "no-invalid-this": 0
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/test/browser-tests/index.html:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 | Browser Tests
17 |
18 |
19 |
23 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/clear-all-caches.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 |
23 | 'use strict';
24 |
25 | describe('Test swUtils.clearAllCaches()', function() {
26 |
27 | it('should resolve with nothing to clear', function() {
28 | return window.goog.swUtils.clearAllCaches();
29 | });
30 |
31 | it('should resolve after deleting all caches', function() {
32 | return window.caches.open('hello')
33 | .then(cache => {
34 | return cache.put('/', new Response('hello'));
35 | })
36 | .then(() => {
37 | return window.caches.open('hello-2');
38 | })
39 | .then(cache => {
40 | return cache.put('/', new Response('hello-2'));
41 | })
42 | .then(() => {
43 | return window.goog.swUtils.clearAllCaches();
44 | })
45 | .then(() => {
46 | return window.caches.keys();
47 | })
48 | .then(cacheKeys => {
49 | cacheKeys.length.should.equal(0);
50 | });
51 | });
52 |
53 | });
54 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/controlled-by-sw.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 | /* global chai:false */
23 |
24 | 'use strict';
25 |
26 | describe('Test swUtils.controlledBySW()', function() {
27 | const SERVICE_WORKER_PATH = '/test/browser-tests/window-utils/serviceworkers';
28 |
29 | beforeEach(function() {
30 | return window.goog.swUtils.cleanState();
31 | });
32 |
33 | after(function() {
34 | return window.goog.swUtils.cleanState();
35 | });
36 |
37 | it('should reject when called with no arguments', function() {
38 | return window.goog.swUtils.controlledBySW()
39 | .then(() => {
40 | throw new Error('Should have rejected');
41 | }, () => {});
42 | });
43 |
44 | it('should reject when called with an array argument', function() {
45 | return window.goog.swUtils.controlledBySW([])
46 | .then(() => {
47 | throw new Error('Should have rejected');
48 | }, () => {});
49 | });
50 |
51 | it('should reject called with an object argument', function() {
52 | return window.goog.swUtils.controlledBySW({})
53 | .then(() => {
54 | throw new Error('Should have rejected');
55 | }, () => {});
56 | });
57 |
58 | it('should reject when used with an invalid service worker path', function() {
59 | return window.goog.swUtils.controlledBySW(SERVICE_WORKER_PATH + '/sw-doesnt-exist.js')
60 | .then(() => {
61 | throw new Error('Should have rejected');
62 | }, () => {});
63 | });
64 |
65 | it('should reject when used with a service worker that fails to install', function() {
66 | return window.goog.swUtils.controlledBySW(SERVICE_WORKER_PATH + '/sw-broken-install.js')
67 | .then(() => {
68 | throw new Error('Should have rejected');
69 | }, () => {});
70 | });
71 |
72 | it('should resolve once the service worker controls the iframe', function() {
73 | return window.goog.swUtils.controlledBySW(SERVICE_WORKER_PATH + '/immediate-control.js')
74 | .then(iframe => {
75 | chai.expect(iframe.contentWindow.navigator.serviceWorker.controller).to.exist;
76 | });
77 | });
78 | });
79 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/get-iframe.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 |
23 | 'use strict';
24 |
25 | describe('Test swUtils.getIframe()', function() {
26 | let firstIframeSrc = null;
27 |
28 | beforeEach(function() {
29 | return window.goog.swUtils.cleanState();
30 | });
31 |
32 | after(function() {
33 | return window.goog.swUtils.cleanState();
34 | });
35 |
36 | it('should create a new iframe with a src starting with /test/iframe', function() {
37 | return window.goog.swUtils.getIframe()
38 | .then(iframe => {
39 | iframe.should.be.defined;
40 | iframe.src.should.be.defined;
41 | iframe.src.indexOf('/test/iframe/').should.not.equal(-1);
42 |
43 | firstIframeSrc = iframe.src;
44 | });
45 | });
46 |
47 | it('should create a new iframe with unique src', function() {
48 | return window.goog.swUtils.getIframe()
49 | .then(iframe => {
50 | firstIframeSrc.should.not.equal(iframe.src);
51 | });
52 | });
53 |
54 | it('should return the same iframe in the same test', function() {
55 | let firstIframe = 0;
56 | return window.goog.swUtils.getIframe()
57 | .then(iframe => {
58 | firstIframe = iframe;
59 | return window.goog.swUtils.getIframe();
60 | })
61 | .then(iframe => {
62 | iframe.should.equal(firstIframe);
63 | });
64 | });
65 | });
66 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/library.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 |
23 | 'use strict';
24 |
25 | describe('Test swUtils Library', function() {
26 | it('should load window.goog.swUtils without leaks', function() {
27 | return new Promise((resolve, reject) => {
28 | // By leaks this is referring to the only thing Propel
29 | // should add to the global scope (i.e. window) is goog
30 | const scriptElement = document.createElement('script');
31 | scriptElement.setAttribute('type', 'text/javascript');
32 | scriptElement.src = '/build/browser/sw-utils.js';
33 | document.querySelector('head').appendChild(scriptElement);
34 | scriptElement.onerror = () => {
35 | reject(new Error('Unable to load script.'));
36 | };
37 | scriptElement.onload = () => {
38 | window.goog.swUtils.should.be.defined;
39 |
40 | resolve();
41 | };
42 | });
43 | });
44 |
45 | it('should be able to find window.goog.swUtils', () => {
46 | window.goog.swUtils.should.be.defined;
47 | });
48 | });
49 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/example-tests.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an "AS IS" BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | */
13 |
14 | 'use strict';
15 |
16 | /* eslint-env worker, serviceworker, mocha */
17 |
18 | importScripts('/node_modules/mocha/mocha.js');
19 | importScripts('/node_modules/chai/chai.js');
20 | importScripts('/build/browser/mocha-utils.js');
21 |
22 | self.chai.should();
23 | mocha.setup({
24 | ui: 'bdd',
25 | reporter: null
26 | });
27 |
28 | mocha.checkLeaks();
29 | mocha.globals(['goog']);
30 |
31 | describe('Example SW Tests', function() {
32 | it('should do nothing', function() {
33 |
34 | });
35 |
36 | it('should be able to identify a Date as a Date', function() {
37 | (new Date() instanceof Date).should.equal(true);
38 | });
39 |
40 | it('[NOTE: This is designed to be an error in SW. Used to test that errors bubble up same as passed tests. Passing tests while printing a failing error is by design and is "A OK".]', function() {
41 | throw new Error('I`m an Error. Hi.');
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/immediate-control.js:
--------------------------------------------------------------------------------
1 | /* global self:false */
2 |
3 | // This is used by the controlled-by-sw.js test.
4 | // It's a service worker that activates & takes control of clients immediately.
5 | // It specifically does not wrap the calls with event.waitUntil();
6 | // see https://github.com/GoogleChrome/sw-testing-helpers/pull/54#discussion_r107965709
7 |
8 | self.addEventListener('install', () => self.skipWaiting());
9 | self.addEventListener('activate', () => self.clients.claim());
10 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/sw-1.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/test/browser-tests/window-utils/serviceworkers/sw-1.js
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/sw-2.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleChromeLabs/sw-testing-helpers/e8504865d37348699dc3fb9f3ad4f2ee669ce920/test/browser-tests/window-utils/serviceworkers/sw-2.js
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/sw-broken-install.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All rights reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 |
18 | 'use strict';
19 |
20 | /* eslint-env serviceworker */
21 |
22 | self.addEventListener('install', event => {
23 | event.waitUntil(
24 | Promise.resolve()
25 | .then(() => {
26 | return Promise.reject('Nope - sorry.');
27 | })
28 | );
29 | });
30 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/serviceworkers/sw-no-tests.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an "AS IS" BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | */
13 |
14 | 'use strict';
15 |
16 | /* eslint-env worker, serviceworker, mocha */
17 |
18 | importScripts('/node_modules/mocha/mocha.js');
19 | importScripts('/node_modules/chai/chai.js');
20 | importScripts('/build/browser/mocha-utils.js');
21 |
22 | self.chai.should();
23 | mocha.setup({
24 | ui: 'bdd',
25 | reporter: null
26 | });
27 |
--------------------------------------------------------------------------------
/test/browser-tests/window-utils/unregister-all-registrations.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 |
23 | 'use strict';
24 |
25 | describe('Test swUtils.unregisterAllRegistrations()', function() {
26 | const SERVICE_WORKER_PATH = '/test/browser-tests/window-utils/serviceworkers';
27 |
28 | it('should resolve with nothing to unregister', function() {
29 | return window.goog.swUtils.unregisterAllRegistrations();
30 | });
31 |
32 | it('should resolve after unregistering service workers', function() {
33 | return navigator.serviceWorker.register(SERVICE_WORKER_PATH + '/sw-1.js')
34 | .then(() => {
35 | return navigator.serviceWorker.register(SERVICE_WORKER_PATH + '/sw-2.js');
36 | })
37 | .then(() => {
38 | return window.goog.swUtils.unregisterAllRegistrations();
39 | })
40 | .then(() => {
41 | return navigator.serviceWorker.getRegistrations();
42 | })
43 | .then(registrations => {
44 | registrations.length.should.equal(0);
45 | });
46 | });
47 |
48 | });
49 |
--------------------------------------------------------------------------------
/test/helpers/download-test-browsers.js:
--------------------------------------------------------------------------------
1 | const seleniumAssistant = require('selenium-assistant');
2 |
3 | const promises = [
4 | seleniumAssistant.downloadLocalBrowser('chrome', 'stable', 48),
5 | seleniumAssistant.downloadLocalBrowser('chrome', 'beta', 48),
6 | seleniumAssistant.downloadLocalBrowser('chrome', 'unstable', 48),
7 | seleniumAssistant.downloadLocalBrowser('firefox', 'stable', 48),
8 | seleniumAssistant.downloadLocalBrowser('firefox', 'beta', 48),
9 | seleniumAssistant.downloadLocalBrowser('firefox', 'unstable', 48)
10 | ];
11 |
12 | Promise.all(promises)
13 | .then(() => {
14 | console.log('Browser download complete.');
15 | })
16 | .catch(err => {
17 | console.log('Failed to download browsers.', err);
18 | });
19 |
--------------------------------------------------------------------------------
/test/node-tests.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | 'use strict';
18 |
19 | const path = require('path');
20 | const glob = require('glob');
21 | const chai = require('chai');
22 |
23 | chai.should();
24 |
25 | describe('Perform Node Tests', function() {
26 | const globPattern = path.join(__dirname, 'node-tests', '/') + '*.js';
27 | const testFiles = glob.sync(globPattern);
28 | testFiles.forEach(testFile => {
29 | require(testFile);
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/test/node-tests/library.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2016 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | // This is a test and we want descriptions to be useful, if this
18 | // breaks the max-length, it's ok.
19 |
20 | /* eslint-disable max-len, no-unused-expressions */
21 | /* eslint-env browser, mocha */
22 |
23 | 'use strict';
24 |
25 | const path = require('path');
26 |
27 | describe('Test require of sw-testing-helpers', function() {
28 |
29 | it('should be able get the node utils from package.json main', () => {
30 | const packageJson = require('../../package.json');
31 |
32 | // The /project/copy-build-files.sh script will ensure files in build
33 | // will be places in the root of the published directory so
34 | // check the file is in build
35 | const testingHelper = require(path.join('..', '..', packageJson.main));
36 | testingHelper.mochaUtils.should.be.defined;
37 | testingHelper.TestServer.should.be.defined;
38 | });
39 | });
40 |
--------------------------------------------------------------------------------