Commit Graph

11 Commits

Author SHA1 Message Date
Joey Parrish fbbd63d96b test: Late load tests, fix Chromecast test flake (#4115)
This change fixes tests on Chromecast by loading tests later in the process.  Test scripts are now dynamically inserted by boot.js, rather than loaded by Karma.  The bootstrapping code then awaits the completion of that before starting the Karma frameworks (Jasmine) to run the tests.

This also removes the use of goog.provide/goog.require in tests and test utils.  We don't need to load test utils or library sources dynamically in each test, and this gives us more explicit control over script loading and ordering.

Closes #4094
2022-04-11 15:47:48 -07:00
michellezhuo 0eb3b620d3 build: add goog.require for compiler upgrade (Part 5)
Change-Id: I7c001f1c6d68a994342c1184e394f4643fd56ac9
2020-10-16 00:10:07 +00:00
Joey Parrish 7e6a0f38ff fix: Correct license headers in misc. files
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs.  This does not
affect the compiled output, and is only done for consistency.

Issue #2638

Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
2020-06-09 16:13:56 -07:00
Joey Parrish 64896d70b0 Use shorter license header
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.

This also updates the company name from "Google, Inc" to "Google LLC".

Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
2019-11-22 18:18:36 +00:00
Jacob Trimble 47daf49f31 Use arrow functions for callbacks.
This is an automated change to convert use of "function" functions
to arrow functions.  This doesn't change all uses of bind() that
could be converted.  This also doesn't remove all "function" functions.

Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
2019-05-09 16:40:46 +00:00
Aaron Vaage f8b707aaeb Use Sets For Uniqueness
Update all our code to use |Set| to handle storing and testing
unique values.

Change-Id: Id809d4d84e4779ae19be58eca96983750c3f3a81
2018-09-14 22:03:04 +00:00
Joey Parrish 7091275cbf Replace indexOf with includes, startsWith
This replaces almost every instance of indexOf on both String and
Array.  There are very few places where we really wanted an index.
Mostly, indexOf was used to check for inclusion.

Change-Id: I08e299768b6ffdb4bfc30b39b5d82a058c6d1b56
2018-09-14 19:10:56 +00:00
Jacob Trimble 4913d28867 Add a hasSameElements utility method.
This method checks that two arrays contain the same elements (with the
same number of occurrences) in them.  This will be used in follow-up
CLs.

Change-Id: I9b98c2f0b93de5a5aa0d8e00476a88d22482704c
2018-09-06 20:25:24 +00:00
Jacob Trimble 2c922000a1 Fix equality check in removeDuplicates.
Now it will correctly remove duplicate NaN entries.  This also updates
it to use ES6 and uses indexOf instead of an explicit inner loop.

Change-Id: I18e747bd882515c46c9a1c410696321ca4d3cc0e
2018-09-05 22:03:52 +00:00
Jacob Trimble f70436540c Convert 'var' to 'let'/'const' (3 of 9).
This is part of a change to convert all usages of 'var' with either
'let' or 'const'.  This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.

Change-Id: I10f5c38a8b06b5797c6eec7492829084114514c9
2018-02-14 00:47:03 +00:00
Jacob Trimble ded62a8205 Add more tests and remove dead code.
This brings 9 classes over 80% branch coverage.

Change-Id: Id9edf22022c3f99d21fa6cad6df6994ee751079d
2017-01-11 01:20:19 +00:00