Import Cobalt 23.master.0.306194
diff --git a/BUILD.gn b/BUILD.gn
index 7a4b5d1..fa1f55e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -25,7 +25,10 @@
   testonly = true
 
   if (is_qa || is_gold) {
-    deps = [ "//starboard" ]
+    deps = [
+      "//cobalt:default",
+      "//starboard",
+    ]
   } else {
     deps = [ ":gn_all" ]
   }
diff --git a/base/util/values/BUILD.gn b/base/util/values/BUILD.gn
new file mode 100644
index 0000000..9c26a0f
--- /dev/null
+++ b/base/util/values/BUILD.gn
@@ -0,0 +1,21 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("values_util") {
+  sources = [
+    "values_util.cc",
+    "values_util.h",
+  ]
+  deps = [ "//base" ]
+}
diff --git a/build/config/win/visual_studio_version.gni b/build/config/win/visual_studio_version.gni
index 8fc7434..48ecc5b 100644
--- a/build/config/win/visual_studio_version.gni
+++ b/build/config/win/visual_studio_version.gni
@@ -19,6 +19,10 @@
   declare_args() {
     # Path to Visual Studio.
     visual_studio_path = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/$visual_studio_version"
+
+    wdk_include_path = "$windows_sdk_path/Include/$wdk_version"
+
+    wdk_lib_path = "$windows_sdk_path/lib/$wdk_version"
   }
 } else {
   declare_args() {
diff --git a/cobalt/BUILD.gn b/cobalt/BUILD.gn
index c35a63f..25ae8bc 100644
--- a/cobalt/BUILD.gn
+++ b/cobalt/BUILD.gn
@@ -14,13 +14,29 @@
 
 group("gn_all") {
   testonly = true
+  deps = [
+    ":default",
+    "//cobalt/layout:layout_test",
+    "//cobalt/web_animations:web_animations_test",
+    "//cobalt/websocket:websocket_test",
+    "//cobalt/xhr:xhr_test",
+  ]
+}
 
+group("default") {
   deps = [
     "//cobalt/account",
     "//cobalt/audio",
     "//cobalt/base",
-    "//cobalt/browser:generated_bindings",
+    "//cobalt/browser",
+    "//cobalt/css_parser",
+    "//cobalt/dom",
+    "//cobalt/dom_parser",
+    "//cobalt/encoding:text_encoding",
     "//cobalt/fetch",
+    "//cobalt/h5vcc",
+    "//cobalt/input",
+    "//cobalt/layout",
     "//cobalt/math",
     "//cobalt/media",
     "//cobalt/media_capture",
@@ -43,6 +59,9 @@
     "//cobalt/subtlecrypto",
     "//cobalt/trace_event",
     "//cobalt/ui_navigation",
+    "//cobalt/webdriver",
+    "//cobalt/websocket",
+    "//cobalt/xhr",
     "//content/browser/speech",
     "//crypto",
     "//nb",
@@ -61,6 +80,8 @@
 
   if (sb_is_evergreen) {
     deps += [
+      "//base/util/values:values_util",
+      "//components/prefs",
       "//third_party/llvm-project/compiler-rt:compiler_rt",
       "//third_party/llvm-project/libcxx:cxx",
       "//third_party/llvm-project/libcxxabi:cxxabi",
diff --git a/cobalt/audio/BUILD.gn b/cobalt/audio/BUILD.gn
index 905cdb1..d24bd06 100644
--- a/cobalt/audio/BUILD.gn
+++ b/cobalt/audio/BUILD.gn
@@ -15,6 +15,10 @@
 static_library("audio") {
   has_pedantic_warnings = true
 
+  # Includes event_target.h and dom_settings.h from //cobalt/dom which depends
+  # on this target
+  check_includes = false
+
   sources = [
     "async_audio_decoder.cc",
     "async_audio_decoder.h",
@@ -53,8 +57,27 @@
 
   deps = [
     "//cobalt/base",
+    "//cobalt/dom:dom_exception",
     "//cobalt/media",
     "//cobalt/script",
     "//starboard:starboard_headers_only",
   ]
+  deps += cobalt_platform_dependencies
+}
+
+target(gtest_target_type, "audio_test") {
+  testonly = true
+  has_pedantic_warnings = true
+
+  sources = [ "audio_node_input_output_test.cc" ]
+
+  deps = [
+    ":audio",
+    "//cobalt/dom",
+    "//cobalt/media",
+    "//cobalt/script",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gtest",
+  ]
+  deps += cobalt_platform_dependencies
 }
diff --git a/cobalt/bindings/bindings_templates.gni b/cobalt/bindings/bindings_templates.gni
index 8eeb453..c2d4daf 100644
--- a/cobalt/bindings/bindings_templates.gni
+++ b/cobalt/bindings/bindings_templates.gni
@@ -56,21 +56,27 @@
     ]
     inputs += invoker.bindings_extra_inputs
 
-    outputs = invoker.outputs
+    generated_file_path =
+        "$generated_source_output_dir/{{source_root_relative_dir}}"
+    generated_file_name = "${generated_bindings_prefix}_{{source_name_part}}"
+    outputs = [
+      "$generated_file_path/$generated_file_name.h",
+      "$generated_file_path/$generated_file_name.cc",
+    ]
 
     args = [
       "python2",
       rebase_path(py_script, root_build_dir),
       "--cache-directory",
-      rebase_path(invoker.cache_directory, root_build_dir),
+      rebase_path(invoker.cache_directory),
       "--output-directory",
-      rebase_path(invoker.output_directory, root_build_dir),
+      rebase_path(invoker.output_directory),
       "--interfaces-info",
-      rebase_path(invoker.interfaces_info, root_build_dir),
+      rebase_path(invoker.interfaces_info),
       "--component-info",
-      rebase_path(invoker.component_info, root_build_dir),
+      rebase_path(invoker.component_info),
       "--extended-attributes",
-      rebase_path(invoker.extended_attributes, root_build_dir),
+      rebase_path(invoker.extended_attributes),
       "{{source}}",
     ]
   }
diff --git a/cobalt/black_box_tests/README.md b/cobalt/black_box_tests/README.md
index 2fd70f4..6a696ea 100644
--- a/cobalt/black_box_tests/README.md
+++ b/cobalt/black_box_tests/README.md
@@ -60,22 +60,22 @@
 work with runner.JSTestsSucceeded() in the python test scripts. Together,
 they allow for test logic to exist in either the python test scripts or
 JavaScript test data.
-e.g. Call OnEndTest() to signal test completion on the JavaScript side,
+e.g. Call OnEndTest() to signal test completion in the JavaScripts,
 JSTestsSucceeded() will react to the signal and return the test status of
-JavaScript test logic; another example is that when the python script wants to
-wait for some setup steps on JavaScript, call runner.WaitForJSTestsSetup().
-Calling setupFinished() in JavaScript whenever ready will unblock the wait.
+JavaScript test logic; another example is that when python script wants to wait
+for some setup steps on JavaScript, call runner.WaitForJSTestsSetup(). Calling
+setupFinished() in JavaScript whenever ready will unblock the wait.
 
 
 ## Test Data
 
-A default local test server will be launched before any unit test starts to
+A default local test server will be launcher before any unit test starts to
 serve the test data in black_box_tests/testdata/. The server's port will be
 passed to the app launcher to fetch test data from.
-Test data can include the target web page for Cobalt to open and any additional
-resources (font file, JavaScripts...).
+Test data can include target web page for Cobalt to open and any additional
+resource(font file, JavaScripts...).
 Tests are free to start their own HTTP servers if the default test server is
-inadequate (e.g. The test is testing that Cobalt handles receipt of a specific
+inadequate(e.g. The test is testing that Cobalt handles receipt of a specific
 HTTP server generated error code properly).
 
 
diff --git a/cobalt/black_box_tests/black_box_tests.py b/cobalt/black_box_tests/black_box_tests.py
index bfb73d8..cae01ff 100644
--- a/cobalt/black_box_tests/black_box_tests.py
+++ b/cobalt/black_box_tests/black_box_tests.py
@@ -65,7 +65,6 @@
     'compression_test',
     'disable_eval_with_csp',
     'persistent_cookie',
-    'soft_mic_platform_service_test',
     'web_debugger',
     'web_platform_tests',
 ]
diff --git a/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.html b/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.html
deleted file mode 100644
index 7b1c8a0..0000000
--- a/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-  <head></head>
-  <body>
-    <!--  -->
-    <script src='black_box_js_test_utils.js'></script>
-    <script src='soft_mic_platform_service_test.js'></script>
-  </body>
-</html>
diff --git a/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.js b/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.js
deleted file mode 100644
index b42d528..0000000
--- a/cobalt/black_box_tests/testdata/soft_mic_platform_service_test.js
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright 2021 The Cobalt Authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-'use strict';
-
-var SOFT_MIC_SERVICE_NAME = "com.google.youtube.tv.SoftMic";
-
-function failTest() {
-  notReached();
-  onEndTest();
-}
-
-/**
-* @param {ArrayBuffer} data to be converted to a String.
-*/
-function ab2str(data) {
-  try {
-    var string_data = new TextDecoder("utf-8").decode(data);
-    return string_data;
-  } catch(error) {
-    console.log(`ab2str() error: ${error}, decoding data: ${data}`);
-    failTest();
-  }
-}
-
-/**
-* @param {String} data to be converted to an ArrayBuffer.
-*/
-function str2ab(data) {
-  try {
-    var array_buffer_data = new TextEncoder().encode(data).buffer;
-    return array_buffer_data;
-  } catch(error) {
-    console.log(`str2ab() error: ${error}, decoding data: ${data}`);
-    failTest();
-  }
-}
-
-function bothUndefined(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicUndefinedSoftMicTrue(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicUndefinedSoftMicFalse(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertFalse(soft_mic);
-}
-
-function hardMicTrueSoftMicUndefined(hard_mic, soft_mic) {
-  assertTrue(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicTrueSoftMicTrue(hard_mic, soft_mic) {
-  assertTrue(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicTrueSoftMicFalse(hard_mic, soft_mic) {
-  assertTrue(hard_mic);
-  assertFalse(soft_mic);
-}
-
-function hardMicFalseSoftMicUndefined(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicFalseSoftMicTrue(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertTrue(soft_mic);
-}
-
-function hardMicFalseSoftMicFalse(hard_mic, soft_mic) {
-  assertFalse(hard_mic);
-  assertFalse(soft_mic);
-}
-
-function testService(assertCallback) {
-  /**
-  * @param {ArrayBuffer} data
-  */
-   function receiveCallback(service, data) {
-    var str_response = ab2str(data);
-
-    try {
-      var response = JSON.parse(str_response);
-      var has_hard_mic = response["hasHardMicSupport"];
-      var has_soft_mic = response["hasSoftMicSupport"];
-      console.log(`receiveCallback, has_hard_mic: ${has_hard_mic}, has_soft_mic: ${has_soft_mic}`);
-
-      assertCallback(has_hard_mic, has_soft_mic);
-    } catch (error) {
-      console.log(`receiveCallback() error: ${error}`);
-      failTest();
-    }
-
-    soft_mic_service.close();
-    onEndTest();
-  }
-
-  if (!H5vccPlatformService) {
-    console.log("H5vccPlatformService is not implemented");
-    failTest();
-    return;
-  }
-
-  if (!H5vccPlatformService.has(SOFT_MIC_SERVICE_NAME)) {
-    console.log(`H5vccPlatformService.Has(${SOFT_MIC_SERVICE_NAME}) returned false.`);
-    failTest();
-    return;
-  }
-
-  // Open the service and pass the receive_callback.
-  var soft_mic_service = H5vccPlatformService.open(SOFT_MIC_SERVICE_NAME,
-                              receiveCallback);
-
-  if (soft_mic_service === null) {
-    console.log("H5vccPlatformService.open() returned null");
-    failTest();
-    return;
-  }
-
-  soft_mic_service.send(str2ab(JSON.stringify("getMicSupport")));
-}
-
-window.onkeydown = function(event) {
-  if (event.keyCode === 97) {
-    testService(bothUndefined);
-  } else if (event.keyCode === 98) {
-    testService(hardMicUndefinedSoftMicTrue);
-  } else if (event.keyCode === 99) {
-    testService(hardMicUndefinedSoftMicFalse);
-  } else if (event.keyCode === 100) {
-    testService(hardMicTrueSoftMicUndefined);
-  } else if (event.keyCode === 101) {
-    testService(hardMicTrueSoftMicTrue);
-  } else if (event.keyCode === 102) {
-    testService(hardMicTrueSoftMicFalse);
-  } else if (event.keyCode === 103) {
-    testService(hardMicFalseSoftMicUndefined);
-  } else if (event.keyCode === 104) {
-    testService(hardMicFalseSoftMicTrue);
-  } else if (event.keyCode === 105) {
-    testService(hardMicFalseSoftMicFalse);
-  }
-}
diff --git a/cobalt/black_box_tests/tests/soft_mic_platform_service_test.py b/cobalt/black_box_tests/tests/soft_mic_platform_service_test.py
deleted file mode 100644
index 4db7ba4..0000000
--- a/cobalt/black_box_tests/tests/soft_mic_platform_service_test.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2021 The Cobalt Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License
-"""Test SoftMicPlatformService messages match between web app and platform"""
-
-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-import _env  # pylint: disable=unused-import
-
-from cobalt.black_box_tests import black_box_tests
-from cobalt.black_box_tests.threaded_web_server import ThreadedWebServer
-from cobalt.tools.automated_testing import webdriver_utils
-
-keys = webdriver_utils.import_selenium_module('webdriver.common.keys')
-
-
-class SoftMicPlatformServiceTest(black_box_tests.BlackBoxTestCase):
-
-  def test_soft_mic_platform_service(self):
-    with ThreadedWebServer(binding_address=self.GetBindingAddress()) as server:
-      url = server.GetURL(
-          file_name='testdata/soft_mic_platform_service_test.html')
-
-      # The webpage listens for NUMPAD1 through NUMPAD9 at opening.
-      with self.CreateCobaltRunner(url=url) as runner:
-        # Press NUMPAD1 to test bothUndefined
-        runner.SendKeys(keys.Keys.NUMPAD1)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url, target_params=['--has_soft_mic_support=true']) as runner:
-        # Press NUMPAD2 to test hardMicUndefinedSoftMicTrue
-        runner.SendKeys(keys.Keys.NUMPAD2)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url, target_params=['--has_soft_mic_support=false']) as runner:
-        # Press NUMPAD3 to test hardMicUndefinedSoftMicFalse
-        runner.SendKeys(keys.Keys.NUMPAD3)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url, target_params=['--has_hard_mic_support=true']) as runner:
-        # Press NUMPAD4 to test hardMicTrueSoftMicUndefined
-        runner.SendKeys(keys.Keys.NUMPAD4)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url,
-          target_params=([
-              '--has_hard_mic_support=true', '--has_soft_mic_support=true'
-          ])) as runner:
-        # Press NUMPAD5 to test hardMicTrueSoftMicTrue
-        runner.SendKeys(keys.Keys.NUMPAD5)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url,
-          target_params=([
-              '--has_hard_mic_support=true', '--has_soft_mic_support=false'
-          ])) as runner:
-        # Press NUMPAD6 to test hardMicTrueSoftMicFalse
-        runner.SendKeys(keys.Keys.NUMPAD6)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url, target_params=['--has_hard_mic_support=false']) as runner:
-        # Press NUMPAD7 to test hardMicFalseSoftMicUndefined
-        runner.SendKeys(keys.Keys.NUMPAD7)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url,
-          target_params=([
-              '--has_hard_mic_support=false', '--has_soft_mic_support=true'
-          ])) as runner:
-        # Press NUMPAD8 to test hardMicFalseSoftMicTrue
-        runner.SendKeys(keys.Keys.NUMPAD8)
-        self.assertTrue(runner.JSTestsSucceeded())
-
-      with self.CreateCobaltRunner(
-          url=url,
-          target_params=([
-              '--has_hard_mic_support=false', '--has_soft_mic_support=false'
-          ])) as runner:
-        # Press NUMPAD9 to test hardMicFalseSoftMicFalse
-        runner.SendKeys(keys.Keys.NUMPAD9)
-        self.assertTrue(runner.JSTestsSucceeded())
diff --git a/cobalt/browser/BUILD.gn b/cobalt/browser/BUILD.gn
index 3ce9573..cd760a5 100644
--- a/cobalt/browser/BUILD.gn
+++ b/cobalt/browser/BUILD.gn
@@ -16,19 +16,149 @@
 import("//cobalt/browser/browser_bindings_variables.gni")
 import("//cobalt/browser/idl_files.gni")
 
+target(final_executable_type, "cobalt") {
+  sources = [ "main.cc" ]
+  deps = [
+    ":browser",
+    ":browser_switches",
+    "//cobalt/base",
+    "//net",
+  ]
+}
+
 config("bindings_includes") {
   include_dirs = [ generated_source_output_dir ]
 }
 
-# TODO: h5vcc and webdriver depend on targets in this file.
-# group("bindings") {
-#   deps = [
-#     "//cobalt/h5vcc",
-#     "//cobalt/webdriver",
-#     ":generated_bindings",
-#   ]
-#   all_dependent_configs = [ ":bindings_includes" ]
-# }
+source_set("browser_switches") {
+  sources = [
+    "switches.cc",
+    "switches.h",
+  ]
+
+  public_deps = [ "//starboard:starboard_headers_only" ]
+}
+
+static_library("browser") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "application.cc",
+    "application.h",
+    "browser_module.cc",
+    "browser_module.h",
+    "device_authentication.cc",
+    "device_authentication.h",
+    "lifecycle_observer.h",
+    "on_screen_keyboard_starboard_bridge.cc",
+    "on_screen_keyboard_starboard_bridge.h",
+    "render_tree_combiner.cc",
+    "render_tree_combiner.h",
+    "screen_shot_writer.cc",
+    "screen_shot_writer.h",
+    "splash_screen.cc",
+    "splash_screen.h",
+    "splash_screen_cache.cc",
+    "splash_screen_cache.h",
+    "suspend_fuzzer.cc",
+    "suspend_fuzzer.h",
+    "system_platform_error_handler.cc",
+    "system_platform_error_handler.h",
+    "url_handler.cc",
+    "url_handler.h",
+    "user_agent_platform_info.cc",
+    "user_agent_platform_info.h",
+    "user_agent_string.cc",
+    "user_agent_string.h",
+    "web_module.cc",
+    "web_module.h",
+    "web_module_stat_tracker.cc",
+    "web_module_stat_tracker.h",
+  ]
+
+  public_deps = [ "//cobalt/dom" ]
+
+  deps = [
+    ":bindings",
+    ":browser_switches",
+    "//cobalt/account",
+    "//cobalt/audio",
+    "//cobalt/base",
+    "//cobalt/browser/memory_settings:browser_memory_settings",
+    "//cobalt/browser/memory_tracker:memory_tracker_tool",
+    "//cobalt/build:cobalt_build_id",
+    "//cobalt/configuration",
+    "//cobalt/css_parser",
+    "//cobalt/cssom",
+    "//cobalt/dom_parser",
+    "//cobalt/encoding:text_encoding",
+    "//cobalt/fetch",
+    "//cobalt/h5vcc",
+    "//cobalt/input",
+    "//cobalt/layout",
+    "//cobalt/loader",
+    "//cobalt/math",
+    "//cobalt/media",
+    "//cobalt/media_capture",
+    "//cobalt/media_session",
+    "//cobalt/network",
+    "//cobalt/overlay_info",
+    "//cobalt/render_tree",
+    "//cobalt/renderer",
+    "//cobalt/renderer/test/png_utils",
+    "//cobalt/script",
+    "//cobalt/script:engine",
+    "//cobalt/speech",
+    "//cobalt/sso",
+    "//cobalt/storage",
+    "//cobalt/subtlecrypto",
+    "//cobalt/system_window",
+    "//cobalt/trace_event",
+    "//cobalt/ui_navigation",
+    "//cobalt/webdriver",
+    "//cobalt/websocket",
+    "//cobalt/xhr",
+    "//crypto",
+    "//nb",
+    "//net",
+    "//starboard",
+    "//third_party/icu:icui18n",
+    "//third_party/protobuf:protobuf_lite",
+    "//url",
+  ]
+
+  if (!is_gold) {
+    sources += [
+      "debug_console.cc",
+      "debug_console.h",
+      "lifecycle_console_commands.cc",
+      "lifecycle_console_commands.h",
+    ]
+    defines = [ "ENABLE_ABOUT_SCHEME" ]
+    deps += [
+      "//cobalt/debug",
+      "//cobalt/debug:console_command_manager",
+    ]
+  }
+
+  if (sb_is_evergreen) {
+    # TODO(b/206642994): Migrate //cobalt/updater
+    # deps += [ "//cobalt/updater" ]
+  } else {
+    deps += cobalt_platform_dependencies
+  }
+}
+
+group("bindings") {
+  public_configs = [ ":bindings_includes" ]
+
+  deps = [
+    ":generated_bindings_sources",
+    ":generated_types_sources",
+    "//cobalt/h5vcc",
+    "//cobalt/webdriver",
+  ]
+}
 
 idl_compile("generated_bindings") {
   sources = source_idl_files
@@ -39,6 +169,7 @@
   interfaces_info = interfaces_info_combined_pickle
   output_directory = generated_source_output_dir
 
+  # TODO(b/211055528): Missing deps from generated sources.
   deps = [
     ":cached_jinja_templates",
     ":cached_lex_yacc_tables",
@@ -52,13 +183,14 @@
   public_deps = engine_dependencies
 
   public_configs = [ ":bindings_includes" ]
+}
 
-  generated_file_path =
-      "$generated_source_output_dir/{{source_root_relative_dir}}"
-  generated_file_name = "${generated_bindings_prefix}_{{source_name_part}}"
-  outputs = [
-    "$generated_file_path/$generated_file_name.h",
-    "$generated_file_path/$generated_file_name.cc",
+source_set("generated_bindings_sources") {
+  sources = get_target_outputs(":generated_bindings")
+  public_deps = [ ":generated_bindings" ]
+  deps = [
+    # Ensure that all the files have been generated before trying to compile.
+    ":generated_types",
   ]
 }
 
@@ -71,6 +203,7 @@
   interfaces_info = interfaces_info_combined_pickle
   output_directory = generated_source_output_dir
 
+  # TODO(b/211055528): Missing deps from generated sources.
   deps = [
     ":cached_jinja_templates",
     ":cached_lex_yacc_tables",
@@ -78,14 +211,17 @@
     ":interfaces_info_individual",
     ":interfaces_info_overall",
   ]
+  public_deps = engine_dependencies
 
   public_configs = [ ":bindings_includes" ]
+}
 
-  generated_file_path =
-      "$generated_source_output_dir/{{source_root_relative_dir}}"
-  outputs = [
-    "$generated_file_path/${generated_bindings_prefix}_{{source_name_part}}.h",
-    "$generated_file_path/{{source_name_part}}.cc",
+source_set("generated_types_sources") {
+  sources = get_target_outputs(":generated_types")
+  public_deps = [ ":generated_types" ]
+  deps = [
+    # Ensure that all the files have been generated before trying to compile.
+    ":generated_bindings",
   ]
 }
 
@@ -93,6 +229,7 @@
   script = "//starboard/build/run_bash.py"
   py_script = engine_conversion_header_generator_script
 
+  # TODO(b/211055528): Missing deps from generated sources.
   deps = [
     ":cached_jinja_templates",
     ":cached_lex_yacc_tables",
@@ -102,8 +239,6 @@
 
   public_deps = engine_dependencies
 
-  sources = source_idl_files + generated_header_idl_files
-
   # Generated IDL file that will define all the constructors that should be
   # on the Window object.
   global_names_idl_file =
@@ -116,6 +251,8 @@
     "//cobalt/bindings/shared/idl_conditional_macros.h",
   ]
   inputs += bindings_extra_inputs
+  inputs += source_idl_files
+  inputs += generated_header_idl_files
 
   outputs = [ generated_type_conversion_header_file ]
 
diff --git a/cobalt/browser/application.h b/cobalt/browser/application.h
index c08330c..7915a9d 100644
--- a/cobalt/browser/application.h
+++ b/cobalt/browser/application.h
@@ -39,9 +39,9 @@
 #endif
 
 #if defined(ENABLE_DEBUGGER)
-#include "cobalt/debug/console/command_manager.h"
-#include "cobalt/debug/remote/debug_web_server.h"
-#endif  // ENABLE_DEBUGGER
+#include "cobalt/debug/console/command_manager.h"  // nogncheck
+#include "cobalt/debug/remote/debug_web_server.h"  // nogncheck
+#endif                                             // ENABLE_DEBUGGER
 
 namespace cobalt {
 namespace browser {
@@ -68,8 +68,7 @@
   void OnNetworkEvent(const base::Event* event);
 
   // Called to handle an application event.
-  void OnApplicationEvent(SbEventType event_type,
-                          SbTimeMonotonic timestamp);
+  void OnApplicationEvent(SbEventType event_type, SbTimeMonotonic timestamp);
 
   // Called to handle a window size change event.
   void OnWindowSizeChangedEvent(const base::Event* event);
@@ -230,8 +229,7 @@
   void OnDeepLinkConsumedCallback(const std::string& link);
 
   // Dispatch events for deep links.
-  void DispatchDeepLink(const char* link,
-                        SbTimeMonotonic timestamp);
+  void DispatchDeepLink(const char* link, SbTimeMonotonic timestamp);
   void DispatchDeepLinkIfNotConsumed();
 
   DISALLOW_COPY_AND_ASSIGN(Application);
diff --git a/cobalt/browser/memory_settings/BUILD.gn b/cobalt/browser/memory_settings/BUILD.gn
new file mode 100644
index 0000000..a99e9c2
--- /dev/null
+++ b/cobalt/browser/memory_settings/BUILD.gn
@@ -0,0 +1,44 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("browser_memory_settings") {
+  sources = [
+    "auto_mem.cc",
+    "auto_mem.h",
+    "auto_mem_settings.cc",
+    "auto_mem_settings.h",
+    "calculations.cc",
+    "calculations.h",
+    "checker.cc",
+    "checker.h",
+    "constants.h",
+    "memory_settings.cc",
+    "memory_settings.h",
+    "pretty_print.cc",
+    "pretty_print.h",
+    "scaling_function.cc",
+    "scaling_function.h",
+    "table_printer.cc",
+    "table_printer.h",
+    "texture_dimensions.h",
+  ]
+  deps = [
+    "//base",
+    "//cobalt/browser:browser_switches",
+    "//cobalt/configuration",
+    "//cobalt/loader",
+    "//cobalt/math",
+    "//starboard/common",
+  ]
+}
diff --git a/cobalt/browser/memory_tracker/BUILD.gn b/cobalt/browser/memory_tracker/BUILD.gn
new file mode 100644
index 0000000..4131d62
--- /dev/null
+++ b/cobalt/browser/memory_tracker/BUILD.gn
@@ -0,0 +1,56 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("memory_tracker_tool") {
+  sources = [
+    "tool.cc",
+    "tool.h",
+    "tool/buffered_file_writer.cc",
+    "tool/buffered_file_writer.h",
+    "tool/compressed_time_series_tool.cc",
+    "tool/compressed_time_series_tool.h",
+    "tool/histogram_table_csv_base.h",
+    "tool/internal_fragmentation_tool.cc",
+    "tool/internal_fragmentation_tool.h",
+    "tool/leak_finder_tool.cc",
+    "tool/leak_finder_tool.h",
+    "tool/log_writer_tool.cc",
+    "tool/log_writer_tool.h",
+    "tool/malloc_logger_tool.cc",
+    "tool/malloc_logger_tool.h",
+    "tool/malloc_stats_tool.cc",
+    "tool/malloc_stats_tool.h",
+    "tool/memory_size_binner_tool.cc",
+    "tool/memory_size_binner_tool.h",
+    "tool/params.cc",
+    "tool/params.h",
+    "tool/print_csv_tool.cc",
+    "tool/print_csv_tool.h",
+    "tool/print_tool.cc",
+    "tool/print_tool.h",
+    "tool/tool_impl.cc",
+    "tool/tool_impl.h",
+    "tool/tool_thread.cc",
+    "tool/tool_thread.h",
+    "tool/util.cc",
+    "tool/util.h",
+  ]
+  deps = [
+    "//base",
+    "//cobalt/base",
+    "//cobalt/script",
+    "//nb",
+    "//starboard",
+  ]
+}
diff --git a/cobalt/browser/web_module.cc b/cobalt/browser/web_module.cc
index 06600b8..6315007 100644
--- a/cobalt/browser/web_module.cc
+++ b/cobalt/browser/web_module.cc
@@ -75,8 +75,8 @@
 #include "starboard/gles.h"
 
 #if defined(ENABLE_DEBUGGER)
-#include "cobalt/debug/backend/debug_module.h"
-#endif  // defined(ENABLE_DEBUGGER)
+#include "cobalt/debug/backend/debug_module.h"  // nogncheck
+#endif                                          // defined(ENABLE_DEBUGGER)
 
 namespace cobalt {
 namespace browser {
diff --git a/cobalt/browser/web_module.h b/cobalt/browser/web_module.h
index 20b39bb..2ed326d 100644
--- a/cobalt/browser/web_module.h
+++ b/cobalt/browser/web_module.h
@@ -63,11 +63,11 @@
 #include "url/gurl.h"
 
 #if defined(ENABLE_DEBUGGER)
-#include "cobalt/debug/backend/debug_dispatcher.h"
-#include "cobalt/debug/backend/debugger_state.h"
-#include "cobalt/debug/backend/render_overlay.h"
-#include "cobalt/debug/console/command_manager.h"
-#endif  // ENABLE_DEBUGGER
+#include "cobalt/debug/backend/debug_dispatcher.h"  // nogncheck
+#include "cobalt/debug/backend/debugger_state.h"    // nogncheck
+#include "cobalt/debug/backend/render_overlay.h"    // nogncheck
+#include "cobalt/debug/console/command_manager.h"   // nogncheck
+#endif                                              // ENABLE_DEBUGGER
 
 namespace cobalt {
 namespace browser {
diff --git a/cobalt/build/contents_dir.gni b/cobalt/build/contents_dir.gni
new file mode 100644
index 0000000..b70736e
--- /dev/null
+++ b/cobalt/build/contents_dir.gni
@@ -0,0 +1,17 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+declare_args() {
+  static_contents_source_dir = "//cobalt/content"
+}
diff --git a/cobalt/build/generate_data_header.py b/cobalt/build/generate_data_header.py
index fde53f7..04fe02e 100755
--- a/cobalt/build/generate_data_header.py
+++ b/cobalt/build/generate_data_header.py
@@ -47,7 +47,7 @@
 
 def WriteFileDataToHeader(filename, output_file):
   """Concatenates a single file into the output file."""
-  with open(filename, 'r') as f:
+  with open(filename, 'rb') as f:
     file_contents = f.read()
 
     def Chunks(l, n):
@@ -55,8 +55,14 @@
       for i in range(0, len(l), n):
         yield l[i:i + n]
 
+    # TODO(b/154137263): Remove once python2 is gone.
+    is_py2 = sys.version_info.major == 2
+
+    def GetByte(x):
+      return ord(x) if is_py2 else x
+
     output_string = ',\n'.join([
-        ', '.join(['0x%02x' % ord(y)
+        ', '.join(['0x%02x' % GetByte(y)
                    for y in x])
         for x in Chunks(file_contents, 13)
     ])
diff --git a/cobalt/css_parser/BUILD.gn b/cobalt/css_parser/BUILD.gn
new file mode 100644
index 0000000..08114c0
--- /dev/null
+++ b/cobalt/css_parser/BUILD.gn
@@ -0,0 +1,122 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+config("css_parser_config") {
+  include_dirs = [ "$target_gen_dir" ]
+}
+
+# Generates header files from Bison grammar that are privately included
+# by CSS scanner and parser.
+action("css_grammar") {
+  script = "//starboard/build/run_bash.py"
+
+  # Define the platform specific Bison binary.
+  if (is_win) {
+    bison_executable = "win_bison"
+  } else {
+    bison_executable = "bison"
+  }
+
+  inputs = [ "grammar.y" ]
+
+  outputs = [
+    # Tokens and types, included by scanner.
+    "$target_gen_dir/grammar_generated.h",
+
+    # LALR(1) parser tables and yy*() functions, included by parser.
+    "$target_gen_dir/grammar_impl_generated.h",
+  ]
+
+  args = [
+    bison_executable,
+    "-Wall",
+    "-Werror",
+    "--defines=" + rebase_path(outputs[0], root_build_dir),
+    "--output=" + rebase_path(outputs[1], root_build_dir),
+    rebase_path(inputs[0], root_build_dir),
+  ]
+}
+
+static_library("css_parser") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "animation_shorthand_property_parse_structures.cc",
+    "animation_shorthand_property_parse_structures.h",
+    "background_shorthand_property_parse_structures.cc",
+    "background_shorthand_property_parse_structures.h",
+    "border_shorthand_property_parse_structures.cc",
+    "border_shorthand_property_parse_structures.h",
+    "flex_shorthand_property_parse_structures.cc",
+    "flex_shorthand_property_parse_structures.h",
+    "font_shorthand_property_parse_structures.cc",
+    "font_shorthand_property_parse_structures.h",
+    "grammar.h",
+    "margin_or_padding_shorthand.cc",
+    "margin_or_padding_shorthand.h",
+    "parser.cc",
+    "parser.h",
+    "position_parse_structures.cc",
+    "position_parse_structures.h",
+    "property_declaration.h",
+    "ref_counted_util.h",
+    "scanner.cc",
+    "scanner.h",
+    "shadow_property_parse_structures.cc",
+    "shadow_property_parse_structures.h",
+    "string_pool.h",
+    "text_decoration_shorthand_property_parse_structures.cc",
+    "text_decoration_shorthand_property_parse_structures.h",
+    "transition_shorthand_property_parse_structures.cc",
+    "transition_shorthand_property_parse_structures.h",
+    "trivial_string_piece.h",
+    "trivial_type_pairs.h",
+  ]
+  sources += get_target_outputs(":css_grammar")
+
+  public_configs = [ ":css_parser_config" ]
+
+  # Scanner exposes UChar32 in a header.
+  public_deps = [ "//third_party/icu:icuuc" ]
+
+  deps = [
+    ":css_grammar",
+    "//cobalt/base",
+    "//cobalt/cssom",
+    "//nb",
+    "//starboard/common",
+  ]
+}
+
+target(gtest_target_type, "css_parser_test") {
+  testonly = true
+  has_pedantic_warnings = true
+
+  sources = [
+    "parser_test.cc",
+    "ref_counted_util_test.cc",
+    "scanner_test.cc",
+    "trivial_string_piece_test.cc",
+  ]
+
+  deps = [
+    ":css_grammar",
+    ":css_parser",
+    "//base",
+    "//cobalt/cssom",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gtest",
+  ]
+}
diff --git a/cobalt/cssom/BUILD.gn b/cobalt/cssom/BUILD.gn
new file mode 100644
index 0000000..fa236c6
--- /dev/null
+++ b/cobalt/cssom/BUILD.gn
@@ -0,0 +1,329 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("cssom") {
+  has_pedantic_warnings = true
+
+  # cssom includes a file from css_parser which in turn depends on cssom.
+  # testing/mock_css_parser.h includes gmock which can't be in the deps
+  check_includes = false
+
+  sources = [
+    "absolute_url_value.cc",
+    "absolute_url_value.h",
+    "active_pseudo_class.cc",
+    "active_pseudo_class.h",
+    "after_pseudo_element.cc",
+    "after_pseudo_element.h",
+    "animation.h",
+    "animation_set.cc",
+    "animation_set.h",
+    "attribute_selector.cc",
+    "attribute_selector.h",
+    "before_pseudo_element.cc",
+    "before_pseudo_element.h",
+    "calc_value.cc",
+    "calc_value.h",
+    "cascade_precedence.h",
+    "cascaded_style.cc",
+    "cascaded_style.h",
+    "character_classification.h",
+    "child_combinator.cc",
+    "child_combinator.h",
+    "class_selector.cc",
+    "class_selector.h",
+    "cobalt_ui_nav_focus_transform_function.cc",
+    "cobalt_ui_nav_focus_transform_function.h",
+    "cobalt_ui_nav_spotlight_transform_function.cc",
+    "cobalt_ui_nav_spotlight_transform_function.h",
+    "color_stop.cc",
+    "color_stop.h",
+    "combinator.cc",
+    "combinator.h",
+    "combinator_visitor.h",
+    "complex_selector.cc",
+    "complex_selector.h",
+    "compound_selector.cc",
+    "compound_selector.h",
+    "computed_style.cc",
+    "computed_style.h",
+    "computed_style_utils.h",
+    "css.cc",
+    "css.h",
+    "css_computed_style_data.cc",
+    "css_computed_style_data.h",
+    "css_computed_style_declaration.cc",
+    "css_computed_style_declaration.h",
+    "css_condition_rule.cc",
+    "css_condition_rule.h",
+    "css_declaration_data.h",
+    "css_declaration_util.cc",
+    "css_declaration_util.h",
+    "css_declared_style_data.cc",
+    "css_declared_style_data.h",
+    "css_declared_style_declaration.cc",
+    "css_declared_style_declaration.h",
+    "css_font_face_declaration_data.cc",
+    "css_font_face_declaration_data.h",
+    "css_font_face_rule.cc",
+    "css_font_face_rule.h",
+    "css_grouping_rule.cc",
+    "css_grouping_rule.h",
+    "css_keyframe_rule.cc",
+    "css_keyframe_rule.h",
+    "css_keyframes_rule.cc",
+    "css_keyframes_rule.h",
+    "css_media_rule.cc",
+    "css_media_rule.h",
+    "css_parser.h",
+    "css_rule.cc",
+    "css_rule.h",
+    "css_rule_list.cc",
+    "css_rule_list.h",
+    "css_rule_style_declaration.cc",
+    "css_rule_style_declaration.h",
+    "css_rule_visitor.h",
+    "css_style_declaration.cc",
+    "css_style_declaration.h",
+    "css_style_rule.cc",
+    "css_style_rule.h",
+    "css_style_sheet.cc",
+    "css_style_sheet.h",
+    "css_transition.cc",
+    "css_transition.h",
+    "css_transition_set.cc",
+    "css_transition_set.h",
+    "descendant_combinator.cc",
+    "descendant_combinator.h",
+    "empty_pseudo_class.cc",
+    "empty_pseudo_class.h",
+    "filter_function.h",
+    "filter_function_list_value.cc",
+    "filter_function_list_value.h",
+    "focus_pseudo_class.cc",
+    "focus_pseudo_class.h",
+    "following_sibling_combinator.cc",
+    "following_sibling_combinator.h",
+    "font_style_value.cc",
+    "font_style_value.h",
+    "font_weight_value.cc",
+    "font_weight_value.h",
+    "hover_pseudo_class.cc",
+    "hover_pseudo_class.h",
+    "id_selector.cc",
+    "id_selector.h",
+    "integer_value.cc",
+    "integer_value.h",
+    "interpolate_property_value.cc",
+    "interpolate_property_value.h",
+    "interpolated_transform_property_value.cc",
+    "interpolated_transform_property_value.h",
+    "keyword_names.cc",
+    "keyword_names.h",
+    "keyword_value.cc",
+    "keyword_value.h",
+    "length_value.cc",
+    "length_value.h",
+    "linear_gradient_value.cc",
+    "linear_gradient_value.h",
+    "list_value.h",
+    "local_src_value.cc",
+    "local_src_value.h",
+    "map_to_mesh_function.cc",
+    "map_to_mesh_function.h",
+    "matrix_function.cc",
+    "matrix_function.h",
+    "media_feature.cc",
+    "media_feature.h",
+    "media_feature_keyword_value.cc",
+    "media_feature_keyword_value.h",
+    "media_feature_keyword_value_names.cc",
+    "media_feature_keyword_value_names.h",
+    "media_feature_names.cc",
+    "media_feature_names.h",
+    "media_list.cc",
+    "media_list.h",
+    "media_query.cc",
+    "media_query.h",
+    "media_type_names.cc",
+    "media_type_names.h",
+    "mutation_observer.h",
+    "next_sibling_combinator.cc",
+    "next_sibling_combinator.h",
+    "not_pseudo_class.cc",
+    "not_pseudo_class.h",
+    "number_value.cc",
+    "number_value.h",
+    "percentage_value.cc",
+    "percentage_value.h",
+    "property_definitions.cc",
+    "property_definitions.h",
+    "property_key_list_value.cc",
+    "property_key_list_value.h",
+    "property_list_value.h",
+    "property_value.h",
+    "property_value_visitor.cc",
+    "property_value_visitor.h",
+    "pseudo_class.h",
+    "pseudo_class_names.cc",
+    "pseudo_class_names.h",
+    "pseudo_element.h",
+    "pseudo_element_names.cc",
+    "pseudo_element_names.h",
+    "radial_gradient_value.cc",
+    "radial_gradient_value.h",
+    "ratio_value.cc",
+    "ratio_value.h",
+    "resolution_value.cc",
+    "resolution_value.h",
+    "rgba_color_value.cc",
+    "rgba_color_value.h",
+    "rotate_function.cc",
+    "rotate_function.h",
+    "scale_function.cc",
+    "scale_function.h",
+    "scoped_list_value.h",
+    "scoped_ref_list_value.h",
+    "selector.h",
+    "selector_tree.cc",
+    "selector_tree.h",
+    "selector_visitor.h",
+    "serializer.cc",
+    "serializer.h",
+    "shadow_value.cc",
+    "shadow_value.h",
+    "simple_selector.h",
+    "specificity.cc",
+    "specificity.h",
+    "string_value.cc",
+    "string_value.h",
+    "style_sheet.cc",
+    "style_sheet.h",
+    "style_sheet_list.cc",
+    "style_sheet_list.h",
+    "time_list_value.cc",
+    "time_list_value.h",
+    "timing_function.cc",
+    "timing_function.h",
+    "timing_function_list_value.cc",
+    "timing_function_list_value.h",
+    "transform_function.h",
+    "transform_function_list_value.cc",
+    "transform_function_list_value.h",
+    "transform_function_visitor.h",
+    "transform_property_value.h",
+    "translate_function.cc",
+    "translate_function.h",
+    "type_selector.cc",
+    "type_selector.h",
+    "unicode_range_value.cc",
+    "unicode_range_value.h",
+    "universal_selector.cc",
+    "universal_selector.h",
+    "url_src_value.cc",
+    "url_src_value.h",
+    "url_value.cc",
+    "url_value.h",
+    "user_agent_style_sheet.cc",
+    "user_agent_style_sheet.h",
+    "viewport_size.h",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  public_deps = [ "//cobalt/browser:generated_types" ]
+
+  deps = [
+    ":cssom_embed_resources_as_header_files",
+    "//cobalt/base",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/math",
+    "//cobalt/network",
+    "//cobalt/script",
+    "//cobalt/ui_navigation",
+    "//url",
+  ]
+}
+
+config("embed_cssom_resources_as_header_files_config") {
+  include_dirs = [ root_gen_dir ]
+}
+
+action("cssom_embed_resources_as_header_files") {
+  script = "//cobalt/build/generate_data_header.py"
+
+  inputs = [ "embedded_resources/user_agent_style_sheet.css" ]
+  outputs = [ "$target_gen_dir/embedded_resources.h" ]
+
+  public_configs = [ ":embed_cssom_resources_as_header_files_config" ]
+
+  args = [
+    "CSSOMEmbeddedResources",
+    rebase_path(outputs[0], root_build_dir),
+    rebase_path("embedded_resources", root_build_dir),
+  ]
+}
+
+target(gtest_target_type, "cssom_test") {
+  testonly = true
+  has_pedantic_warnings = true
+
+  sources = [
+    "cascade_precedence_test.cc",
+    "cascaded_style_test.cc",
+    "computed_style_test.cc",
+    "css_computed_style_data_property_set_matcher_test.cc",
+    "css_computed_style_data_test.cc",
+    "css_computed_style_declaration_test.cc",
+    "css_declared_style_data_test.cc",
+    "css_declared_style_declaration_test.cc",
+    "css_font_face_declaration_data_test.cc",
+    "css_font_face_rule_test.cc",
+    "css_grouping_rule_test.cc",
+    "css_property_definitions_test.cc",
+    "css_rule_list_test.cc",
+    "css_rule_visitor_test.cc",
+    "css_style_sheet_test.cc",
+    "css_transition_set_test.cc",
+    "interpolate_property_value_test.cc",
+    "keyword_value_test.cc",
+    "media_feature_test.cc",
+    "media_list_test.cc",
+    "media_query_test.cc",
+    "property_value_is_equal_test.cc",
+    "property_value_to_string_test.cc",
+    "property_value_visitor_test.cc",
+    "selector_test.cc",
+    "selector_tree_test.cc",
+    "selector_visitor_test.cc",
+    "serializer_test.cc",
+    "specificity_test.cc",
+    "style_sheet_list_test.cc",
+    "testing/mock_css_parser.h",
+    "timing_function_test.cc",
+    "transform_function_visitor_test.cc",
+  ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/css_parser",
+    "//cobalt/cssom",
+    "//cobalt/math",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gtest",
+    "//url",
+  ]
+}
diff --git a/cobalt/debug/BUILD.gn b/cobalt/debug/BUILD.gn
new file mode 100644
index 0000000..0f97f00
--- /dev/null
+++ b/cobalt/debug/BUILD.gn
@@ -0,0 +1,141 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("debug") {
+  has_pedantic_warnings = true
+  sources = [
+    "backend/agent_base.cc",
+    "backend/agent_base.h",
+    "backend/command_map.h",
+    "backend/css_agent.cc",
+    "backend/css_agent.h",
+    "backend/debug_backend.cc",
+    "backend/debug_backend.h",
+    "backend/debug_dispatcher.cc",
+    "backend/debug_dispatcher.h",
+    "backend/debug_module.cc",
+    "backend/debug_module.h",
+    "backend/debug_script_runner.cc",
+    "backend/debug_script_runner.h",
+    "backend/debugger_hooks_impl.cc",
+    "backend/debugger_hooks_impl.h",
+    "backend/dom_agent.cc",
+    "backend/dom_agent.h",
+    "backend/log_agent.cc",
+    "backend/log_agent.h",
+    "backend/overlay_agent.cc",
+    "backend/overlay_agent.h",
+    "backend/page_agent.cc",
+    "backend/page_agent.h",
+    "backend/render_layer.cc",
+    "backend/render_layer.h",
+    "backend/render_overlay.cc",
+    "backend/render_overlay.h",
+    "backend/script_debugger_agent.cc",
+    "backend/script_debugger_agent.h",
+    "backend/tracing_agent.cc",
+    "backend/tracing_agent.h",
+    "command.h",
+    "console/debug_hub.cc",
+    "console/debug_hub.h",
+    "console/debugger_event_target.cc",
+    "console/debugger_event_target.h",
+    "debug_client.cc",
+    "debug_client.h",
+    "json_object.cc",
+    "json_object.h",
+    "remote/debug_web_server.cc",
+    "remote/debug_web_server.h",
+  ]
+  deps = [
+    ":console_command_manager",
+    ":copy_backend_web_files",
+    ":copy_console_web_files",
+    ":copy_remote_web_files",
+    "//cobalt/base",
+    "//cobalt/cssom",
+    "//cobalt/dom",
+    "//cobalt/layout",
+    "//cobalt/math",
+    "//cobalt/render_tree",
+    "//cobalt/script",
+    "//cobalt/speech",
+    "//net",
+    "//net:http_server",
+    "//starboard",
+    "//third_party/devtools:devtools_frontend_resources",
+  ]
+}
+
+# Anything that implements a console command can depend on this without
+# depending on the whole debug module.
+static_library("console_command_manager") {
+  # Everything is conditional so implementers of commands can depend on
+  # this unconditionally.
+  if (!is_gold) {
+    sources = [
+      "console/command_manager.cc",
+      "console/command_manager.h",
+    ]
+    deps = [ "//cobalt/base" ]
+  }
+}
+
+copy("copy_backend_web_files") {
+  sources = [
+    "backend/content/css_agent.js",
+    "backend/content/dom_agent.js",
+    "backend/content/overlay_agent.js",
+  ]
+
+  # Canonically this should be "cobalt/debug/backend" to match the source
+  # path, but we put it in the root of the content dir to reduce depth.
+  outputs = [ "$sb_static_contents_output_data_dir/web/debug_backend/{{source_file_part}}" ]
+}
+
+copy("copy_console_web_files") {
+  sources = [
+    "console/content/command_input.js",
+    "console/content/console_manager.js",
+    "console/content/console_values.js",
+    "console/content/debug_commands.js",
+    "console/content/debug_console.css",
+    "console/content/debug_console.html",
+    "console/content/debug_console.js",
+    "console/content/debugger_client.js",
+    "console/content/media_console.js",
+    "console/content/media_console_context.js",
+    "console/content/message_log.js",
+    "console/content/pirate.jpg",
+  ]
+
+  # Canonically this should be "cobalt/debug/console" to match the source
+  # path, but we put it in the root of the content dir to reduce depth.
+  outputs = [ "$sb_static_contents_output_data_dir/web/debug_console/{{source_file_part}}" ]
+}
+
+copy("copy_remote_web_files") {
+  sources = [
+    "remote/content/cobalt-logo-180.png",
+    "remote/content/favicon.ico",
+    "remote/content/index.html",
+    "remote/content/json/index.json",
+  ]
+
+  # Canonically this should be "cobalt/debug/remote" to match the source
+  # path, but we put it in the root of the content dir to reduce depth.
+  outputs = [
+    "$sb_static_contents_output_data_dir/web/debug_remote/{{source_file_part}}",
+  ]
+}
diff --git a/cobalt/demos/content/soft-mic-platform-service-demo/soft_mic_platform_service_demo.html b/cobalt/demos/content/soft-mic-platform-service-demo/soft_mic_platform_service_demo.html
deleted file mode 100644
index fed67ca..0000000
--- a/cobalt/demos/content/soft-mic-platform-service-demo/soft_mic_platform_service_demo.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!--
-This is a light weighted demo page used to verify SoftMicPlatformService.
-Start a http server by running this python3 command in the directory
-cobalt/demos/content/soft-mic-platform-service/:
-python3 -m http.server 8000
-Then run in Cobalt using this command:
-out/linux-x64x11_debug/cobalt --url=http://localhost:8000/soft_mic_platform_service_demo.html
--->
-<!DOCTYPE html>
-<meta charset="utf-8">
-<body>
-  <script>
-    'use strict';
-
-    /**
-    * @param {ArrayBuffer} data to be converted to a String.
-    */
-    function ab2str(data) {
-      try {
-        var string_data = new TextDecoder("utf-8").decode(data);
-        return string_data;
-      } catch(error) {
-        console.error(`ab2str() error: ${error}, decoding data: ${data}`);
-      }
-    }
-
-    /**
-    * @param {String} data to be converted to an ArrayBuffer.
-    */
-    function str2ab(data) {
-      try {
-        var array_buffer_data = new TextEncoder().encode(data).buffer;
-        return array_buffer_data;
-      } catch(error) {
-        console.error(`str2ab() error: ${error}, decoding data: ${data}`);
-      }
-    }
-
-    async function testSoftMicPlatformService() {
-      // These default boolean values represent the default assumption for
-      // platforms that do not implement the extension.
-      var has_soft_mic = true;
-      var has_hard_mic = false;
-
-      if (!H5vccPlatformService) {
-        // H5vccPlatformService is not implemented. Fallback to current Soft Mic
-        // implementation.
-        console.error("H5vccPlatformService is not implemented");
-        return;
-      }
-
-      var SOFT_MIC_SERVICE_NAME = "com.google.youtube.tv.SoftMic";
-
-      if (!H5vccPlatformService.has(SOFT_MIC_SERVICE_NAME)) {
-        // SOFT_MIC_SERVICE_NAME is not implemented. Fallback to current
-        // Soft Mic implementation.
-        console.error(`H5vccPlatformService.Has(${SOFT_MIC_SERVICE_NAME}) returned false.`);
-        return;
-      }
-
-      /**
-      * @param {ArrayBuffer} data
-      */
-      function receiveCallback(service, data) {
-        var str_response = ab2str(data);
-
-        try {
-          var response = JSON.parse(str_response);
-          has_hard_mic = response["hasHardMicSupport"];
-          has_soft_mic = response["hasSoftMicSupport"];
-          console.log(`receiveCallback, has_hard_mic: ${has_hard_mic}, has_soft_mic: ${has_soft_mic}`);
-        } catch (error) {
-          console.error(`receiveCallback() error: ${error}, str_response: ${str_response}`);
-        }
-      }
-
-      // Open the service and pass the receive_callback.
-      var soft_mic_service = H5vccPlatformService.open(SOFT_MIC_SERVICE_NAME,
-                                  receiveCallback);
-
-      // Async web app message for "getMicSupport".
-      soft_mic_service.send(str2ab(JSON.stringify("getMicSupport")));
-
-      // Test notifySearchActive and notifySearchInactive web app messages to the platform.
-      soft_mic_service.send(str2ab(JSON.stringify("notifySearchActive")));
-      soft_mic_service.send(str2ab(JSON.stringify("notifySearchInactive")));
-
-      // Close the service when we are done.
-      var TIME_BEFORE_CLOSE = 10000;
-      await new Promise(r => setTimeout(r, TIME_BEFORE_CLOSE));
-      soft_mic_service.close();
-    }
-
-    testSoftMicPlatformService();
-
-  </script>
-</body>
diff --git a/cobalt/dom/BUILD.gn b/cobalt/dom/BUILD.gn
new file mode 100644
index 0000000..04e1ce0
--- /dev/null
+++ b/cobalt/dom/BUILD.gn
@@ -0,0 +1,389 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//cobalt/build/contents_dir.gni")
+
+static_library("dom") {
+  has_pedantic_warnings = true
+
+  # Includes cobalt/dom/testing/stub_environment_settings.h from dom_testing
+  # which depends on this target.
+  check_includes = false
+
+  sources = [
+    "abort_controller.cc",
+    "abort_controller.h",
+    "abort_signal.cc",
+    "abort_signal.h",
+    "animation_event.h",
+    "animation_frame_request_callback_list.cc",
+    "animation_frame_request_callback_list.h",
+    "application_lifecycle_state.cc",
+    "application_lifecycle_state.h",
+    "attr.cc",
+    "attr.h",
+    "audio_track.h",
+    "audio_track_list.h",
+    "base64.cc",
+    "base64.h",
+    "benchmark_stat_names.cc",
+    "benchmark_stat_names.h",
+    "blob.cc",
+    "blob.h",
+    "buffer_source.cc",
+    "buffer_source.h",
+    "c_val_view.cc",
+    "c_val_view.h",
+    "camera_3d.cc",
+    "camera_3d.h",
+    "captions/system_caption_settings.cc",
+    "captions/system_caption_settings.h",
+    "cdata_section.cc",
+    "cdata_section.h",
+    "character_data.cc",
+    "character_data.h",
+    "cobalt_ua_data_values_interface.cc",
+    "cobalt_ua_data_values_interface.h",
+    "comment.cc",
+    "comment.h",
+    "crypto.cc",
+    "crypto.h",
+    "csp_delegate.cc",
+    "csp_delegate.h",
+    "csp_delegate_factory.cc",
+    "csp_delegate_factory.h",
+    "csp_violation_reporter.cc",
+    "csp_violation_reporter.h",
+    "css_animations_adapter.cc",
+    "css_animations_adapter.h",
+    "css_transitions_adapter.cc",
+    "css_transitions_adapter.h",
+    "custom_event.h",
+    "device_orientation_event.cc",
+    "device_orientation_event.h",
+    "directionality.h",
+    "document.cc",
+    "document.h",
+    "document_timeline.cc",
+    "document_timeline.h",
+    "document_type.cc",
+    "document_type.h",
+    "dom_animatable.cc",
+    "dom_animatable.h",
+    "dom_implementation.cc",
+    "dom_implementation.h",
+    "dom_parser.cc",
+    "dom_parser.h",
+    "dom_rect.h",
+    "dom_rect_list.cc",
+    "dom_rect_list.h",
+    "dom_rect_read_only.h",
+    "dom_settings.cc",
+    "dom_settings.h",
+    "dom_stat_tracker.cc",
+    "dom_stat_tracker.h",
+    "dom_string_map.cc",
+    "dom_string_map.h",
+    "dom_token_list.cc",
+    "dom_token_list.h",
+    "element.cc",
+    "element.h",
+    "element_intersection_observer_module.cc",
+    "element_intersection_observer_module.h",
+    "eme/media_encrypted_event.cc",
+    "eme/media_encrypted_event.h",
+    "eme/media_key_message_event.cc",
+    "eme/media_key_message_event.h",
+    "eme/media_key_session.cc",
+    "eme/media_key_session.h",
+    "eme/media_key_status_map.cc",
+    "eme/media_key_status_map.h",
+    "eme/media_key_system_access.cc",
+    "eme/media_key_system_access.h",
+    "eme/media_keys.cc",
+    "eme/media_keys.h",
+    "error_event.h",
+    "event.cc",
+    "event.h",
+    "event_listener.h",
+    "event_queue.cc",
+    "event_queue.h",
+    "event_target.cc",
+    "event_target.h",
+    "event_target_listener_info.cc",
+    "event_target_listener_info.h",
+    "focus_event.cc",
+    "focus_event.h",
+    "font_cache.cc",
+    "font_cache.h",
+    "font_face.cc",
+    "font_face.h",
+    "font_face_updater.cc",
+    "font_face_updater.h",
+    "font_list.cc",
+    "font_list.h",
+    "global_stats.cc",
+    "global_stats.h",
+    "history.cc",
+    "history.h",
+    "html_anchor_element.cc",
+    "html_anchor_element.h",
+    "html_audio_element.cc",
+    "html_audio_element.h",
+    "html_body_element.cc",
+    "html_body_element.h",
+    "html_br_element.cc",
+    "html_br_element.h",
+    "html_collection.cc",
+    "html_collection.h",
+    "html_div_element.cc",
+    "html_div_element.h",
+    "html_element.cc",
+    "html_element.h",
+    "html_element_context.cc",
+    "html_element_context.h",
+    "html_element_factory.cc",
+    "html_element_factory.h",
+    "html_head_element.cc",
+    "html_head_element.h",
+    "html_heading_element.cc",
+    "html_heading_element.h",
+    "html_html_element.cc",
+    "html_html_element.h",
+    "html_image_element.cc",
+    "html_image_element.h",
+    "html_link_element.cc",
+    "html_link_element.h",
+    "html_media_element.cc",
+    "html_media_element.h",
+    "html_meta_element.cc",
+    "html_meta_element.h",
+    "html_paragraph_element.cc",
+    "html_paragraph_element.h",
+    "html_script_element.cc",
+    "html_script_element.h",
+    "html_span_element.cc",
+    "html_span_element.h",
+    "html_style_element.cc",
+    "html_style_element.h",
+    "html_title_element.cc",
+    "html_title_element.h",
+    "html_unknown_element.h",
+    "html_video_element.cc",
+    "html_video_element.h",
+    "initial_computed_style.cc",
+    "initial_computed_style.h",
+    "input_event.cc",
+    "input_event.h",
+    "intersection_observer.cc",
+    "intersection_observer.h",
+    "intersection_observer_entry.cc",
+    "intersection_observer_entry.h",
+    "intersection_observer_task_manager.cc",
+    "intersection_observer_task_manager.h",
+    "keyboard_event.cc",
+    "keyboard_event.h",
+    "keycode.h",
+    "keyframes_map_updater.cc",
+    "keyframes_map_updater.h",
+    "layout_boxes.h",
+    "local_storage_database.cc",
+    "local_storage_database.h",
+    "location.cc",
+    "location.h",
+    "lottie_player.cc",
+    "lottie_player.h",
+    "media_query_list.cc",
+    "media_query_list.h",
+    "media_source.cc",
+    "media_source.h",
+    "memory_info.cc",
+    "memory_info.h",
+    "message_event.cc",
+    "message_event.h",
+    "mime_type_array.cc",
+    "mime_type_array.h",
+    "mouse_event.cc",
+    "mouse_event.h",
+    "mutation_observer.cc",
+    "mutation_observer.h",
+    "mutation_observer_task_manager.cc",
+    "mutation_observer_task_manager.h",
+    "mutation_record.cc",
+    "mutation_record.h",
+    "mutation_reporter.cc",
+    "mutation_reporter.h",
+    "named_node_map.cc",
+    "named_node_map.h",
+    "navigator.cc",
+    "navigator.h",
+    "navigator_ua_data.cc",
+    "navigator_ua_data.h",
+    "node.cc",
+    "node.h",
+    "node_children_iterator.h",
+    "node_descendants_iterator.h",
+    "node_list.cc",
+    "node_list.h",
+    "node_list_live.cc",
+    "node_list_live.h",
+    "on_error_event_listener.cc",
+    "on_error_event_listener.h",
+    "on_screen_keyboard.cc",
+    "on_screen_keyboard.h",
+    "on_screen_keyboard_bridge.h",
+    "performance.cc",
+    "performance.h",
+    "performance_entry.cc",
+    "performance_entry.h",
+    "performance_entry_list_impl.cc",
+    "performance_entry_list_impl.h",
+    "performance_high_resolution_time.h",
+    "performance_lifecycle_timing.cc",
+    "performance_lifecycle_timing.h",
+    "performance_mark.cc",
+    "performance_mark.h",
+    "performance_measure.cc",
+    "performance_measure.h",
+    "performance_observer.cc",
+    "performance_observer.h",
+    "performance_observer_entry_list.cc",
+    "performance_observer_entry_list.h",
+    "performance_resource_timing.cc",
+    "performance_resource_timing.h",
+    "performance_timing.cc",
+    "performance_timing.h",
+    "plugin_array.cc",
+    "plugin_array.h",
+    "pointer_event.cc",
+    "pointer_event.h",
+    "pointer_state.cc",
+    "pointer_state.h",
+    "progress_event.cc",
+    "progress_event.h",
+    "pseudo_element.cc",
+    "pseudo_element.h",
+    "registered_observer.h",
+    "registered_observer_list.cc",
+    "registered_observer_list.h",
+    "rule_matching.cc",
+    "rule_matching.h",
+    "screen.h",
+    "screenshot.cc",
+    "screenshot.h",
+    "screenshot_manager.cc",
+    "screenshot_manager.h",
+    "security_policy_violation_event.cc",
+    "security_policy_violation_event.h",
+    "serializer.cc",
+    "serializer.h",
+    "source_buffer.cc",
+    "source_buffer.h",
+    "source_buffer_list.cc",
+    "source_buffer_list.h",
+    "storage.cc",
+    "storage.h",
+    "storage_area.cc",
+    "storage_area.h",
+    "storage_event.cc",
+    "storage_event.h",
+    "test_runner.cc",
+    "test_runner.h",
+    "text.cc",
+    "text.h",
+    "time_ranges.cc",
+    "time_ranges.h",
+    "track_base.h",
+    "track_default.h",
+    "track_default_list.h",
+    "track_event.h",
+    "transition_event.h",
+    "ui_event.cc",
+    "ui_event.h",
+    "ui_event_with_key_state.cc",
+    "ui_event_with_key_state.h",
+    "url.cc",
+    "url.h",
+    "url_registry.h",
+    "url_utils.cc",
+    "url_utils.h",
+    "user_agent_platform_info.h",
+    "video_track.h",
+    "video_track_list.h",
+    "wheel_event.cc",
+    "wheel_event.h",
+    "window.cc",
+    "window.h",
+    "window_timers.cc",
+    "window_timers.h",
+    "xml_document.h",
+    "xml_serializer.cc",
+    "xml_serializer.h",
+  ]
+
+  public_deps = [ "//cobalt/browser:generated_types" ]
+
+  deps = [
+    ":dom_exception",
+    ":licenses",
+    "//base:i18n",
+    "//cobalt/base",
+    "//cobalt/browser:generated_bindings",
+    "//cobalt/csp",
+    "//cobalt/cssom",
+    "//cobalt/loader",
+    "//cobalt/loader:origin",
+    "//cobalt/math",
+    "//cobalt/media",
+    "//cobalt/media_capture",
+    "//cobalt/media_session",
+    "//cobalt/network",
+    "//cobalt/network_bridge",
+    "//cobalt/render_tree",
+    "//cobalt/script",
+    "//cobalt/speech",
+    "//cobalt/storage",
+    "//cobalt/storage/store:memory_store",
+    "//cobalt/system_window",
+    "//cobalt/ui_navigation",
+    "//cobalt/web_animations",
+    "//crypto",
+    "//nb",
+    "//net",
+    "//starboard/common",
+    "//third_party/icu:icuuc",
+    "//third_party/modp_b64:modp_b64",
+    "//third_party/protobuf:protobuf_lite",
+    "//url",
+  ]
+}
+
+static_library("dom_exception") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "dom_exception.cc",
+    "dom_exception.h",
+  ]
+
+  deps = [ "//cobalt/script" ]
+}
+
+copy("licenses") {
+  license_path =
+      "licenses/platform/$cobalt_licenses_platform/licenses_cobalt.txt"
+  sources = [ "$static_contents_source_dir/$license_path" ]
+  outputs =
+      [ "$sb_static_contents_output_data_dir/licenses/licenses_cobalt.txt" ]
+}
diff --git a/cobalt/dom_parser/BUILD.gn b/cobalt/dom_parser/BUILD.gn
new file mode 100644
index 0000000..f4f4c20
--- /dev/null
+++ b/cobalt/dom_parser/BUILD.gn
@@ -0,0 +1,42 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("dom_parser") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "html_decoder.cc",
+    "html_decoder.h",
+    "libxml_html_parser_wrapper.cc",
+    "libxml_html_parser_wrapper.h",
+    "libxml_parser_wrapper.cc",
+    "libxml_parser_wrapper.h",
+    "libxml_xml_parser_wrapper.cc",
+    "libxml_xml_parser_wrapper.h",
+    "parser.cc",
+    "parser.h",
+    "xml_decoder.cc",
+    "xml_decoder.h",
+  ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/csp",
+    "//cobalt/dom",
+    "//cobalt/loader",
+    "//net",
+    "//third_party/libxml",
+    "//third_party/protobuf:protobuf_lite",
+  ]
+}
diff --git a/cobalt/encoding/BUILD.gn b/cobalt/encoding/BUILD.gn
new file mode 100644
index 0000000..adb6e89
--- /dev/null
+++ b/cobalt/encoding/BUILD.gn
@@ -0,0 +1,32 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("text_encoding") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "text_decoder.cc",
+    "text_decoder.h",
+    "text_encoder.cc",
+    "text_encoder.h",
+  ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/browser:generated_types",
+    "//cobalt/dom",
+    "//cobalt/script",
+    "//third_party/icu:icuuc",
+  ]
+}
diff --git a/cobalt/extension/updater_notification.h b/cobalt/extension/updater_notification.h
index ce301dc..906cafc 100644
--- a/cobalt/extension/updater_notification.h
+++ b/cobalt/extension/updater_notification.h
@@ -31,9 +31,15 @@
   kCobaltExtensionUpdaterNotificationStateDownloading = 3,
   kCobaltExtensionUpdaterNotificationStateDownloaded = 4,
   kCobaltExtensionUpdaterNotificationStateInstalling = 5,
+#if SB_API_VERSION > 13
+  kCobaltExtensionUpdaterNotificationStateUpdated = 6,
+  kCobaltExtensionUpdaterNotificationStateUpToDate = 7,
+  kCobaltExtensionUpdaterNotificationStateUpdateFailed = 8,
+#else
   kCobaltExtensionUpdaterNotificationStatekUpdated = 6,
   kCobaltExtensionUpdaterNotificationStatekUpToDate = 7,
   kCobaltExtensionUpdaterNotificationStatekUpdateFailed = 8,
+#endif
 } CobaltExtensionUpdaterNotificationState;
 
 typedef struct CobaltExtensionUpdaterNotificationApi {
diff --git a/cobalt/fetch/BUILD.gn b/cobalt/fetch/BUILD.gn
index aa9013e..a623590 100644
--- a/cobalt/fetch/BUILD.gn
+++ b/cobalt/fetch/BUILD.gn
@@ -20,6 +20,7 @@
 
   deps = [
     "//cobalt/base",
+    "//cobalt/dom",
     "//cobalt/script",
     "//cobalt/script:engine",
     "//url",
diff --git a/cobalt/h5vcc/BUILD.gn b/cobalt/h5vcc/BUILD.gn
new file mode 100644
index 0000000..b914711
--- /dev/null
+++ b/cobalt/h5vcc/BUILD.gn
@@ -0,0 +1,117 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+config("h5vcc_internal_config") {
+  # For cobalt_build_id.h
+  include_dirs = [ target_gen_dir ]
+}
+
+config("h5vcc_external_config") {
+  defines = [ "COBALT_ENABLE_CRASH_LOG" ]
+  if (enable_account_manager) {
+    defines += [ "COBALT_ENABLE_ACCOUNT_MANAGER" ]
+  }
+  if (enable_sso) {
+    defines += [ "COBALT_ENABLE_SSO" ]
+  }
+}
+
+static_library("h5vcc") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "dial/dial_http_request.cc",
+    "dial/dial_http_request.h",
+    "dial/dial_http_response.cc",
+    "dial/dial_http_response.h",
+    "dial/dial_server.cc",
+    "dial/dial_server.h",
+    "h5vcc.cc",
+    "h5vcc.h",
+    "h5vcc_accessibility.cc",
+    "h5vcc_accessibility.h",
+    "h5vcc_account_info.cc",
+    "h5vcc_account_info.h",
+    "h5vcc_audio_config.cc",
+    "h5vcc_audio_config.h",
+    "h5vcc_audio_config_array.cc",
+    "h5vcc_audio_config_array.h",
+    "h5vcc_crash_log.cc",
+    "h5vcc_crash_log.h",
+    "h5vcc_deep_link_event_target.cc",
+    "h5vcc_deep_link_event_target.h",
+    "h5vcc_event_listener_container.h",
+    "h5vcc_platform_service.cc",
+    "h5vcc_platform_service.h",
+    "h5vcc_runtime.cc",
+    "h5vcc_runtime.h",
+    "h5vcc_runtime_event_target.cc",
+    "h5vcc_runtime_event_target.h",
+    "h5vcc_screen.cc",
+    "h5vcc_screen.h",
+    "h5vcc_settings.cc",
+    "h5vcc_settings.h",
+    "h5vcc_storage.cc",
+    "h5vcc_storage.h",
+    "h5vcc_system.cc",
+    "h5vcc_system.h",
+    "h5vcc_trace_event.cc",
+    "h5vcc_trace_event.h",
+  ]
+  configs += [ ":h5vcc_internal_config" ]
+  public_configs = [ ":h5vcc_external_config" ]
+  deps = [
+    "//cobalt/account",
+    "//cobalt/base",
+    "//cobalt/browser:browser_switches",
+    "//cobalt/build:cobalt_build_id",
+    "//cobalt/configuration",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/media",
+    "//cobalt/network",
+    "//cobalt/script",
+    "//cobalt/speech",
+    "//cobalt/sso",
+    "//cobalt/storage",
+    "//cobalt/trace_event",
+    "//net",
+    "//net:http_server",
+    "//starboard",
+    "//third_party/protobuf:protobuf_lite",
+  ]
+
+  if (enable_account_manager) {
+    sources += [
+      "h5vcc_account_manager.cc",
+      "h5vcc_account_manager.h",
+    ]
+  }
+
+  if (enable_sso) {
+    sources += [
+      "h5vcc_sso.cc",
+      "h5vcc_sso.h",
+    ]
+  }
+
+  if (sb_is_evergreen) {
+    sources += [
+      "h5vcc_updater.cc",
+      "h5vcc_updater.h",
+    ]
+    # TODO(b/211447021): Migrate //cobalt/updater
+    # deps += [ "//cobalt/updater" ]
+  }
+}
diff --git a/cobalt/input/BUILD.gn b/cobalt/input/BUILD.gn
new file mode 100644
index 0000000..d97732f
--- /dev/null
+++ b/cobalt/input/BUILD.gn
@@ -0,0 +1,56 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("input") {
+  sources = [
+    "camera_3d.h",
+    "create_default_camera_3d.h",
+    "input_device_manager.h",
+    "input_device_manager_desktop.cc",
+    "input_device_manager_desktop.h",
+    "input_device_manager_fuzzer.cc",
+    "input_device_manager_fuzzer.h",
+    "input_device_manager_starboard.cc",
+    "input_poller.h",
+    "input_poller_impl.cc",
+    "input_poller_impl.h",
+    "key_event_handler.cc",
+    "key_event_handler.h",
+    "key_repeat_filter.cc",
+    "key_repeat_filter.h",
+    "keypress_generator_filter.cc",
+    "keypress_generator_filter.h",
+  ]
+
+  if (enable_vr) {
+    sources += [
+      "private/camera_3d_vr.cc",
+      "private/camera_3d_vr.h",
+    ]
+  } else {
+    sources += [
+      "camera_3d_input_poller.cc",
+      "camera_3d_input_poller.h",
+    ]
+  }
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/dom",
+    "//cobalt/overlay_info",
+    "//cobalt/speech",
+    "//cobalt/system_window",
+    "//starboard",
+  ]
+}
diff --git a/cobalt/layout/BUILD.gn b/cobalt/layout/BUILD.gn
new file mode 100644
index 0000000..1daa1a89
--- /dev/null
+++ b/cobalt/layout/BUILD.gn
@@ -0,0 +1,146 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("layout") {
+  has_pedantic_warnings = true
+  sources = [
+    "anonymous_block_box.cc",
+    "anonymous_block_box.h",
+    "base_direction.h",
+    "benchmark_stat_names.cc",
+    "benchmark_stat_names.h",
+    "block_container_box.cc",
+    "block_container_box.h",
+    "block_formatting_block_container_box.cc",
+    "block_formatting_block_container_box.h",
+    "block_formatting_context.cc",
+    "block_formatting_context.h",
+    "block_level_replaced_box.cc",
+    "block_level_replaced_box.h",
+    "box.cc",
+    "box.h",
+    "box_generator.cc",
+    "box_generator.h",
+    "box_intersection_observer_module.cc",
+    "box_intersection_observer_module.h",
+    "container_box.cc",
+    "container_box.h",
+    "flex_container_box.cc",
+    "flex_container_box.h",
+    "flex_formatting_context.cc",
+    "flex_formatting_context.h",
+    "flex_item.cc",
+    "flex_item.h",
+    "flex_line.cc",
+    "flex_line.h",
+    "formatting_context.h",
+    "initial_containing_block.cc",
+    "initial_containing_block.h",
+    "inline_container_box.cc",
+    "inline_container_box.h",
+    "inline_formatting_context.cc",
+    "inline_formatting_context.h",
+    "inline_level_replaced_box.cc",
+    "inline_level_replaced_box.h",
+    "insets_layout_unit.cc",
+    "insets_layout_unit.h",
+    "intersection_observer_root.h",
+    "intersection_observer_target.cc",
+    "intersection_observer_target.h",
+    "layout.cc",
+    "layout.h",
+    "layout_boxes.cc",
+    "layout_boxes.h",
+    "layout_manager.cc",
+    "layout_manager.h",
+    "layout_stat_tracker.cc",
+    "layout_stat_tracker.h",
+    "layout_unit.h",
+    "letterboxed_image.cc",
+    "letterboxed_image.h",
+    "line_box.cc",
+    "line_box.h",
+    "line_wrapping.cc",
+    "line_wrapping.h",
+    "paragraph.cc",
+    "paragraph.h",
+    "point_layout_unit.cc",
+    "point_layout_unit.h",
+    "rect_layout_unit.cc",
+    "rect_layout_unit.h",
+    "render_tree_animations.h",
+    "replaced_box.cc",
+    "replaced_box.h",
+    "size_layout_unit.cc",
+    "size_layout_unit.h",
+    "text_box.cc",
+    "text_box.h",
+    "topmost_event_target.cc",
+    "topmost_event_target.h",
+    "used_style.cc",
+    "used_style.h",
+    "vector2d_layout_unit.cc",
+    "vector2d_layout_unit.h",
+    "white_space_processing.cc",
+    "white_space_processing.h",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  # Exporting dom so that layout_test gets the transitive include paths to
+  # include generated headers.
+  public_deps = [ "//cobalt/dom" ]
+  deps = [
+    "//base:i18n",
+    "//cobalt/base",
+    "//cobalt/cssom",
+    "//cobalt/dom",
+    "//cobalt/loader",
+    "//cobalt/math",
+    "//cobalt/media",
+    "//cobalt/render_tree",
+    "//cobalt/render_tree:animations",
+    "//cobalt/ui_navigation",
+    "//cobalt/web_animations",
+    "//third_party/icu:icuuc",
+  ]
+}
+
+target(gtest_target_type, "layout_test") {
+  testonly = true
+  has_pedantic_warnings = true
+
+  sources = [
+    "layout_unit_test.cc",
+    "letterboxed_image_test.cc",
+    "used_style_test.cc",
+    "white_space_processing_test.cc",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  deps = [
+    ":layout",
+    "//base",
+    "//cobalt/base",
+    "//cobalt/css_parser",
+    "//cobalt/cssom",
+    "//cobalt/math",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gmock",
+  ]
+}
diff --git a/cobalt/loader/BUILD.gn b/cobalt/loader/BUILD.gn
index ed36007..a94ee44 100644
--- a/cobalt/loader/BUILD.gn
+++ b/cobalt/loader/BUILD.gn
@@ -12,6 +12,125 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+static_library("loader") {
+  has_pedantic_warnings = true
+
+  # Includes cobalt/dom/url_utils.h from dom that depends on this target.
+  check_includes = false
+
+  sources = [
+    "blob_fetcher.cc",
+    "blob_fetcher.h",
+    "cache_fetcher.cc",
+    "cache_fetcher.h",
+    "cors_preflight.cc",
+    "cors_preflight.h",
+    "cors_preflight_cache.cc",
+    "cors_preflight_cache.h",
+    "decoder.h",
+    "embedded_fetcher.cc",
+    "embedded_fetcher.h",
+    "error_fetcher.cc",
+    "error_fetcher.h",
+    "fetcher.cc",
+    "fetcher.h",
+    "fetcher_cache.cc",
+    "fetcher_cache.h",
+    "fetcher_factory.cc",
+    "fetcher_factory.h",
+    "file_fetcher.cc",
+    "file_fetcher.h",
+    "font/remote_typeface_cache.h",
+    "font/typeface_decoder.cc",
+    "font/typeface_decoder.h",
+    "image/animated_image_tracker.cc",
+    "image/animated_image_tracker.h",
+    "image/animated_webp_image.cc",
+    "image/animated_webp_image.h",
+    "image/dummy_gif_image_decoder.cc",
+    "image/dummy_gif_image_decoder.h",
+    "image/failure_image_decoder.h",
+    "image/image.h",
+    "image/image_cache.h",
+    "image/image_data_decoder.cc",
+    "image/image_data_decoder.h",
+    "image/image_decoder.cc",
+    "image/image_decoder.h",
+    "image/image_decoder_starboard.cc",
+    "image/image_decoder_starboard.h",
+    "image/image_encoder.cc",
+    "image/image_encoder.h",
+    "image/jpeg_image_decoder.cc",
+    "image/jpeg_image_decoder.h",
+    "image/lottie_animation.cc",
+    "image/lottie_animation.h",
+    "image/lottie_animation_decoder.cc",
+    "image/lottie_animation_decoder.h",
+    "image/png_image_decoder.cc",
+    "image/png_image_decoder.h",
+    "image/stub_image_decoder.h",
+    "image/threaded_image_decoder_proxy.cc",
+    "image/threaded_image_decoder_proxy.h",
+    "image/webp_image_decoder.cc",
+    "image/webp_image_decoder.h",
+    "loader.cc",
+    "loader.h",
+    "loader_factory.cc",
+    "loader_factory.h",
+    "loader_types.h",
+    "mesh/mesh_cache.h",
+    "mesh/mesh_decoder.cc",
+    "mesh/mesh_decoder.h",
+    "mesh/mesh_projection.h",
+    "mesh/projection_codec/constants.h",
+    "mesh/projection_codec/indexed_vert.cc",
+    "mesh/projection_codec/indexed_vert.h",
+    "mesh/projection_codec/projection_decoder.cc",
+    "mesh/projection_codec/projection_decoder.h",
+    "net_fetcher.cc",
+    "net_fetcher.h",
+    "resource_cache.cc",
+    "resource_cache.h",
+    "switches.cc",
+    "switches.h",
+    "sync_loader.cc",
+    "sync_loader.h",
+    "text_decoder.h",
+    "url_fetcher_string_writer.cc",
+    "url_fetcher_string_writer.h",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  deps = [
+    ":embed_loader_resources_as_header_files",
+    ":origin",
+    "//cobalt/base",
+    "//cobalt/configuration",
+    "//cobalt/csp",
+    "//cobalt/math",
+    "//cobalt/network",
+    "//cobalt/render_tree",
+    "//cobalt/renderer/test/png_utils",
+    "//nb",
+    "//third_party/libjpeg-turbo:libjpeg",
+    "//third_party/libpng",
+    "//third_party/libwebp",
+    "//third_party/protobuf:protobuf_lite",
+    "//url",
+  ]
+
+  if (!is_gold) {
+    sources += [
+      "about_fetcher.cc",
+      "about_fetcher.h",
+    ]
+    defines = [ "ENABLE_ABOUT_SCHEME" ]
+    deps += [ "//cobalt/renderer/test/jpeg_utils" ]
+  }
+}
+
 static_library("origin") {
   sources = [
     "origin.cc",
@@ -23,3 +142,29 @@
     "//url",
   ]
 }
+
+action("embed_loader_resources_as_header_files") {
+  script = "//cobalt/build/generate_data_header.py"
+
+  inputs = [
+    "embedded_resources/black_splash_screen.html",
+    "embedded_resources/cobalt_splash_screen.css",
+    "embedded_resources/cobalt_splash_screen.html",
+    "embedded_resources/cobalt_word_logo_356.png",
+    "embedded_resources/dialog.css",
+    "embedded_resources/dialog.js",
+    "embedded_resources/equirectangular_40_40.msh",
+    "embedded_resources/splash_screen.js",
+    "embedded_resources/unable_message.html.template",
+    "embedded_resources/update_message.html.template",
+    "embedded_resources/black_splash_screen.html",
+    "embedded_resources/cobalt_splash_screen.html",
+  ]
+  outputs = [ "$target_gen_dir/embedded_resources.h" ]
+
+  args = [
+    "LoaderEmbeddedResources",
+    rebase_path(outputs[0], root_build_dir),
+    rebase_path("embedded_resources", root_build_dir),
+  ]
+}
diff --git a/cobalt/media/BUILD.gn b/cobalt/media/BUILD.gn
index b0d4dbd..2194a4d 100644
--- a/cobalt/media/BUILD.gn
+++ b/cobalt/media/BUILD.gn
@@ -237,7 +237,9 @@
   deps = [
     "//base",
     "//cobalt/base",
+    "//cobalt/browser:browser_switches",
     "//cobalt/csp",
+    "//cobalt/loader",
     "//cobalt/loader:origin",
     "//cobalt/math",
     "//cobalt/network",
@@ -246,6 +248,7 @@
     "//nb",
     "//net",
     "//starboard",
+    "//third_party/protobuf:protobuf_lite",
     "//url",
   ]
 }
diff --git a/cobalt/media_capture/BUILD.gn b/cobalt/media_capture/BUILD.gn
index 8f61476..f20b541 100644
--- a/cobalt/media_capture/BUILD.gn
+++ b/cobalt/media_capture/BUILD.gn
@@ -15,6 +15,9 @@
 static_library("media_capture") {
   has_pedantic_warnings = true
 
+  # Creates cycle with //cobalt/dom
+  check_includes = false
+
   sources = [
     "encoders/audio_encoder.cc",
     "encoders/audio_encoder.h",
@@ -40,6 +43,7 @@
   deps = [
     "//base",
     "//cobalt/base",
+    "//cobalt/dom:dom_exception",
     "//cobalt/media",
     "//cobalt/media_stream",
     "//cobalt/script",
diff --git a/cobalt/media_stream/BUILD.gn b/cobalt/media_stream/BUILD.gn
index 9a3b9eb..934eec4 100644
--- a/cobalt/media_stream/BUILD.gn
+++ b/cobalt/media_stream/BUILD.gn
@@ -15,6 +15,9 @@
 static_library("media_stream") {
   has_pedantic_warnings = true
 
+  # Creates cycle with //cobalt/dom
+  check_includes = false
+
   sources = [
     "audio_parameters.cc",
     "audio_parameters.h",
diff --git a/cobalt/network/BUILD.gn b/cobalt/network/BUILD.gn
index 619bad9..44bccfc 100644
--- a/cobalt/network/BUILD.gn
+++ b/cobalt/network/BUILD.gn
@@ -46,6 +46,7 @@
   public_deps = [ "//net" ]
 
   deps = [
+    ":copy_ssl_certificates",
     "//cobalt/base",
     "//cobalt/build:cobalt_build_id",
     "//cobalt/configuration",
@@ -63,8 +64,8 @@
     ]
   }
 
-  # Enable network logging on gold builds.
-  if (is_gold) {
+  # Enable network logging on all but gold builds.
+  if (!is_gold) {
     sources += [
       "cobalt_net_log.cc",
       "cobalt_net_log.h",
@@ -73,6 +74,10 @@
     ]
     defines = [ "ENABLE_NETWORK_LOGGING" ]
   }
+
+  if (!sb_is_evergreen) {
+    deps += cobalt_platform_dependencies
+  }
 }
 
 copy("copy_ssl_certificates") {
@@ -209,7 +214,8 @@
     "//cobalt/content/ssl/certs/ff34af3f.0",
   ]
 
-  outputs = [ "$root_build_dir/content/test/{{source_root_relative_dir}}/{{source_file_part}}" ]
+  outputs =
+      [ "$sb_static_contents_output_data_dir/ssl/certs/{{source_file_part}}" ]
 }
 
 target(gtest_target_type, "network_base_test") {
diff --git a/cobalt/network/url_request_context.h b/cobalt/network/url_request_context.h
index 35d9a5d..074fcdb 100644
--- a/cobalt/network/url_request_context.h
+++ b/cobalt/network/url_request_context.h
@@ -27,8 +27,8 @@
 #include "net/url_request/url_request_context_storage.h"
 
 #if defined(ENABLE_DEBUGGER)
-#include "cobalt/debug/console/command_manager.h"
-#endif  // ENABLE_DEBUGGER
+#include "cobalt/debug/console/command_manager.h"  // nogncheck
+#endif                                             // ENABLE_DEBUGGER
 
 namespace cobalt {
 namespace storage {
diff --git a/cobalt/renderer/BUILD.gn b/cobalt/renderer/BUILD.gn
index ece397e..c834841 100644
--- a/cobalt/renderer/BUILD.gn
+++ b/cobalt/renderer/BUILD.gn
@@ -12,11 +12,99 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-static_library("default_options") {
-  check_includes = false
-  sources = [ "//cobalt/renderer/get_default_rasterizer_for_platform.cc" ]
+source_set("renderer_headers_only") {
+  sources = [
+    "egl_and_gles.h",
+
+    # TODO(b/211034223): Consider moving to render_tree
+    "submission.h",
+  ]
   deps = [
+    "//base",
+    "//cobalt/render_tree",
+    "//cobalt/render_tree:animations",
+    "//starboard",
+  ]
+}
+
+static_library("renderer") {
+  sources = [
+    "fps_overlay.cc",
+    "fps_overlay.h",
+    "gles_ext.h",
+    "pipeline.cc",
+    "pipeline.h",
+    "renderer_module.cc",
+    "renderer_module.h",
+    "renderer_module_default_options.cc",
+    "smoothed_value.cc",
+    "smoothed_value.h",
+    "submission_queue.cc",
+    "submission_queue.h",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  public_deps = [ ":renderer_headers_only" ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/browser/memory_settings:browser_memory_settings",
+    "//cobalt/configuration",
+    "//cobalt/content/fonts:copy_font_data",
+    "//cobalt/math",
+    "//cobalt/render_tree",
+    "//cobalt/render_tree:animations",
+    "//cobalt/render_tree:render_tree",
     "//cobalt/renderer/backend:renderer_backend",
+    "//cobalt/renderer/rasterizer",
+    "//cobalt/renderer/rasterizer/skia:hardware_rasterizer",
+    "//cobalt/renderer/rasterizer/skia:software_rasterizer",
+    "//cobalt/system_window",
+    "//nb",
+    "//starboard:starboard_headers_only",
+  ]
+
+  if (is_starboard) {
+    deps += [ default_renderer_options_dependency ]
+  }
+
+  if (!is_gold) {
+    deps += [ "//cobalt/debug:console_command_manager" ]
+  }
+}
+
+static_library("render_tree_pixel_tester") {
+  sources = [
+    "render_tree_pixel_tester.cc",
+    "render_tree_pixel_tester.h",
+  ]
+
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  deps = [
+    ":renderer",
+    "//cobalt/base",
+    "//cobalt/configuration",
+    "//cobalt/math:math",
+    "//cobalt/render_tree:render_tree",
+    "//cobalt/renderer/backend:renderer_backend",
+    "//cobalt/renderer/rasterizer/skia/skia",
+    "//cobalt/renderer/test/png_utils",
+    "//starboard:starboard_headers_only",
+  ]
+}
+
+static_library("default_options") {
+  sources = [ "//cobalt/renderer/get_default_rasterizer_for_platform.cc" ]
+
+  deps = [
+    "//cobalt/configuration",
+    "//cobalt/renderer/backend:renderer_backend",
+    "//cobalt/renderer/rasterizer/egl:hardware_rasterizer",
+    "//cobalt/renderer/rasterizer/egl:software_rasterizer",
     "//cobalt/renderer/rasterizer/skia:hardware_rasterizer",
     "//starboard:starboard_headers_only",
   ]
diff --git a/cobalt/renderer/backend/egl/BUILD.gn b/cobalt/renderer/backend/egl/BUILD.gn
index 8720b2c..b9e2d8f 100644
--- a/cobalt/renderer/backend/egl/BUILD.gn
+++ b/cobalt/renderer/backend/egl/BUILD.gn
@@ -45,6 +45,7 @@
     "//cobalt/base",
     "//cobalt/configuration",
     "//cobalt/math",
+    "//cobalt/renderer:renderer_headers_only",
     "//cobalt/system_window",
     "//starboard:starboard_headers_only",
     "//starboard/common",
diff --git a/cobalt/renderer/get_default_rasterizer_for_platform.cc b/cobalt/renderer/get_default_rasterizer_for_platform.cc
index 7a7ed5e..8e64ca7 100644
--- a/cobalt/renderer/get_default_rasterizer_for_platform.cc
+++ b/cobalt/renderer/get_default_rasterizer_for_platform.cc
@@ -22,8 +22,7 @@
 #include "cobalt/renderer/rasterizer/egl/software_rasterizer.h"
 #include "cobalt/renderer/rasterizer/skia/hardware_rasterizer.h"
 #include "cobalt/renderer/rasterizer/stub/rasterizer.h"
-#include "cobalt/renderer/renderer_module.h"
-
+#include "cobalt/renderer/renderer_module.h"  // nogncheck
 #include "starboard/gles.h"
 
 namespace cobalt {
diff --git a/cobalt/renderer/pipeline.h b/cobalt/renderer/pipeline.h
index 7b02091..e09e7e0 100644
--- a/cobalt/renderer/pipeline.h
+++ b/cobalt/renderer/pipeline.h
@@ -35,8 +35,8 @@
 #include "cobalt/renderer/submission_queue.h"
 
 #if defined(ENABLE_DEBUGGER)
-#include "cobalt/debug/console/command_manager.h"
-#endif  // defined(ENABLE_DEBUGGER)
+#include "cobalt/debug/console/command_manager.h"  // nogncheck
+#endif                                             // defined(ENABLE_DEBUGGER)
 
 namespace cobalt {
 namespace renderer {
diff --git a/cobalt/renderer/rasterizer/egl/BUILD.gn b/cobalt/renderer/rasterizer/egl/BUILD.gn
index 341375a..51363e6 100644
--- a/cobalt/renderer/rasterizer/egl/BUILD.gn
+++ b/cobalt/renderer/rasterizer/egl/BUILD.gn
@@ -27,6 +27,7 @@
     "//base",
     "//cobalt/math",
     "//cobalt/render_tree",
+    "//cobalt/renderer:renderer_headers_only",
     "//cobalt/renderer/backend:renderer_backend",
     "//cobalt/renderer/backend/egl:egl_backend",
     "//cobalt/renderer/rasterizer/skia:software_rasterizer",
@@ -81,7 +82,6 @@
     "shader_program.h",
     "shader_program_manager.cc",
     "shader_program_manager.h",
-    "software_rasterizer.cc",
   ]
 
   configs -= [ "//starboard/build/config:size" ]
@@ -94,6 +94,7 @@
     "//cobalt/math",
     "//cobalt/render_tree",
     "//cobalt/render_tree:animations",
+    "//cobalt/renderer:renderer_headers_only",
     "//cobalt/renderer/backend:renderer_backend",
     "//cobalt/renderer/backend/egl:egl_backend",
     "//cobalt/renderer/rasterizer/common",
diff --git a/cobalt/renderer/rasterizer/skia/BUILD.gn b/cobalt/renderer/rasterizer/skia/BUILD.gn
index 6e25617..11146df 100644
--- a/cobalt/renderer/rasterizer/skia/BUILD.gn
+++ b/cobalt/renderer/rasterizer/skia/BUILD.gn
@@ -80,6 +80,7 @@
 
   deps = [
     ":common",
+    "//cobalt/renderer:renderer_headers_only",
     "//cobalt/renderer/backend:renderer_backend",
     "//cobalt/renderer/backend/egl:egl_backend",
     "//cobalt/renderer/rasterizer/common",
diff --git a/cobalt/renderer/rasterizer/skia/skia/BUILD.gn b/cobalt/renderer/rasterizer/skia/skia/BUILD.gn
index 5d40158..6fac75a 100644
--- a/cobalt/renderer/rasterizer/skia/skia/BUILD.gn
+++ b/cobalt/renderer/rasterizer/skia/skia/BUILD.gn
@@ -39,7 +39,9 @@
 # without ASAN. This is done to avoid drastic slowdown in debug unit
 # tests.
 skia_common("skia_library_no_asan") {
+  check_includes = false
   sources = skia_effects_imagefilter_sources_no_asan
+
   # TODO(b/207398024): If this is a target we need to build, then we'll
   # need to rework the configuration framework to be able to remove this
   # flag -fsanitize=address, as it's mostly added in the
@@ -69,10 +71,12 @@
     "//third_party/skia/include/private",
     "//third_party/skia/include/utils",
   ]
+
+  defines = [ "SK_BUILD_NO_OPTS" ]
 }
 
 skia_common("skia_library") {
-  sources = shared_sources + sksl_sources
+  sources = combined_sources + sksl_sources
 
   configs = [
     ":skia_library_config",
@@ -131,6 +135,7 @@
     "//base",
     "//cobalt/base",
     "//cobalt/configuration:configuration",
+    "//cobalt/renderer:renderer_headers_only",
     "//starboard:starboard_headers_only",
     "//starboard/common",
     "//third_party/freetype2",
diff --git a/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni b/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni
index 5a852b7..40b3a97 100644
--- a/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni
+++ b/cobalt/renderer/rasterizer/skia/skia/skia_sources.gni
@@ -56,15 +56,12 @@
 combined_sources += shared_sources
 combined_sources += skia_core_sources
 
-combined_sources += skia_pathops_sources
-combined_sources += skia_skpicture_sources
 combined_sources += skia_effects_sources
 combined_sources += skia_effects_imagefilter_sources
 
 # from "gpu.gni"
 combined_sources += skia_gpu_sources
-combined_sources += skia_ccpr_sources
-combined_sources += skia_nvpr_sources
+
 combined_sources += skia_utils_sources
 combined_sources += skia_skottie_sources
 combined_sources += skia_sksg_sources
diff --git a/cobalt/renderer/rasterizer/skia/skia/skia_template.gni b/cobalt/renderer/rasterizer/skia/skia/skia_template.gni
index a90d942..516cb32 100644
--- a/cobalt/renderer/rasterizer/skia/skia/skia_template.gni
+++ b/cobalt/renderer/rasterizer/skia/skia/skia_template.gni
@@ -16,20 +16,20 @@
 # Skia build.
 
 template("skia_common") {
+  # This list will contain all defines that also need to be exported to
+  # dependent components.
+  skia_export_defines = [
+    "SK_DISABLE_EFFECT_DESERIALIZATION=1",
+    "SK_SUPPORT_GPU=1",
+    "SK_USER_CONFIG_HEADER=\"cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h\"",
+  ]
+
   if (target_os == "win") {
-    skia_export_defines = [
+    skia_export_defines += [
       # Required define by Skia to take certain code paths, such
       # as including windows.h in various places.
       "SK_BUILD_FOR_WIN32",
     ]
-  } else {
-    # This list will contain all defines that also need to be exported to
-    # dependent components.
-    skia_export_defines = [
-      "SK_DISABLE_EFFECT_DESERIALIZATION=1",
-      "SK_SUPPORT_GPU=1",
-      "SK_USER_CONFIG_HEADER=\"cobalt/renderer/rasterizer/skia/skia/config/SkUserConfig.h\"",
-    ]
   }
 
   # The |default_font_cache_limit| specifies the max size of the glyph cache,
diff --git a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.cc b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.cc
index 6862a5e..00ffc9c 100644
--- a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.cc
+++ b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.cc
@@ -80,8 +80,7 @@
       manager_owned_mutex_(manager_owned_mutex),
       is_fallback_family_(family_info.is_fallback_family),
       language_(family_info.language),
-      page_ranges_(family_info.page_ranges),
-      is_character_map_generated_(!is_fallback_family_) {
+      page_ranges_(family_info.page_ranges) {
   TRACE_EVENT0("cobalt::renderer",
                "SkFontStyleSet_Cobalt::SkFontStyleSet_Cobalt()");
   DCHECK(manager_owned_mutex_);
@@ -90,7 +89,6 @@
     return;
   }
 
-  character_map_ = base::MakeRefCounted<font_character_map::CharacterMap>();
   disable_character_map_ = family_info.disable_caching;
 
   family_name_ = family_info.names[0];
@@ -232,7 +230,7 @@
   SkFontStyleSetEntry_Cobalt* style = styles_[style_index].get();
   // If the typeface doesn't already exist, then attempt to create it.
   if (style->typeface == NULL) {
-    CreateStreamProviderTypeface(style);
+    CreateStreamProviderTypeface(style, style_index);
     // If the creation attempt failed and the typeface is still NULL, then
     // remove the entry from the set's styles.
     if (style->typeface == NULL) {
@@ -286,7 +284,8 @@
 
   // The character map is lazily generated. Generate it now if it isn't already
   // generated.
-  if (!is_character_map_generated_) {
+  int style_index = GetClosestStyleIndex(style);
+  if (!character_maps_[style_index]) {
     TRACE_EVENT0("cobalt::renderer",
                  "SkFontStyleSet_Cobalt::ContainsCharacter() and "
                  "!is_character_map_generated_");
@@ -294,7 +293,6 @@
     // it will be removed from the set and, as long as font styles remain in the
     // set, the logic will be attempted again.
     while (styles_.count() > 0) {
-      int style_index = GetClosestStyleIndex(style);
       SkFontStyleSetEntry_Cobalt* closest_style = styles_[style_index].get();
 
       SkFileMemoryChunkStreamProvider* stream_provider =
@@ -310,9 +308,11 @@
 
       std::unique_ptr<SkFileMemoryChunkStream> stream(
           stream_provider->OpenStream());
-      if (GenerateStyleFaceInfo(closest_style, stream.get())) {
-        if (CharacterMapContainsCharacter(character)) {
-          CreateStreamProviderTypeface(closest_style, stream_provider);
+      if (GenerateStyleFaceInfo(closest_style, stream.get(), style_index)) {
+        if (CharacterMapContainsCharacter(character,
+                                          character_maps_[style_index])) {
+          CreateStreamProviderTypeface(closest_style, style_index,
+                                       stream_provider);
           return true;
         } else {
           // If a typeface was not created, destroy the stream and purge any
@@ -328,28 +328,34 @@
       styles_[style_index].swap(styles_.back());
       styles_.pop_back();
     }
-
-    is_character_map_generated_ = true;
   }
 
-  return CharacterMapContainsCharacter(character);
+  DCHECK(character_maps_[style_index]);
+  return CharacterMapContainsCharacter(character, character_maps_[style_index]);
 }
 
-bool SkFontStyleSet_Cobalt::CharacterMapContainsCharacter(SkUnichar character) {
-  font_character_map::Character c = character_map_->Find(character);
+bool SkFontStyleSet_Cobalt::CharacterMapContainsCharacter(
+    SkUnichar character,
+    const scoped_refptr<font_character_map::CharacterMap>& map) {
+  font_character_map::Character c = map->Find(character);
   return c.is_set && c.id > 0;
 }
 
 bool SkFontStyleSet_Cobalt::GenerateStyleFaceInfo(
-    SkFontStyleSetEntry_Cobalt* style, SkStreamAsset* stream) {
+    SkFontStyleSetEntry_Cobalt* style, SkStreamAsset* stream, int style_index) {
   if (style->is_face_info_generated) {
     return true;
   }
 
   // Providing a pointer to the character map will cause it to be generated
   // during ScanFont. Only provide it if it hasn't already been generated.
-  font_character_map::CharacterMap* character_map =
-      !is_character_map_generated_ ? character_map_.get() : NULL;
+
+  font_character_map::CharacterMap* character_map = NULL;
+  if (!character_maps_[style_index]) {
+    character_maps_[style_index] =
+        base::MakeRefCounted<font_character_map::CharacterMap>();
+    character_map = character_maps_[style_index].get();
+  }
 
   if (!sk_freetype_cobalt::ScanFont(
           stream, style->face_index, &style->face_name, &style->font_style,
@@ -358,7 +364,6 @@
   }
 
   style->is_face_info_generated = true;
-  is_character_map_generated_ = true;
   return true;
 }
 
@@ -376,7 +381,7 @@
 }
 
 void SkFontStyleSet_Cobalt::CreateStreamProviderTypeface(
-    SkFontStyleSetEntry_Cobalt* style_entry,
+    SkFontStyleSetEntry_Cobalt* style_entry, int style_index,
     SkFileMemoryChunkStreamProvider* stream_provider /*=NULL*/) {
   TRACE_EVENT0("cobalt::renderer",
                "SkFontStyleSet_Cobalt::CreateStreamProviderTypeface()");
@@ -388,13 +393,13 @@
 
   std::unique_ptr<SkFileMemoryChunkStream> stream(
       stream_provider->OpenStream());
-  if (GenerateStyleFaceInfo(style_entry, stream.get())) {
+  if (GenerateStyleFaceInfo(style_entry, stream.get(), style_index)) {
     LOG(INFO) << "Scanned font from file: " << style_entry->face_name.c_str()
               << "(" << style_entry->font_style.weight() << ", "
               << style_entry->font_style.width() << ", "
               << style_entry->font_style.slant() << ")";
     scoped_refptr<font_character_map::CharacterMap> map =
-        disable_character_map_ ? NULL : character_map_;
+        disable_character_map_ ? NULL : character_maps_[style_index];
     style_entry->typeface.reset(new SkTypeface_CobaltStreamProvider(
         stream_provider, style_entry->face_index, style_entry->font_style,
         style_entry->face_is_fixed_pitch, family_name_,
diff --git a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.h b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.h
index 774a90f..fb5d6d0 100644
--- a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.h
+++ b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontStyleSet_cobalt.h
@@ -16,6 +16,7 @@
 #define COBALT_RENDERER_RASTERIZER_SKIA_SKIA_SRC_PORTS_SKFONTSTYLESET_COBALT_H_
 
 #include <string>
+#include <unordered_map>
 
 #include "SkFontMgr.h"
 #include "SkStream.h"
@@ -113,14 +114,16 @@
   bool ContainsTypeface(const SkTypeface* typeface);
 
   bool ContainsCharacter(const SkFontStyle& style, SkUnichar character);
-  bool CharacterMapContainsCharacter(SkUnichar character);
+  bool CharacterMapContainsCharacter(
+      SkUnichar character,
+      const scoped_refptr<font_character_map::CharacterMap>& map);
 
   bool GenerateStyleFaceInfo(SkFontStyleSetEntry_Cobalt* style,
-                             SkStreamAsset* stream);
+                             SkStreamAsset* stream, int style_index);
 
   int GetClosestStyleIndex(const SkFontStyle& pattern);
   void CreateStreamProviderTypeface(
-      SkFontStyleSetEntry_Cobalt* style,
+      SkFontStyleSetEntry_Cobalt* style, int style_index,
       SkFileMemoryChunkStreamProvider* stream_provider = NULL);
 
   // Purge typefaces that are only referenced internally.
@@ -139,8 +142,10 @@
   bool disable_character_map_;
 
   // NOTE: The following characters require locking when being accessed.
-  bool is_character_map_generated_;
-  scoped_refptr<font_character_map::CharacterMap> character_map_;
+  // This map will store one map per style, and can be indexed with the
+  // style_index of each style.
+  std::unordered_map<int, scoped_refptr<font_character_map::CharacterMap>>
+      character_maps_;
 
   SkTArray<sk_sp<SkFontStyleSetEntry_Cobalt>, true> styles_;
 
diff --git a/cobalt/renderer/test/jpeg_utils/BUILD.gn b/cobalt/renderer/test/jpeg_utils/BUILD.gn
new file mode 100644
index 0000000..da714b7
--- /dev/null
+++ b/cobalt/renderer/test/jpeg_utils/BUILD.gn
@@ -0,0 +1,25 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("jpeg_utils") {
+  sources = [
+    "jpeg_encode.cc",
+    "jpeg_encode.h",
+  ]
+
+  deps = [
+    "//base",
+    "//third_party/libjpeg-turbo:libjpeg",
+  ]
+}
diff --git a/cobalt/speech/BUILD.gn b/cobalt/speech/BUILD.gn
index 0b1f177..b072bc4 100644
--- a/cobalt/speech/BUILD.gn
+++ b/cobalt/speech/BUILD.gn
@@ -42,6 +42,9 @@
 static_library("speech") {
   has_pedantic_warnings = true
 
+  # Creates cycle with //cobalt/dom
+  check_includes = false
+
   sources = [
     "audio_encoder_flac.cc",
     "audio_encoder_flac.h",
@@ -96,6 +99,8 @@
 
   deps = [
     "//cobalt/base",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/loader",
     "//cobalt/media",
     "//cobalt/network",
     "//cobalt/script",
diff --git a/cobalt/subtlecrypto/BUILD.gn b/cobalt/subtlecrypto/BUILD.gn
index e047acd..7097523 100644
--- a/cobalt/subtlecrypto/BUILD.gn
+++ b/cobalt/subtlecrypto/BUILD.gn
@@ -39,6 +39,8 @@
     ":crypto_impl",
     "//cobalt/base",
     "//cobalt/browser:generated_types",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
     "//cobalt/script",
     "//cobalt/script:engine",
   ]
diff --git a/cobalt/test/BUILD.gn b/cobalt/test/BUILD.gn
index eb22794..9b8f32a 100644
--- a/cobalt/test/BUILD.gn
+++ b/cobalt/test/BUILD.gn
@@ -15,8 +15,8 @@
 static_library("run_all_unittests") {
   testonly = true
   sources = [ "run_all_unittests.cc" ]
+  public_deps = [ "//base/test:test_support" ]
   deps = [
-    "//base/test:test_support",
     "//cobalt/base",
     "//testing/gtest",
   ]
diff --git a/cobalt/updater/updater_module.cc b/cobalt/updater/updater_module.cc
index 2cf09b5..e2e4001 100644
--- a/cobalt/updater/updater_module.cc
+++ b/cobalt/updater/updater_module.cc
@@ -67,12 +67,21 @@
       return kCobaltExtensionUpdaterNotificationStateDownloaded;
     case ComponentState::kUpdating:
       return kCobaltExtensionUpdaterNotificationStateInstalling;
+#if SB_API_VERSION > 13
+    case ComponentState::kUpdated:
+      return kCobaltExtensionUpdaterNotificationStateUpdated;
+    case ComponentState::kUpToDate:
+      return kCobaltExtensionUpdaterNotificationStateUpToDate;
+    case ComponentState::kUpdateError:
+      return kCobaltExtensionUpdaterNotificationStateUpdateFailed;
+#else
     case ComponentState::kUpdated:
       return kCobaltExtensionUpdaterNotificationStatekUpdated;
     case ComponentState::kUpToDate:
-      return kCobaltExtensionUpdaterNotificationStatekUpdated;
+      return kCobaltExtensionUpdaterNotificationStatekUpToDate;
     case ComponentState::kUpdateError:
       return kCobaltExtensionUpdaterNotificationStatekUpdateFailed;
+#endif
     default:
       return kCobaltExtensionUpdaterNotificationStateNone;
   }
diff --git a/cobalt/version.h b/cobalt/version.h
index 85eae78..18d66ee 100644
--- a/cobalt/version.h
+++ b/cobalt/version.h
@@ -35,6 +35,6 @@
 //                  release is cut.
 //.
 
-#define COBALT_VERSION "22.master.0"
+#define COBALT_VERSION "23.master.0"
 
 #endif  // COBALT_VERSION_H_
diff --git a/cobalt/web_animations/BUILD.gn b/cobalt/web_animations/BUILD.gn
new file mode 100644
index 0000000..81ee087
--- /dev/null
+++ b/cobalt/web_animations/BUILD.gn
@@ -0,0 +1,62 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("web_animations") {
+  has_pedantic_warnings = true
+  sources = [
+    "animatable.h",
+    "animation.cc",
+    "animation.h",
+    "animation_effect_read_only.h",
+    "animation_effect_timing_read_only.cc",
+    "animation_effect_timing_read_only.h",
+    "animation_set.cc",
+    "animation_set.h",
+    "animation_timeline.cc",
+    "animation_timeline.h",
+    "baked_animation_set.cc",
+    "baked_animation_set.h",
+    "keyframe.h",
+    "keyframe_effect_read_only.cc",
+    "keyframe_effect_read_only.h",
+    "timed_task_queue.cc",
+    "timed_task_queue.h",
+  ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/cssom",
+    "//cobalt/script",
+  ]
+}
+
+target(gtest_target_type, "web_animations_test") {
+  testonly = true
+  has_pedantic_warnings = true
+
+  sources = [
+    "animation_effect_timing_read_only_test.cc",
+    "animation_test.cc",
+    "keyframe_effect_read_only_test.cc",
+  ]
+
+  deps = [
+    ":web_animations",
+    "//cobalt/css_parser",
+    "//cobalt/cssom",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gtest",
+  ]
+}
diff --git a/cobalt/webdriver/BUILD.gn b/cobalt/webdriver/BUILD.gn
new file mode 100644
index 0000000..1b35d40
--- /dev/null
+++ b/cobalt/webdriver/BUILD.gn
@@ -0,0 +1,117 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+config("webdriver_public_config") {
+  defines = [ "ENABLE_WEBDRIVER" ]
+}
+
+static_library("webdriver") {
+  configs -= [ "//starboard/build/config:size" ]
+  configs += [ "//starboard/build/config:speed" ]
+
+  deps = [
+    "//base",
+    "//base:i18n",
+    "//cobalt/base",
+    "//cobalt/cssom",
+    "//cobalt/dom",
+    "//cobalt/loader",
+    "//cobalt/math",
+    "//cobalt/script",
+    "//net",
+    "//net:http_server",
+    "//third_party/icu:icuuc",
+    "//url",
+  ]
+  if (is_gold) {
+    sources = [ "stub_web_driver_module.cc" ]
+  } else {
+    sources = [
+      "algorithms.cc",
+      "algorithms.h",
+      "dispatcher.cc",
+      "dispatcher.h",
+      "element_driver.cc",
+      "element_driver.h",
+      "keyboard.cc",
+      "keyboard.h",
+      "protocol/button.cc",
+      "protocol/button.h",
+      "protocol/capabilities.cc",
+      "protocol/capabilities.h",
+      "protocol/cookie.cc",
+      "protocol/cookie.h",
+      "protocol/element_id.cc",
+      "protocol/element_id.h",
+      "protocol/frame_id.cc",
+      "protocol/frame_id.h",
+      "protocol/keys.cc",
+      "protocol/keys.h",
+      "protocol/location.cc",
+      "protocol/location.h",
+      "protocol/log_entry.cc",
+      "protocol/log_entry.h",
+      "protocol/log_type.cc",
+      "protocol/log_type.h",
+      "protocol/moveto.cc",
+      "protocol/moveto.h",
+      "protocol/proxy.cc",
+      "protocol/proxy.h",
+      "protocol/rect.cc",
+      "protocol/rect.h",
+      "protocol/response.cc",
+      "protocol/response.h",
+      "protocol/script.cc",
+      "protocol/script.h",
+      "protocol/search_strategy.cc",
+      "protocol/search_strategy.h",
+      "protocol/server_status.cc",
+      "protocol/server_status.h",
+      "protocol/session_id.h",
+      "protocol/size.cc",
+      "protocol/size.h",
+      "protocol/window_id.cc",
+      "protocol/window_id.h",
+      "screencast/screencast_module.cc",
+      "screencast/screencast_module.h",
+      "screenshot.cc",
+      "screenshot.h",
+      "script_executor.cc",
+      "script_executor.h",
+      "script_executor_params.cc",
+      "script_executor_params.h",
+      "script_executor_result.h",
+      "search.cc",
+      "search.h",
+      "server.cc",
+      "server.h",
+      "session_driver.cc",
+      "session_driver.h",
+      "web_driver_module.cc",
+      "web_driver_module.h",
+      "window_driver.cc",
+      "window_driver.h",
+    ]
+    deps += [ ":copy_webdriver_data" ]
+    public_configs = [ ":webdriver_public_config" ]
+  }
+}
+
+# TODO: This declares content_deploy_subdirs which should be migrated for
+#       install targets.
+copy("copy_webdriver_data") {
+  sources = [ "content/webdriver-init.js" ]
+  outputs =
+      [ "$sb_static_contents_output_data_dir/webdriver/webdriver-init.js" ]
+}
diff --git a/cobalt/websocket/BUILD.gn b/cobalt/websocket/BUILD.gn
new file mode 100644
index 0000000..e50677e
--- /dev/null
+++ b/cobalt/websocket/BUILD.gn
@@ -0,0 +1,72 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("websocket") {
+  has_pedantic_warnings = true
+
+  sources = [
+    "buffered_amount_tracker.cc",
+    "buffered_amount_tracker.h",
+    "close_event.h",
+    "cobalt_web_socket_event_handler.cc",
+    "cobalt_web_socket_event_handler.h",
+    "sec_web_socket_key.h",
+    "web_socket.cc",
+    "web_socket.h",
+    "web_socket_impl.cc",
+    "web_socket_impl.h",
+  ]
+  deps = [
+    "//cobalt/base",
+    "//cobalt/browser:generated_type_conversion",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/network",
+    "//cobalt/script",
+    "//net",
+    "//starboard",
+    "//third_party/protobuf:protobuf_lite",
+    "//url",
+  ]
+}
+
+target(gtest_target_type, "websocket_test") {
+  testonly = true
+  has_pedantic_warnings = true
+  sources = [
+    "mock_websocket_channel.cc",
+    "web_socket_impl_test.cc",
+    "web_socket_test.cc",
+  ]
+  deps = [
+    ":websocket",
+    "//cobalt/base",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/network",
+    "//cobalt/script",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gtest",
+    "//url",
+
+    # TODO: Remove the dependency below, it works around the fact that
+    #       ScriptValueFactory has non-virtual method CreatePromise().
+    "//cobalt/script:engine",
+  ]
+
+  if (!is_gold) {
+    deps += [ "//cobalt/debug" ]
+  }
+}
diff --git a/cobalt/xhr/BUILD.gn b/cobalt/xhr/BUILD.gn
new file mode 100644
index 0000000..fd7f33c
--- /dev/null
+++ b/cobalt/xhr/BUILD.gn
@@ -0,0 +1,64 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("xhr") {
+  has_pedantic_warnings = true
+  sources = [
+    "url_fetcher_buffer_writer.cc",
+    "url_fetcher_buffer_writer.h",
+    "xml_http_request.cc",
+    "xml_http_request.h",
+    "xml_http_request_event_target.cc",
+    "xml_http_request_event_target.h",
+  ]
+
+  deps = [
+    "//cobalt/base",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/dom_parser",
+    "//cobalt/loader",
+    "//cobalt/script",
+    "//nb",
+    "//net",
+    "//starboard",
+    "//third_party/protobuf:protobuf_lite",
+    "//url",
+  ]
+
+  if (enable_xhr_header_filtering && !sb_is_evergreen) {
+    sources = [ "xhr_modify_headers.h" ]
+    defines = [ "COBALT_ENABLE_XHR_HEADER_FILTERING" ]
+    deps += [ cobalt_platform_dependencies ]
+  }
+}
+
+target(gtest_target_type, "xhr_test") {
+  testonly = true
+  has_pedantic_warnings = true
+  sources = [ "xml_http_request_test.cc" ]
+  deps = [
+    ":xhr",
+    "//cobalt/base",
+    "//cobalt/dom",
+    "//cobalt/dom:dom_exception",
+    "//cobalt/test:run_all_unittests",
+    "//testing/gmock",
+    "//testing/gtest",
+
+    # TODO: Remove the dependency below, it works around the fact that
+    #       ScriptValueFactory has non-virtual method CreatePromise().
+    "//cobalt/script:engine",
+  ]
+}
diff --git a/codereview.settings b/codereview.settings
deleted file mode 100644
index 1950c32..0000000
--- a/codereview.settings
+++ /dev/null
@@ -1,3 +0,0 @@
-GERRIT_HOST: cobalt-review.googlesource.com
-GERRIT_AUTODETECT_BRANCH: true
-CODE_REVIEW_SERVER: cobalt-review.googlesource.com
diff --git a/components/prefs/BUILD.gn b/components/prefs/BUILD.gn
new file mode 100644
index 0000000..29f20c7
--- /dev/null
+++ b/components/prefs/BUILD.gn
@@ -0,0 +1,91 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+config("prefs_config") {
+  defines = [ "COMPONENTS_PREFS_IMPLEMENTATION" ]
+}
+
+static_library("prefs") {
+  sources = [
+    "command_line_pref_store.cc",
+    "command_line_pref_store.h",
+    "default_pref_store.cc",
+    "default_pref_store.h",
+    "in_memory_pref_store.cc",
+    "in_memory_pref_store.h",
+    "json_pref_store.cc",
+    "json_pref_store.h",
+    "overlay_user_pref_store.cc",
+    "overlay_user_pref_store.h",
+    "persistent_pref_store.cc",
+    "persistent_pref_store.h",
+    "pref_change_registrar.cc",
+    "pref_change_registrar.h",
+    "pref_filter.h",
+    "pref_member.cc",
+    "pref_member.h",
+    "pref_notifier.h",
+    "pref_notifier_impl.cc",
+    "pref_notifier_impl.h",
+    "pref_observer.h",
+    "pref_registry.cc",
+    "pref_registry.h",
+    "pref_registry_simple.cc",
+    "pref_registry_simple.h",
+    "pref_service.cc",
+    "pref_service.h",
+    "pref_service_factory.cc",
+    "pref_service_factory.h",
+    "pref_store.cc",
+    "pref_store.h",
+    "pref_value_map.cc",
+    "pref_value_map.h",
+    "pref_value_store.cc",
+    "pref_value_store.h",
+    "prefs_export.h",
+    "scoped_user_pref_update.cc",
+    "scoped_user_pref_update.h",
+    "value_map_pref_store.cc",
+    "value_map_pref_store.h",
+    "writeable_pref_store.cc",
+    "writeable_pref_store.h",
+  ]
+
+  configs += [ ":prefs_config" ]
+
+  deps = [
+    "//base",
+    "//base/util/values:values_util",
+  ]
+}
+
+source_set("test_support") {
+  testonly = true
+  sources = [
+    "mock_pref_change_callback.cc",
+    "mock_pref_change_callback.h",
+    "pref_store_observer_mock.cc",
+    "pref_store_observer_mock.h",
+    "testing_pref_service.cc",
+    "testing_pref_service.h",
+    "testing_pref_store.cc",
+    "testing_pref_store.h",
+  ]
+  public_deps = [ ":prefs" ]
+  deps = [
+    "//base",
+    "//testing/gmock",
+    "//testing/gtest",
+  ]
+}
diff --git a/components/update_client/component.cc b/components/update_client/component.cc
index d9158fc..8b4fa5d 100644
--- a/components/update_client/component.cc
+++ b/components/update_client/component.cc
@@ -333,6 +333,7 @@
 #if defined(STARBOARD)
 void Component::Cancel() {
   DCHECK(thread_checker_.CalledOnValidThread());
+  is_cancelled_ = true;
   state_->Cancel();
 }
 #endif
@@ -447,7 +448,16 @@
 
 void Component::NotifyObservers(UpdateClient::Observer::Events event) const {
   DCHECK(thread_checker_.CalledOnValidThread());
+
+#if defined(STARBOARD)
+  if (!is_cancelled_) {
+    update_context_.notify_observers_callback.Run(event, id_);
+  } else {
+    LOG(WARNING) << "Component::NotifyObservers: skip callback";
+  }
+#else
   update_context_.notify_observers_callback.Run(event, id_);
+#endif
 }
 
 base::TimeDelta Component::GetUpdateDuration() const {
@@ -1023,7 +1033,6 @@
   const auto& update_context = component.update_context_;
 
   DCHECK(component.crx_component());
-
   component.NotifyObservers(Events::COMPONENT_UPDATE_READY);
 
   base::CreateSequencedTaskRunnerWithTraits(kTaskTraits)
@@ -1043,6 +1052,7 @@
                      component.crx_component()->crx_format_requirement,
                      base::BindOnce(&Component::StateUpdating::InstallComplete,
                                     base::Unretained(this))));
+
 }
 
 void Component::StateUpdating::InstallComplete(ErrorCategory error_category,
diff --git a/components/update_client/component.h b/components/update_client/component.h
index 83b8a35..4944204 100644
--- a/components/update_client/component.h
+++ b/components/update_client/component.h
@@ -133,6 +133,9 @@
   std::vector<base::Value> GetEvents() const;
 
  private:
+#if defined(STARBOARD)
+  bool is_cancelled_ = false;
+#endif
   friend class MockPingManagerImpl;
   friend class UpdateCheckerTest;
 
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index 9e39a0f..2dbfb0f 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -200,6 +200,13 @@
     return;
   }
 
+#if defined(STARBOARD)
+  if (is_cancelled_) {
+    LOG(WARNING) << "UpdateEngine::ComponentCheckingForUpdatesStart cancelled";
+    return;
+  }
+#endif
+
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::BindOnce(&UpdateEngine::DoUpdateCheck,
                                 base::Unretained(this), update_context));
@@ -379,8 +386,16 @@
         next_update_delay);
     next_update_delay = base::TimeDelta();
 
-    notify_observers_callback_.Run(
+#if defined(STARBOARD)
+  if (!is_cancelled_) {
+    notify_observers_callback_.Run(UpdateClient::Observer::Events::COMPONENT_WAIT, id);
+  } else {
+    LOG(WARNING) << "UpdateEngine::HandleComponent skip NotifyObservers";
+  }
+#else
+  notify_observers_callback_.Run(
         UpdateClient::Observer::Events::COMPONENT_WAIT, id);
+#endif
     return;
   }
 
@@ -409,8 +424,18 @@
     update_context->next_update_delay = component->GetUpdateDuration();
 
     if (!component->events().empty()) {
+#if defined(STARBOARD)
+      if (!is_cancelled_) {
+        ping_manager_->SendPing(*component,
+                                  base::BindOnce([](int, const std::string&) {}));
+
+      } else {
+        LOG(WARNING) << "UpdateEngine::HandleComponentComplete skip SendPing";
+      }
+#else
       ping_manager_->SendPing(*component,
                               base::BindOnce([](int, const std::string&) {}));
+#endif
     }
 
     queue.pop();
@@ -475,7 +500,7 @@
 void UpdateEngine::Cancel(const std::string& update_context_session_id,
                           const std::vector<std::string>& crx_component_ids) {
   LOG(INFO) << "UpdateEngine::Cancel";
-
+  is_cancelled_ = true;
   if (ping_manager_.get()) {
     ping_manager_->Cancel();
   }
diff --git a/components/update_client/update_engine.h b/components/update_client/update_engine.h
index 1cd0ac9..1bf1cd7 100644
--- a/components/update_client/update_engine.h
+++ b/components/update_client/update_engine.h
@@ -134,6 +134,9 @@
   // update protocol. See the comments for X-Retry-After header.
   base::TimeTicks throttle_updates_until_;
 
+#if defined(STARBOARD)
+  bool is_cancelled_ = false;
+#endif
   DISALLOW_COPY_AND_ASSIGN(UpdateEngine);
 };
 
diff --git a/components/update_client/url_fetcher_downloader.cc b/components/update_client/url_fetcher_downloader.cc
index b5c13cc..4536da6 100644
--- a/components/update_client/url_fetcher_downloader.cc
+++ b/components/update_client/url_fetcher_downloader.cc
@@ -92,6 +92,11 @@
 #if defined(STARBOARD)
 void UrlFetcherDownloader::ConfirmSlot(const GURL& url) {
   LOG(INFO) << "UrlFetcherDownloader::ConfirmSlot: url=" << url;
+  if (is_cancelled_) {
+    LOG(ERROR) << "UrlFetcherDownloader::ConfirmSlot: Download already cancelled";
+    ReportDownloadFailure(url);
+    return;
+  }
   if (!cobalt_slot_management_.ConfirmSlot(download_dir_)) {
     ReportDownloadFailure(url, CrxDownloaderError::SLOT_UNAVAILABLE);
     return;
@@ -104,6 +109,11 @@
 
 void UrlFetcherDownloader::SelectSlot(const GURL& url) {
   LOG(INFO) << "UrlFetcherDownloader::SelectSlot: url=" << url;
+  if (is_cancelled_) {
+    LOG(ERROR) << "UrlFetcherDownloader::SelectSlot: Download already cancelled";
+    ReportDownloadFailure(url);
+    return;
+  }
   if (!cobalt_slot_management_.SelectSlot(&download_dir_)) {
     ReportDownloadFailure(url, CrxDownloaderError::SLOT_UNAVAILABLE);
     return;
@@ -125,7 +135,11 @@
 
 #if defined(STARBOARD)
   LOG(INFO) << "UrlFetcherDownloader::DoStartDownload";
-
+  if (is_cancelled_) {
+    LOG(ERROR) << "UrlFetcherDownloader::DoStartDownload: Download already cancelled";
+    ReportDownloadFailure(url);
+    return;
+  }
   const CobaltExtensionInstallationManagerApi* installation_api =
       static_cast<const CobaltExtensionInstallationManagerApi*>(
           SbSystemGetExtension(kCobaltExtensionInstallationManagerName));
@@ -155,6 +169,7 @@
 void UrlFetcherDownloader::DoCancelDownload() {
   LOG(INFO) << "UrlFetcherDownloader::DoCancelDownload";
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  is_cancelled_ = true;
   if (network_fetcher_.get()) {
     network_fetcher_->Cancel();
   }
@@ -208,6 +223,11 @@
 #if defined(STARBOARD)
   LOG(INFO) << "UrlFetcherDownloader::StartURLFetch: url" << url
                << " download_dir=" << download_dir_;
+  if (is_cancelled_) {
+    LOG(ERROR) << "UrlFetcherDownloader::StartURLFetch: Download already cancelled";
+    ReportDownloadFailure(url);
+    return;
+  }
 #endif
 
   if (download_dir_.empty()) {
diff --git a/components/update_client/url_fetcher_downloader.h b/components/update_client/url_fetcher_downloader.h
index 3880efc..3adc4c2 100644
--- a/components/update_client/url_fetcher_downloader.h
+++ b/components/update_client/url_fetcher_downloader.h
@@ -82,6 +82,7 @@
 #if defined(STARBOARD)
   CobaltSlotManagement cobalt_slot_management_;
   scoped_refptr<Configurator> config_;
+  bool is_cancelled_ = false;
 #endif
 
   DISALLOW_COPY_AND_ASSIGN(UrlFetcherDownloader);
diff --git a/docker-compose.yml b/docker-compose.yml
index f7e6011..075e283 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -17,7 +17,6 @@
 volumes:
   android-debug-keystore:
   container-ccache:
-  container-starboard-toolchains:
 
 x-common-definitions: &common-definitions
   stdin_open: true
@@ -28,7 +27,6 @@
     - ${COBALT_SRC:-.}:/code/
     - android-debug-keystore:/root/.android/
     - ${CCACHE_DIR:-container-ccache}:/root/ccache
-    - ${STARBOARD_TOOLCHAINS_DIR:-container-starboard-toolchains}:/root/starboard-toolchains
 
 x-build-common-definitions: &build-common-definitions
   <<: *common-definitions
@@ -78,6 +76,9 @@
     build:
       context: ./docker/linux
       dockerfile: base/build/Dockerfile
+      args:
+        # Should match version pinned by Starboard
+        - CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
     image: cobalt-build-base
     depends_on:
       - base
@@ -89,6 +90,7 @@
       dockerfile: base/build/Dockerfile
       args:
         - FROM_IMAGE=base-bionic
+        - CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
     image: build-base-bionic
     depends_on:
       - base-bionic
@@ -184,16 +186,6 @@
     depends_on:
       - linux-x64x11-bionic
 
-  linux-x64x11-clang-3-9-prebuilt:
-    <<: *common-definitions
-    <<: *build-volumes
-    image: gcr.io/cobalt-tools/build-cobalt-linux-x64x11-clang-3-9:1.4
-    environment:
-      <<: *shared-build-env
-      PLATFORM: linux-x64x11-clang-3-9
-      CONFIG: ${CONFIG:-debug}
-      USE_CCACHE: ${USE_CCACHE:-1}
-
   # Define common build container for Android
   build-android:
     <<: *build-common-definitions
@@ -304,6 +296,7 @@
       context: ./docker/linux
       dockerfile: evergreen/Dockerfile
     image: cobalt-build-evergreen
+    depends_on: [ build-base ]
     environment:
       <<: *shared-build-env
 
diff --git a/docker/linux/android/Dockerfile b/docker/linux/android/Dockerfile
index 535b10d..12e5b53 100644
--- a/docker/linux/android/Dockerfile
+++ b/docker/linux/android/Dockerfile
@@ -32,5 +32,28 @@
             -keysize 2048 \
             -validity 10000
 
+# Install Android SDK and NDK
+ARG TOOLS=commandlinetools-linux-6200805_latest.zip
+ARG CMDLINE_URL=https://dl.google.com/android/repository/${TOOLS}
+ENV ANDROID_SDK_ROOT=/root/starboard-toolchains/AndroidSdk/
+
+RUN cd /tmp \
+  && mkdir -p ${ANDROID_SDK_ROOT} \
+  && curl --silent -O -J  ${CMDLINE_URL} \
+  && unzip ${TOOLS} -d ${ANDROID_SDK_ROOT} \
+  && rm ${TOOLS} \
+  && echo yes | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
+      --sdk_root=${ANDROID_SDK_ROOT} \
+    "build-tools;30.0.0" \
+    "cmake;3.10.2.4988404" \
+    "cmdline-tools;1.0" \
+    "extras;android;m2repository" \
+    "extras;google;m2repository" \
+    "ndk;21.1.6352462" \
+    "patcher;v4" \
+    "platforms;android-30" \
+    "platform-tools" \
+  && echo "Android SDK installed"
+
 CMD /code/cobalt/build/gyp_cobalt -v -C ${CONFIG} ${PLATFORM} \
     && ninja -v -j ${NINJA_PARALLEL} -C ${OUTDIR}/${PLATFORM}_${CONFIG} ${TARGET:-cobalt_deploy}
diff --git a/docker/linux/base/build/Dockerfile b/docker/linux/base/build/Dockerfile
index 9a27bc2..1289fcb 100644
--- a/docker/linux/base/build/Dockerfile
+++ b/docker/linux/base/build/Dockerfile
@@ -17,6 +17,8 @@
 
 ARG gn_hash=vC0rxqiqGTD3ls9KJHrgJoWP2OBiPk_QEO_xbDItKYoC
 
+ARG HOME=/root
+
 # === Install common build tools, required by all platforms
 RUN apt update -qqy \
     && apt install -qqy --no-install-recommends \
@@ -31,7 +33,7 @@
 # === Get Nodejs pinned LTS version via NVM
 ARG NVM_SHA256SUM="f068e17dacb88f73302790cc076956c7a0d459ce9b01df842ff3e75744f9e2fe /tmp/install.sh"
 ARG NVM_URL="https://cobalt.googlesource.com/third_party/nvm/+/refs/tags/v0.35.3/install.sh?format=TEXT"
-ENV NVM_DIR /root/.nvm
+ENV NVM_DIR=${HOME}/.nvm
 ENV NODE_VERSION 12.17.0
 
 RUN curl --silent -o- ${NVM_URL} \
@@ -58,11 +60,26 @@
     NINJA_STATUS="[%e sec | %f/%t %u remaining | %c/sec | j%r] " \
     NINJA_PARALLEL=4 \
     IS_CI=0 \
-    CCACHE_DIR=/root/ccache \
+    CCACHE_DIR=${HOME}/ccache \
     CCACHE_MAXSIZE=30G
 
 # == Set up  ccache
-RUN cd /tmp && mkdir /root/ccache
+RUN cd /tmp && mkdir ${HOME}/ccache
+
+# === Install pinned host Clang toolchain for all Linux-hosted builds
+ARG CLANG_VER
+
+ARG TC_ROOT=${HOME}/starboard-toolchains/
+ARG TC_HOME=${TC_ROOT}/x86_64-linux-gnu-clang-chromium-${CLANG_VER}
+ARG BASE_URL=https://commondatastorage.googleapis.com/chromium-browser-clang
+
+RUN cd /tmp \
+    && mkdir -p ${TC_HOME} \
+    && curl --silent -O -J \
+        ${BASE_URL}/Linux_x64/clang-${CLANG_VER}.tgz \
+    && tar xf clang-${CLANG_VER}.tgz -C ${TC_HOME} \
+    && echo ${CLANG_VER} >> ${TC_HOME}/cr_build_revision \
+    && rm clang-${CLANG_VER}.tgz
 
 WORKDIR /code
 CMD ["/usr/bin/python","--version"]
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 2d2cb07..5ca254f 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1805,6 +1805,7 @@
 
 copy("net_unittest_files") {
   sources = [
+    "data/test.html",
     "data/cert_issuer_source_static_unittest/c1.pem",
     "data/cert_issuer_source_static_unittest/c2.pem",
     "data/cert_issuer_source_static_unittest/d.pem",
@@ -1848,6 +1849,23 @@
     "data/cert_net_fetcher_impl_unittest/redirect_https.mock-http-headers",
     "data/cert_net_fetcher_impl_unittest/root.crl",
     "data/cert_net_fetcher_impl_unittest/root.crl.mock-http-headers",
+    "data/certificate_policies_unittest/anypolicy.pem",
+    "data/certificate_policies_unittest/anypolicy_with_qualifier.pem",
+    "data/certificate_policies_unittest/generate_policies.py",
+    "data/certificate_policies_unittest/invalid-anypolicy_with_custom_qualifier.pem",
+    "data/certificate_policies_unittest/invalid-empty.pem",
+    "data/certificate_policies_unittest/invalid-policy_1_2_3_dupe.pem",
+    "data/certificate_policies_unittest/invalid-policy_1_2_3_policyinformation_unconsumed_data.pem",
+    "data/certificate_policies_unittest/invalid-policy_1_2_3_policyqualifierinfo_unconsumed_data.pem",
+    "data/certificate_policies_unittest/invalid-policy_1_2_3_with_empty_qualifiers_sequence.pem",
+    "data/certificate_policies_unittest/invalid-policy_identifier_not_oid.pem",
+    "data/certificate_policies_unittest/policy_1_2_3.pem",
+    "data/certificate_policies_unittest/policy_1_2_3_and_1_2_4.pem",
+    "data/certificate_policies_unittest/policy_1_2_3_and_1_2_4_with_qualifiers.pem",
+    "data/certificate_policies_unittest/policy_1_2_3_with_custom_qualifier.pem",
+    "data/certificate_policies_unittest/policy_1_2_3_with_qualifier.pem",
+    "data/embedded_test_server/mock-headers-without-crlf.html",
+    "data/embedded_test_server/mock-headers-without-crlf.html.mock-http-headers",
     "data/filter_unittests/google.br",
     "data/filter_unittests/google.txt",
     "data/name_constraints_unittest/directoryname-excludeall.pem",
@@ -1929,6 +1947,56 @@
     "data/name_constraints_unittest/uri-permitted.pem",
     "data/name_constraints_unittest/x400address-excluded.pem",
     "data/name_constraints_unittest/x400address-permitted.pem",
+    "data/ocsp_unittest/annotate_test_data.py",
+    "data/ocsp_unittest/bad_ocsp_type.pem",
+    "data/ocsp_unittest/bad_signature.pem",
+    "data/ocsp_unittest/bad_status.pem",
+    "data/ocsp_unittest/good_response.pem",
+    "data/ocsp_unittest/good_response_next_update.pem",
+    "data/ocsp_unittest/good_response_sha256.pem",
+    "data/ocsp_unittest/has_extension.pem",
+    "data/ocsp_unittest/has_single_extension.pem",
+    "data/ocsp_unittest/has_version.pem",
+    "data/ocsp_unittest/make_ocsp.py",
+    "data/ocsp_unittest/malformed_request.pem",
+    "data/ocsp_unittest/missing_response.pem",
+    "data/ocsp_unittest/multiple_response.pem",
+    "data/ocsp_unittest/no_response.pem",
+    "data/ocsp_unittest/ocsp_extra_certs.pem",
+    "data/ocsp_unittest/ocsp_sign_bad_indirect.pem",
+    "data/ocsp_unittest/ocsp_sign_direct.pem",
+    "data/ocsp_unittest/ocsp_sign_indirect.pem",
+    "data/ocsp_unittest/ocsp_sign_indirect_missing.pem",
+    "data/ocsp_unittest/other_response.pem",
+    "data/ocsp_unittest/responder_id.pem",
+    "data/ocsp_unittest/responder_name.pem",
+    "data/ocsp_unittest/revoke_response.pem",
+    "data/ocsp_unittest/revoke_response_reason.pem",
+    "data/ocsp_unittest/unknown_response.pem",
+    "data/pac_file_fetcher_unittest/404.pac",
+    "data/pac_file_fetcher_unittest/404.pac.mock-http-headers",
+    "data/pac_file_fetcher_unittest/500.pac",
+    "data/pac_file_fetcher_unittest/500.pac.mock-http-headers",
+    "data/pac_file_fetcher_unittest/cacheable_1hr.pac",
+    "data/pac_file_fetcher_unittest/cacheable_1hr.pac.mock-http-headers",
+    "data/pac_file_fetcher_unittest/downloadable.pac",
+    "data/pac_file_fetcher_unittest/downloadable.pac.mock-http-headers",
+    "data/pac_file_fetcher_unittest/empty",
+    "data/pac_file_fetcher_unittest/empty.mock-http-headers",
+    "data/pac_file_fetcher_unittest/gzipped_pac",
+    "data/pac_file_fetcher_unittest/gzipped_pac.mock-http-headers",
+    "data/pac_file_fetcher_unittest/large-pac.nsproxy",
+    "data/pac_file_fetcher_unittest/large-pac.nsproxy.mock-http-headers",
+    "data/pac_file_fetcher_unittest/pac.html",
+    "data/pac_file_fetcher_unittest/pac.html.mock-http-headers",
+    "data/pac_file_fetcher_unittest/pac.nsproxy",
+    "data/pac_file_fetcher_unittest/pac.nsproxy.mock-http-headers",
+    "data/pac_file_fetcher_unittest/pac.txt",
+    "data/pac_file_fetcher_unittest/pac.txt.mock-http-headers",
+    "data/pac_file_fetcher_unittest/redirect-to-file",
+    "data/pac_file_fetcher_unittest/redirect-to-file.mock-http-headers",
+    "data/pac_file_fetcher_unittest/utf16be_pac",
+    "data/pac_file_fetcher_unittest/utf16be_pac.mock-http-headers",
     "data/parse_certificate_unittest/bad_key_usage.pem",
     "data/parse_certificate_unittest/bad_policy_qualifiers.pem",
     "data/parse_certificate_unittest/bad_signature_algorithm_oid.pem",
@@ -2789,8 +2857,627 @@
     "data/verify_name_match_unittest/names/unicode_supplementary-UTF8-unmangled.pem",
     "data/verify_name_match_unittest/names/valid-Name-empty.pem",
     "data/verify_name_match_unittest/names/valid-minimal.pem",
+    "data/verify_signed_data_unittest/annotate_test_data.py",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-spki-params-null.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-unused-bits-signature.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-using-ecdh-key.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-using-ecmqv-key.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-using-rsa-algorithm.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-wrong-signature-format.pem",
+    "data/verify_signed_data_unittest/ecdsa-prime256v1-sha512.pem",
+    "data/verify_signed_data_unittest/ecdsa-secp384r1-sha256-corrupted-data.pem",
+    "data/verify_signed_data_unittest/ecdsa-secp384r1-sha256.pem",
+    "data/verify_signed_data_unittest/ecdsa-using-rsa-key.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-length.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1-bad-key-der-null.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1-key-params-absent.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1-using-pss-key-no-params.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1-wrong-algorithm.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha1.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha256-key-encoded-ber.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha256-spki-non-null-params.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha256-using-ecdsa-algorithm.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha256-using-id-ea-rsa.pem",
+    "data/verify_signed_data_unittest/rsa-pkcs1-sha256.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha1-salt20-using-pss-key-no-params.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha1-salt20-using-pss-key-with-null-params.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha1-salt20.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha1-wrong-salt.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha256-mgf1-sha512-salt33.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha256-salt10-using-pss-key-with-params.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha256-salt10-using-pss-key-with-wrong-params.pem",
+    "data/verify_signed_data_unittest/rsa-pss-sha256-salt10.pem",
+    "data/verify_signed_data_unittest/rsa-using-ec-key.pem",
+    "data/verify_signed_data_unittest/rsa2048-pkcs1-sha512.pem",
+    "data/url_fetcher_impl_unittest/animate1.gif",
+    "data/url_fetcher_impl_unittest/server-unavailable.html",
+    "data/url_fetcher_impl_unittest/server-unavailable.html.mock-http-headers",
+    "data/url_fetcher_impl_unittest/simple.html",
+  ]
 
-    # TODO Add more files as needed
+  outputs = [ "$root_build_dir/content/test/{{source_root_relative_dir}}/{{source_file_part}}" ]
+}
+
+copy("third_party_unittest_files") {
+  sources = [
+    "third_party/nist-pkits/certs/AllCertificatesanyPolicyTest11EE.crt",
+    "third_party/nist-pkits/certs/AllCertificatesNoPoliciesTest2EE.crt",
+    "third_party/nist-pkits/certs/AllCertificatesSamePoliciesTest10EE.crt",
+    "third_party/nist-pkits/certs/AllCertificatesSamePoliciesTest13EE.crt",
+    "third_party/nist-pkits/certs/anyPolicyCACert.crt",
+    "third_party/nist-pkits/certs/AnyPolicyTest14EE.crt",
+    "third_party/nist-pkits/certs/BadCRLIssuerNameCACert.crt",
+    "third_party/nist-pkits/certs/BadCRLSignatureCACert.crt",
+    "third_party/nist-pkits/certs/BadnotAfterDateCACert.crt",
+    "third_party/nist-pkits/certs/BadnotBeforeDateCACert.crt",
+    "third_party/nist-pkits/certs/BadSignedCACert.crt",
+    "third_party/nist-pkits/certs/basicConstraintsCriticalcAFalseCACert.crt",
+    "third_party/nist-pkits/certs/basicConstraintsNotCriticalCACert.crt",
+    "third_party/nist-pkits/certs/basicConstraintsNotCriticalcAFalseCACert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedCRLSigningKeyCACert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedCRLSigningKeyCRLCert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedNewKeyCACert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedNewKeyOldWithNewCACert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedOldKeyCACert.crt",
+    "third_party/nist-pkits/certs/BasicSelfIssuedOldKeyNewWithOldCACert.crt",
+    "third_party/nist-pkits/certs/CPSPointerQualifierTest20EE.crt",
+    "third_party/nist-pkits/certs/deltaCRLCA1Cert.crt",
+    "third_party/nist-pkits/certs/deltaCRLCA2Cert.crt",
+    "third_party/nist-pkits/certs/deltaCRLCA3Cert.crt",
+    "third_party/nist-pkits/certs/deltaCRLIndicatorNoBaseCACert.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest12EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest3EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest4EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest5EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest7EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest8EE.crt",
+    "third_party/nist-pkits/certs/DifferentPoliciesTest9EE.crt",
+    "third_party/nist-pkits/certs/distributionPoint1CACert.crt",
+    "third_party/nist-pkits/certs/distributionPoint2CACert.crt",
+    "third_party/nist-pkits/certs/DSACACert.crt",
+    "third_party/nist-pkits/certs/DSAParametersInheritedCACert.crt",
+    "third_party/nist-pkits/certs/GeneralizedTimeCRLnextUpdateCACert.crt",
+    "third_party/nist-pkits/certs/GoodCACert.crt",
+    "third_party/nist-pkits/certs/GoodsubCACert.crt",
+    "third_party/nist-pkits/certs/GoodsubCAPanyPolicyMapping1to2CACert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA1Cert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA2Cert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA3Cert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA3cRLIssuerCert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA4Cert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA4cRLIssuerCert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA5Cert.crt",
+    "third_party/nist-pkits/certs/indirectCRLCA6Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy0CACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1CACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1SelfIssuedsubCA2Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1subCA1Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1subCA2Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1subCAIAP5Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy1subsubCA2Cert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy5CACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy5subCACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicy5subsubCACert.crt",
+    "third_party/nist-pkits/certs/inhibitAnyPolicyTest3EE.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping0CACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping0subCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P12CACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P12subCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P12subCAIPM5Cert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P12subsubCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P12subsubCAIPM5Cert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P1CACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P1SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P1SelfIssuedsubCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P1subCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping1P1subsubCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping5CACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping5subCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping5subsubCACert.crt",
+    "third_party/nist-pkits/certs/inhibitPolicyMapping5subsubsubCACert.crt",
+    "third_party/nist-pkits/certs/InvalidBadCRLIssuerNameTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidBadCRLSignatureTest4EE.crt",
+    "third_party/nist-pkits/certs/InvalidBasicSelfIssuedCRLSigningKeyTest7EE.crt",
+    "third_party/nist-pkits/certs/InvalidBasicSelfIssuedCRLSigningKeyTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidBasicSelfIssuedNewWithOldTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidBasicSelfIssuedOldWithNewTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidcAFalseTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidcAFalseTest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidCAnotAfterDateTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidCAnotBeforeDateTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidCASignatureTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidcRLIssuerTest27EE.crt",
+    "third_party/nist-pkits/certs/InvalidcRLIssuerTest31EE.crt",
+    "third_party/nist-pkits/certs/InvalidcRLIssuerTest32EE.crt",
+    "third_party/nist-pkits/certs/InvalidcRLIssuerTest34EE.crt",
+    "third_party/nist-pkits/certs/InvalidcRLIssuerTest35EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLIndicatorNoBaseTest1EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLTest10EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLTest3EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLTest4EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLTest6EE.crt",
+    "third_party/nist-pkits/certs/InvaliddeltaCRLTest9EE.crt",
+    "third_party/nist-pkits/certs/InvaliddistributionPointTest2EE.crt",
+    "third_party/nist-pkits/certs/InvaliddistributionPointTest3EE.crt",
+    "third_party/nist-pkits/certs/InvaliddistributionPointTest6EE.crt",
+    "third_party/nist-pkits/certs/InvaliddistributionPointTest8EE.crt",
+    "third_party/nist-pkits/certs/InvaliddistributionPointTest9EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNandRFC822nameConstraintsTest28EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNandRFC822nameConstraintsTest29EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest12EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest13EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest15EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest16EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest17EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest20EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest7EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNnameConstraintsTest9EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNSnameConstraintsTest31EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNSnameConstraintsTest33EE.crt",
+    "third_party/nist-pkits/certs/InvalidDNSnameConstraintsTest38EE.crt",
+    "third_party/nist-pkits/certs/InvalidDSASignatureTest6EE.crt",
+    "third_party/nist-pkits/certs/InvalidEEnotAfterDateTest6EE.crt",
+    "third_party/nist-pkits/certs/InvalidEEnotBeforeDateTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidEESignatureTest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidIDPwithindirectCRLTest23EE.crt",
+    "third_party/nist-pkits/certs/InvalidIDPwithindirectCRLTest26EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitAnyPolicyTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitAnyPolicyTest4EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitAnyPolicyTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitAnyPolicyTest6EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitPolicyMappingTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitPolicyMappingTest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitPolicyMappingTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidinhibitPolicyMappingTest6EE.crt",
+    "third_party/nist-pkits/certs/InvalidkeyUsageCriticalcRLSignFalseTest4EE.crt",
+    "third_party/nist-pkits/certs/InvalidkeyUsageCriticalkeyCertSignFalseTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidkeyUsageNotCriticalcRLSignFalseTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidkeyUsageNotCriticalkeyCertSignFalseTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidLongSerialNumberTest18EE.crt",
+    "third_party/nist-pkits/certs/InvalidMappingFromanyPolicyTest7EE.crt",
+    "third_party/nist-pkits/certs/InvalidMappingToanyPolicyTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidMissingbasicConstraintsTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidMissingCRLTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidNameChainingOrderTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidNameChainingTest1EE.crt",
+    "third_party/nist-pkits/certs/InvalidNegativeSerialNumberTest15EE.crt",
+    "third_party/nist-pkits/certs/InvalidOldCRLnextUpdateTest11EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlyContainsAttributeCertsTest14EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlyContainsCACertsTest12EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlyContainsUserCertsTest11EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlySomeReasonsTest15EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlySomeReasonsTest16EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlySomeReasonsTest17EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlySomeReasonsTest20EE.crt",
+    "third_party/nist-pkits/certs/InvalidonlySomeReasonsTest21EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest11EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest12EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest6EE.crt",
+    "third_party/nist-pkits/certs/InvalidpathLenConstraintTest9EE.crt",
+    "third_party/nist-pkits/certs/InvalidPolicyMappingTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidPolicyMappingTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidPolicyMappingTest4EE.crt",
+    "third_party/nist-pkits/certs/Invalidpre2000CRLnextUpdateTest12EE.crt",
+    "third_party/nist-pkits/certs/Invalidpre2000UTCEEnotAfterDateTest7EE.crt",
+    "third_party/nist-pkits/certs/InvalidrequireExplicitPolicyTest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidrequireExplicitPolicyTest5EE.crt",
+    "third_party/nist-pkits/certs/InvalidRevokedCATest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidRevokedEETest3EE.crt",
+    "third_party/nist-pkits/certs/InvalidRFC822nameConstraintsTest22EE.crt",
+    "third_party/nist-pkits/certs/InvalidRFC822nameConstraintsTest24EE.crt",
+    "third_party/nist-pkits/certs/InvalidRFC822nameConstraintsTest26EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitAnyPolicyTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitAnyPolicyTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitPolicyMappingTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitPolicyMappingTest11EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitPolicyMappingTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedinhibitPolicyMappingTest9EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedpathLenConstraintTest16EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedrequireExplicitPolicyTest7EE.crt",
+    "third_party/nist-pkits/certs/InvalidSelfIssuedrequireExplicitPolicyTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidSeparateCertificateandCRLKeysTest20EE.crt",
+    "third_party/nist-pkits/certs/InvalidSeparateCertificateandCRLKeysTest21EE.crt",
+    "third_party/nist-pkits/certs/InvalidUnknownCriticalCertificateExtensionTest2EE.crt",
+    "third_party/nist-pkits/certs/InvalidUnknownCRLEntryExtensionTest8EE.crt",
+    "third_party/nist-pkits/certs/InvalidUnknownCRLExtensionTest10EE.crt",
+    "third_party/nist-pkits/certs/InvalidUnknownCRLExtensionTest9EE.crt",
+    "third_party/nist-pkits/certs/InvalidURInameConstraintsTest35EE.crt",
+    "third_party/nist-pkits/certs/InvalidURInameConstraintsTest37EE.crt",
+    "third_party/nist-pkits/certs/InvalidWrongCRLTest6EE.crt",
+    "third_party/nist-pkits/certs/keyUsageCriticalcRLSignFalseCACert.crt",
+    "third_party/nist-pkits/certs/keyUsageCriticalkeyCertSignFalseCACert.crt",
+    "third_party/nist-pkits/certs/keyUsageNotCriticalCACert.crt",
+    "third_party/nist-pkits/certs/keyUsageNotCriticalcRLSignFalseCACert.crt",
+    "third_party/nist-pkits/certs/keyUsageNotCriticalkeyCertSignFalseCACert.crt",
+    "third_party/nist-pkits/certs/LongSerialNumberCACert.crt",
+    "third_party/nist-pkits/certs/Mapping1to2CACert.crt",
+    "third_party/nist-pkits/certs/MappingFromanyPolicyCACert.crt",
+    "third_party/nist-pkits/certs/MappingToanyPolicyCACert.crt",
+    "third_party/nist-pkits/certs/MissingbasicConstraintsCACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN1CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN1SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN1subCA1Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN1subCA2Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN1subCA3Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN2CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN3CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN3subCA1Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN3subCA2Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN4CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDN5CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDNS1CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsDNS2CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsRFC822CA1Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsRFC822CA2Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsRFC822CA3Cert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsURI1CACert.crt",
+    "third_party/nist-pkits/certs/nameConstraintsURI2CACert.crt",
+    "third_party/nist-pkits/certs/NameOrderingCACert.crt",
+    "third_party/nist-pkits/certs/NegativeSerialNumberCACert.crt",
+    "third_party/nist-pkits/certs/NoCRLCACert.crt",
+    "third_party/nist-pkits/certs/NoissuingDistributionPointCACert.crt",
+    "third_party/nist-pkits/certs/NoPoliciesCACert.crt",
+    "third_party/nist-pkits/certs/OldCRLnextUpdateCACert.crt",
+    "third_party/nist-pkits/certs/onlyContainsAttributeCertsCACert.crt",
+    "third_party/nist-pkits/certs/onlyContainsCACertsCACert.crt",
+    "third_party/nist-pkits/certs/onlyContainsUserCertsCACert.crt",
+    "third_party/nist-pkits/certs/onlySomeReasonsCA1Cert.crt",
+    "third_party/nist-pkits/certs/onlySomeReasonsCA2Cert.crt",
+    "third_party/nist-pkits/certs/onlySomeReasonsCA3Cert.crt",
+    "third_party/nist-pkits/certs/onlySomeReasonsCA4Cert.crt",
+    "third_party/nist-pkits/certs/OverlappingPoliciesTest6EE.crt",
+    "third_party/nist-pkits/certs/P12Mapping1to3CACert.crt",
+    "third_party/nist-pkits/certs/P12Mapping1to3subCACert.crt",
+    "third_party/nist-pkits/certs/P12Mapping1to3subsubCACert.crt",
+    "third_party/nist-pkits/certs/P1anyPolicyMapping1to2CACert.crt",
+    "third_party/nist-pkits/certs/P1Mapping1to234CACert.crt",
+    "third_party/nist-pkits/certs/P1Mapping1to234subCACert.crt",
+    "third_party/nist-pkits/certs/PanyPolicyMapping1to2CACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint0CACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint0SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint0subCA2Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint0subCACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint1CACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint1SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint1SelfIssuedsubCACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint1subCACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6CACert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subCA0Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subCA1Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subCA4Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subsubCA00Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subsubCA11Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subsubCA41Cert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subsubsubCA11XCert.crt",
+    "third_party/nist-pkits/certs/pathLenConstraint6subsubsubCA41XCert.crt",
+    "third_party/nist-pkits/certs/PoliciesP1234CACert.crt",
+    "third_party/nist-pkits/certs/PoliciesP1234subCAP123Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP1234subsubCAP123P12Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP123CACert.crt",
+    "third_party/nist-pkits/certs/PoliciesP123subCAP12Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP123subsubCAP12P1Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP123subsubCAP12P2Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP123subsubsubCAP12P2P1Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP12CACert.crt",
+    "third_party/nist-pkits/certs/PoliciesP12subCAP1Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP12subsubCAP1P2Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP2subCA2Cert.crt",
+    "third_party/nist-pkits/certs/PoliciesP2subCACert.crt",
+    "third_party/nist-pkits/certs/PoliciesP3CACert.crt",
+    "third_party/nist-pkits/certs/pre2000CRLnextUpdateCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy0CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy0subCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy0subsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy0subsubsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy10CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy10subCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy10subsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy10subsubsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy2CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy2SelfIssuedCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy2SelfIssuedsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy2subCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy4CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy4subCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy4subsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy4subsubsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy5CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy5subCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy5subsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy5subsubsubCACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy7CACert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy7subCARE2Cert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy7subsubCARE2RE4Cert.crt",
+    "third_party/nist-pkits/certs/requireExplicitPolicy7subsubsubCARE2RE4Cert.crt",
+    "third_party/nist-pkits/certs/RevokedsubCACert.crt",
+    "third_party/nist-pkits/certs/RFC3280MandatoryAttributeTypesCACert.crt",
+    "third_party/nist-pkits/certs/RFC3280OptionalAttributeTypesCACert.crt",
+    "third_party/nist-pkits/certs/RolloverfromPrintableStringtoUTF8StringCACert.crt",
+    "third_party/nist-pkits/certs/SeparateCertificateandCRLKeysCA2CertificateSigningCACert.crt",
+    "third_party/nist-pkits/certs/SeparateCertificateandCRLKeysCA2CRLSigningCert.crt",
+    "third_party/nist-pkits/certs/SeparateCertificateandCRLKeysCertificateSigningCACert.crt",
+    "third_party/nist-pkits/certs/SeparateCertificateandCRLKeysCRLSigningCert.crt",
+    "third_party/nist-pkits/certs/TrustAnchorRootCertificate.crt",
+    "third_party/nist-pkits/certs/TwoCRLsCACert.crt",
+    "third_party/nist-pkits/certs/UIDCACert.crt",
+    "third_party/nist-pkits/certs/UnknownCRLEntryExtensionCACert.crt",
+    "third_party/nist-pkits/certs/UnknownCRLExtensionCACert.crt",
+    "third_party/nist-pkits/certs/UserNoticeQualifierTest15EE.crt",
+    "third_party/nist-pkits/certs/UserNoticeQualifierTest16EE.crt",
+    "third_party/nist-pkits/certs/UserNoticeQualifierTest17EE.crt",
+    "third_party/nist-pkits/certs/UserNoticeQualifierTest18EE.crt",
+    "third_party/nist-pkits/certs/UserNoticeQualifierTest19EE.crt",
+    "third_party/nist-pkits/certs/UTF8StringCaseInsensitiveMatchCACert.crt",
+    "third_party/nist-pkits/certs/UTF8StringEncodedNamesCACert.crt",
+    "third_party/nist-pkits/certs/ValidbasicConstraintsNotCriticalTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidBasicSelfIssuedCRLSigningKeyTest6EE.crt",
+    "third_party/nist-pkits/certs/ValidBasicSelfIssuedNewWithOldTest3EE.crt",
+    "third_party/nist-pkits/certs/ValidBasicSelfIssuedNewWithOldTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidBasicSelfIssuedOldWithNewTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidCertificatePathTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidcRLIssuerTest28EE.crt",
+    "third_party/nist-pkits/certs/ValidcRLIssuerTest29EE.crt",
+    "third_party/nist-pkits/certs/ValidcRLIssuerTest30EE.crt",
+    "third_party/nist-pkits/certs/ValidcRLIssuerTest33EE.crt",
+    "third_party/nist-pkits/certs/ValiddeltaCRLTest2EE.crt",
+    "third_party/nist-pkits/certs/ValiddeltaCRLTest5EE.crt",
+    "third_party/nist-pkits/certs/ValiddeltaCRLTest7EE.crt",
+    "third_party/nist-pkits/certs/ValiddeltaCRLTest8EE.crt",
+    "third_party/nist-pkits/certs/ValiddistributionPointTest1EE.crt",
+    "third_party/nist-pkits/certs/ValiddistributionPointTest4EE.crt",
+    "third_party/nist-pkits/certs/ValiddistributionPointTest5EE.crt",
+    "third_party/nist-pkits/certs/ValiddistributionPointTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidDNandRFC822nameConstraintsTest27EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest11EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest14EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest18EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest19EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest5EE.crt",
+    "third_party/nist-pkits/certs/ValidDNnameConstraintsTest6EE.crt",
+    "third_party/nist-pkits/certs/ValidDNSnameConstraintsTest30EE.crt",
+    "third_party/nist-pkits/certs/ValidDNSnameConstraintsTest32EE.crt",
+    "third_party/nist-pkits/certs/ValidDSAParameterInheritanceTest5EE.crt",
+    "third_party/nist-pkits/certs/ValidDSASignaturesTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidGeneralizedTimeCRLnextUpdateTest13EE.crt",
+    "third_party/nist-pkits/certs/ValidGeneralizedTimenotAfterDateTest8EE.crt",
+    "third_party/nist-pkits/certs/ValidGeneralizedTimenotBeforeDateTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidIDPwithindirectCRLTest22EE.crt",
+    "third_party/nist-pkits/certs/ValidIDPwithindirectCRLTest24EE.crt",
+    "third_party/nist-pkits/certs/ValidIDPwithindirectCRLTest25EE.crt",
+    "third_party/nist-pkits/certs/ValidinhibitAnyPolicyTest2EE.crt",
+    "third_party/nist-pkits/certs/ValidinhibitPolicyMappingTest2EE.crt",
+    "third_party/nist-pkits/certs/ValidinhibitPolicyMappingTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidkeyUsageNotCriticalTest3EE.crt",
+    "third_party/nist-pkits/certs/ValidLongSerialNumberTest16EE.crt",
+    "third_party/nist-pkits/certs/ValidLongSerialNumberTest17EE.crt",
+    "third_party/nist-pkits/certs/ValidNameChainingCapitalizationTest5EE.crt",
+    "third_party/nist-pkits/certs/ValidNameChainingWhitespaceTest3EE.crt",
+    "third_party/nist-pkits/certs/ValidNameChainingWhitespaceTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidNameUIDsTest6EE.crt",
+    "third_party/nist-pkits/certs/ValidNegativeSerialNumberTest14EE.crt",
+    "third_party/nist-pkits/certs/ValidNoissuingDistributionPointTest10EE.crt",
+    "third_party/nist-pkits/certs/ValidonlyContainsCACertsTest13EE.crt",
+    "third_party/nist-pkits/certs/ValidonlySomeReasonsTest18EE.crt",
+    "third_party/nist-pkits/certs/ValidonlySomeReasonsTest19EE.crt",
+    "third_party/nist-pkits/certs/ValidpathLenConstraintTest13EE.crt",
+    "third_party/nist-pkits/certs/ValidpathLenConstraintTest14EE.crt",
+    "third_party/nist-pkits/certs/ValidpathLenConstraintTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidpathLenConstraintTest8EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest11EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest12EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest13EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest14EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest3EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest5EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest6EE.crt",
+    "third_party/nist-pkits/certs/ValidPolicyMappingTest9EE.crt",
+    "third_party/nist-pkits/certs/Validpre2000UTCnotBeforeDateTest3EE.crt",
+    "third_party/nist-pkits/certs/ValidrequireExplicitPolicyTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidrequireExplicitPolicyTest2EE.crt",
+    "third_party/nist-pkits/certs/ValidrequireExplicitPolicyTest4EE.crt",
+    "third_party/nist-pkits/certs/ValidRFC3280MandatoryAttributeTypesTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidRFC3280OptionalAttributeTypesTest8EE.crt",
+    "third_party/nist-pkits/certs/ValidRFC822nameConstraintsTest21EE.crt",
+    "third_party/nist-pkits/certs/ValidRFC822nameConstraintsTest23EE.crt",
+    "third_party/nist-pkits/certs/ValidRFC822nameConstraintsTest25EE.crt",
+    "third_party/nist-pkits/certs/ValidRolloverfromPrintableStringtoUTF8StringTest10EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedinhibitAnyPolicyTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedinhibitAnyPolicyTest9EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedinhibitPolicyMappingTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedpathLenConstraintTest15EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedpathLenConstraintTest17EE.crt",
+    "third_party/nist-pkits/certs/ValidSelfIssuedrequireExplicitPolicyTest6EE.crt",
+    "third_party/nist-pkits/certs/ValidSeparateCertificateandCRLKeysTest19EE.crt",
+    "third_party/nist-pkits/certs/ValidTwoCRLsTest7EE.crt",
+    "third_party/nist-pkits/certs/ValidUnknownNotCriticalCertificateExtensionTest1EE.crt",
+    "third_party/nist-pkits/certs/ValidURInameConstraintsTest34EE.crt",
+    "third_party/nist-pkits/certs/ValidURInameConstraintsTest36EE.crt",
+    "third_party/nist-pkits/certs/ValidUTF8StringCaseInsensitiveMatchTest11EE.crt",
+    "third_party/nist-pkits/certs/ValidUTF8StringEncodedNamesTest9EE.crt",
+    "third_party/nist-pkits/certs/WrongCRLCACert.crt",
+    "third_party/nist-pkits/crls/anyPolicyCACRL.crl",
+    "third_party/nist-pkits/crls/BadCRLIssuerNameCACRL.crl",
+    "third_party/nist-pkits/crls/BadCRLSignatureCACRL.crl",
+    "third_party/nist-pkits/crls/BadnotAfterDateCACRL.crl",
+    "third_party/nist-pkits/crls/BadnotBeforeDateCACRL.crl",
+    "third_party/nist-pkits/crls/BadSignedCACRL.crl",
+    "third_party/nist-pkits/crls/basicConstraintsCriticalcAFalseCACRL.crl",
+    "third_party/nist-pkits/crls/basicConstraintsNotCriticalCACRL.crl",
+    "third_party/nist-pkits/crls/basicConstraintsNotCriticalcAFalseCACRL.crl",
+    "third_party/nist-pkits/crls/BasicSelfIssuedCRLSigningKeyCACRL.crl",
+    "third_party/nist-pkits/crls/BasicSelfIssuedCRLSigningKeyCRLCertCRL.crl",
+    "third_party/nist-pkits/crls/BasicSelfIssuedNewKeyCACRL.crl",
+    "third_party/nist-pkits/crls/BasicSelfIssuedOldKeyCACRL.crl",
+    "third_party/nist-pkits/crls/BasicSelfIssuedOldKeySelfIssuedCertCRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA1CRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA1deltaCRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA2CRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA2deltaCRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA3CRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLCA3deltaCRL.crl",
+    "third_party/nist-pkits/crls/deltaCRLIndicatorNoBaseCACRL.crl",
+    "third_party/nist-pkits/crls/distributionPoint1CACRL.crl",
+    "third_party/nist-pkits/crls/distributionPoint2CACRL.crl",
+    "third_party/nist-pkits/crls/DSACACRL.crl",
+    "third_party/nist-pkits/crls/DSAParametersInheritedCACRL.crl",
+    "third_party/nist-pkits/crls/GeneralizedTimeCRLnextUpdateCACRL.crl",
+    "third_party/nist-pkits/crls/GoodCACRL.crl",
+    "third_party/nist-pkits/crls/GoodsubCACRL.crl",
+    "third_party/nist-pkits/crls/GoodsubCAPanyPolicyMapping1to2CACRL.crl",
+    "third_party/nist-pkits/crls/indirectCRLCA1CRL.crl",
+    "third_party/nist-pkits/crls/indirectCRLCA3CRL.crl",
+    "third_party/nist-pkits/crls/indirectCRLCA3cRLIssuerCRL.crl",
+    "third_party/nist-pkits/crls/indirectCRLCA4cRLIssuerCRL.crl",
+    "third_party/nist-pkits/crls/indirectCRLCA5CRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy0CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy1CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy1subCA1CRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy1subCA2CRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy1subCAIAP5CRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy1subsubCA2CRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy5CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy5subCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitAnyPolicy5subsubCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping0CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping0subCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P12CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P12subCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P12subCAIPM5CRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P12subsubCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P12subsubCAIPM5CRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P1CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P1subCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping1P1subsubCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping5CACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping5subCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping5subsubCACRL.crl",
+    "third_party/nist-pkits/crls/inhibitPolicyMapping5subsubsubCACRL.crl",
+    "third_party/nist-pkits/crls/keyUsageCriticalcRLSignFalseCACRL.crl",
+    "third_party/nist-pkits/crls/keyUsageCriticalkeyCertSignFalseCACRL.crl",
+    "third_party/nist-pkits/crls/keyUsageNotCriticalCACRL.crl",
+    "third_party/nist-pkits/crls/keyUsageNotCriticalcRLSignFalseCACRL.crl",
+    "third_party/nist-pkits/crls/keyUsageNotCriticalkeyCertSignFalseCACRL.crl",
+    "third_party/nist-pkits/crls/LongSerialNumberCACRL.crl",
+    "third_party/nist-pkits/crls/Mapping1to2CACRL.crl",
+    "third_party/nist-pkits/crls/MappingFromanyPolicyCACRL.crl",
+    "third_party/nist-pkits/crls/MappingToanyPolicyCACRL.crl",
+    "third_party/nist-pkits/crls/MissingbasicConstraintsCACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN1CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN1subCA1CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN1subCA2CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN1subCA3CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN2CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN3CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN3subCA1CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN3subCA2CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN4CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDN5CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDNS1CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsDNS2CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsRFC822CA1CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsRFC822CA2CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsRFC822CA3CRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsURI1CACRL.crl",
+    "third_party/nist-pkits/crls/nameConstraintsURI2CACRL.crl",
+    "third_party/nist-pkits/crls/NameOrderCACRL.crl",
+    "third_party/nist-pkits/crls/NegativeSerialNumberCACRL.crl",
+    "third_party/nist-pkits/crls/NoissuingDistributionPointCACRL.crl",
+    "third_party/nist-pkits/crls/NoPoliciesCACRL.crl",
+    "third_party/nist-pkits/crls/OldCRLnextUpdateCACRL.crl",
+    "third_party/nist-pkits/crls/onlyContainsAttributeCertsCACRL.crl",
+    "third_party/nist-pkits/crls/onlyContainsCACertsCACRL.crl",
+    "third_party/nist-pkits/crls/onlyContainsUserCertsCACRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA1compromiseCRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA1otherreasonsCRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA2CRL1.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA2CRL2.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA3compromiseCRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA3otherreasonsCRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA4compromiseCRL.crl",
+    "third_party/nist-pkits/crls/onlySomeReasonsCA4otherreasonsCRL.crl",
+    "third_party/nist-pkits/crls/P12Mapping1to3CACRL.crl",
+    "third_party/nist-pkits/crls/P12Mapping1to3subCACRL.crl",
+    "third_party/nist-pkits/crls/P12Mapping1to3subsubCACRL.crl",
+    "third_party/nist-pkits/crls/P1anyPolicyMapping1to2CACRL.crl",
+    "third_party/nist-pkits/crls/P1Mapping1to234CACRL.crl",
+    "third_party/nist-pkits/crls/P1Mapping1to234subCACRL.crl",
+    "third_party/nist-pkits/crls/PanyPolicyMapping1to2CACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint0CACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint0subCA2CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint0subCACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint1CACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint1subCACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6CACRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subCA0CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subCA1CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subCA4CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subsubCA00CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subsubCA11CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subsubCA41CRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subsubsubCA11XCRL.crl",
+    "third_party/nist-pkits/crls/pathLenConstraint6subsubsubCA41XCRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP1234CACRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP1234subCAP123CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP1234subsubCAP123P12CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP123CACRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP123subCAP12CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP123subsubCAP12P1CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP123subsubCAP2P2CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP123subsubsubCAP12P2P1CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP12CACRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP12subCAP1CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP12subsubCAP1P2CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP2subCA2CRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP2subCACRL.crl",
+    "third_party/nist-pkits/crls/PoliciesP3CACRL.crl",
+    "third_party/nist-pkits/crls/pre2000CRLnextUpdateCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy0CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy0subCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy0subsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy0subsubsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy10CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy10subCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy10subsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy10subsubsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy2CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy2subCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy4CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy4subCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy4subsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy4subsubsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy5CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy5subCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy5subsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy5subsubsubCACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy7CACRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy7subCARE2CRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy7subsubCARE2RE4CRL.crl",
+    "third_party/nist-pkits/crls/requireExplicitPolicy7subsubsubCARE2RE4CRL.crl",
+    "third_party/nist-pkits/crls/RevokedsubCACRL.crl",
+    "third_party/nist-pkits/crls/RFC3280MandatoryAttributeTypesCACRL.crl",
+    "third_party/nist-pkits/crls/RFC3280OptionalAttributeTypesCACRL.crl",
+    "third_party/nist-pkits/crls/RolloverfromPrintableStringtoUTF8StringCACRL.crl",
+    "third_party/nist-pkits/crls/SeparateCertificateandCRLKeysCA2CRL.crl",
+    "third_party/nist-pkits/crls/SeparateCertificateandCRLKeysCRL.crl",
+    "third_party/nist-pkits/crls/TrustAnchorRootCRL.crl",
+    "third_party/nist-pkits/crls/TwoCRLsCABadCRL.crl",
+    "third_party/nist-pkits/crls/TwoCRLsCAGoodCRL.crl",
+    "third_party/nist-pkits/crls/UIDCACRL.crl",
+    "third_party/nist-pkits/crls/UnknownCRLEntryExtensionCACRL.crl",
+    "third_party/nist-pkits/crls/UnknownCRLExtensionCACRL.crl",
+    "third_party/nist-pkits/crls/UTF8StringCaseInsensitiveMatchCACRL.crl",
+    "third_party/nist-pkits/crls/UTF8StringEncodedNamesCACRL.crl",
+    "third_party/nist-pkits/crls/WrongCRLCACRL.crl",
   ]
 
   outputs = [ "$root_build_dir/content/test/{{source_root_relative_dir}}/{{source_file_part}}" ]
@@ -3519,6 +4206,7 @@
       ":net_unittest_files",
       ":quic_test_tools",
       ":test_support",
+      ":third_party_unittest_files",
       "//base",
       "//base:i18n",
       "//base/test:test_support",
diff --git a/starboard/BUILD.gn b/starboard/BUILD.gn
index 9b049e5..22b5233 100644
--- a/starboard/BUILD.gn
+++ b/starboard/BUILD.gn
@@ -68,15 +68,24 @@
 }
 
 group("starboard") {
-  public_deps = [ ":starboard_headers_only" ]
+  public_deps = [
+    ":starboard_headers_only",
+    "//starboard/client_porting/cwrappers",
+    "//starboard/client_porting/eztime",
+  ]
 
   if (sb_is_evergreen) {
-    public_deps += []
+    public_deps += [
+      "//starboard/elf_loader:sabi_string",
+      "//third_party/llvm-project/compiler-rt:compiler_rt",
+      "//third_party/llvm-project/libcxx:cxx",
+      "//third_party/llvm-project/libcxxabi:cxxabi",
+      "//third_party/llvm-project/libunwind:unwind_evergreen",
+      "//third_party/musl:c",
+    ]
   } else {
     public_deps += [
       "//$starboard_path:starboard_platform",
-      "//starboard/client_porting/cwrappers",
-      "//starboard/client_porting/eztime",
       "//starboard/common",
     ]
 
diff --git a/starboard/android/apk/app/src/main/java/dev/cobalt/media/CobaltMediaSession.java b/starboard/android/apk/app/src/main/java/dev/cobalt/media/CobaltMediaSession.java
index 4a95898..a310b15 100644
--- a/starboard/android/apk/app/src/main/java/dev/cobalt/media/CobaltMediaSession.java
+++ b/starboard/android/apk/app/src/main/java/dev/cobalt/media/CobaltMediaSession.java
@@ -232,16 +232,20 @@
     wakeLock(playbackState == PLAYBACK_STATE_PLAYING);
     audioFocus(playbackState == PLAYBACK_STATE_PLAYING);
 
-    boolean activating = true;
-    boolean deactivating = false;
+    boolean activating = playbackState != PLAYBACK_STATE_NONE;
+    boolean deactivating = playbackState == PLAYBACK_STATE_NONE;
     if (mediaSession != null) {
-      activating = playbackState != PLAYBACK_STATE_NONE && !mediaSession.isActive();
-      deactivating = playbackState == PLAYBACK_STATE_NONE && mediaSession.isActive();
+      activating = activating && !mediaSession.isActive();
+      deactivating = deactivating && mediaSession.isActive();
     }
     if (activating) {
       // Resuming or new playbacks land here.
       setMediaSession();
     }
+    if (mediaSession == null) {
+      Log.i(TAG, "MediaSession already released");
+      return;
+    }
     mediaSession.setActive(playbackState != PLAYBACK_STATE_NONE);
     if (lifecycleCallback != null) {
       lifecycleCallback.onMediaSessionLifecycle(
diff --git a/starboard/android/apk/build.gradle b/starboard/android/apk/build.gradle
index 27edbf5..302652a 100644
--- a/starboard/android/apk/build.gradle
+++ b/starboard/android/apk/build.gradle
@@ -20,7 +20,7 @@
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.6.3'
+        classpath 'com.android.tools.build:gradle:4.1.0'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
@@ -49,7 +49,7 @@
 // Move the 'buildDir' for all projects into sub-directories of a shared top-level build directory,
 // which is either the root's original 'buildDir' or a custom location when building for platform
 // deploy.  Note that the platform deploy action sets a custom 'cobaltGradleDir' property rather
-// than setting 'buildDir' directly on the command line since Gradle trys to get smart about
+// than setting 'buildDir' directly on the command line since Gradle tries to get smart about
 // 'buildDir' which can end up putting it at the wrong depth in the file system.
 def rootBuildDir = hasProperty('cobaltGradleDir') ? new File(cobaltGradleDir, 'build') : buildDir
 allprojects { buildDir = new File(rootBuildDir, project.name).canonicalFile }
diff --git a/starboard/android/apk/gradle/wrapper/gradle-wrapper.properties b/starboard/android/apk/gradle/wrapper/gradle-wrapper.properties
index 0ebb310..186b715 100644
--- a/starboard/android/apk/gradle/wrapper/gradle-wrapper.properties
+++ b/starboard/android/apk/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/starboard/android/shared/cobalt/BUILD.gn b/starboard/android/shared/cobalt/BUILD.gn
new file mode 100644
index 0000000..bbcc89c
--- /dev/null
+++ b/starboard/android/shared/cobalt/BUILD.gn
@@ -0,0 +1,25 @@
+# Copyright 2021 The Cobalt Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+static_library("cobalt_platform") {
+  sources = [
+    "android_user_authorizer.cc",
+    "android_user_authorizer.h",
+  ]
+  deps = [
+    "//cobalt/base",
+    "//starboard/android/shared:starboard_platform",
+    "//starboard/common",
+  ]
+}
diff --git a/starboard/android/shared/media_decoder.cc b/starboard/android/shared/media_decoder.cc
index d6c7f71..44095f7 100644
--- a/starboard/android/shared/media_decoder.cc
+++ b/starboard/android/shared/media_decoder.cc
@@ -170,6 +170,10 @@
   SB_DCHECK(!error_cb_);
 
   error_cb_ = error_cb;
+
+  if (error_occurred_) {
+    Schedule(std::bind(error_cb_, error_, error_message_));
+  }
 }
 
 void MediaDecoder::WriteInputBuffer(
@@ -445,7 +449,7 @@
           " greater than |byte_buffer.capacity()| (%d).",
           size, static_cast<int>(byte_buffer.capacity()));
       SB_LOG(ERROR) << error_message;
-      error_cb_(kSbPlayerErrorDecode, error_message);
+      ReportError(kSbPlayerErrorDecode, error_message);
       return false;
     }
     byte_buffer.CopyInto(data, size);
@@ -512,13 +516,13 @@
     drm_system_->OnInsufficientOutputProtection();
   } else {
     if (media_type_ == kSbMediaTypeAudio) {
-      error_cb_(kSbPlayerErrorDecode,
-                FormatString("%s failed with status %d (audio).", action_name,
-                             status));
+      ReportError(kSbPlayerErrorDecode,
+                  FormatString("%s failed with status %d (audio).", action_name,
+                               status));
     } else {
-      error_cb_(kSbPlayerErrorDecode,
-                FormatString("%s failed with status %d (video).", action_name,
-                             status));
+      ReportError(kSbPlayerErrorDecode,
+                  FormatString("%s failed with status %d (video).", action_name,
+                               status));
     }
   }
 
@@ -532,6 +536,24 @@
   }
 }
 
+void MediaDecoder::ReportError(const SbPlayerError error,
+                               const std::string error_message) {
+  if (!BelongsToCurrentThread()) {
+    Schedule(std::bind(&MediaDecoder::ReportError, this, error, error_message));
+    return;
+  }
+  if (error_occurred_) {
+    // Avoid to report error multiple times.
+    return;
+  }
+  error_occurred_ = true;
+  error_ = error;
+  error_message_ = error_message;
+  if (error_cb_) {
+    error_cb_(error_, error_message_);
+  }
+}
+
 void MediaDecoder::OnMediaCodecError(bool is_recoverable,
                                      bool is_transient,
                                      const std::string& diagnostic_info) {
@@ -539,16 +561,17 @@
                   << (is_recoverable ? "recoverable, " : "unrecoverable, ")
                   << (is_transient ? "transient " : "intransient ")
                   << " error with message: " << diagnostic_info;
-
+  // The callback may be called on a different thread and before |error_cb_| is
+  // initialized.
   if (!is_transient) {
     if (media_type_ == kSbMediaTypeAudio) {
-      error_cb_(kSbPlayerErrorDecode,
-                "OnMediaCodecError (audio): " + diagnostic_info +
-                    (is_recoverable ? ", recoverable " : ", unrecoverable "));
+      ReportError(kSbPlayerErrorDecode,
+                  "OnMediaCodecError (audio): " + diagnostic_info +
+                      (is_recoverable ? ", recoverable " : ", unrecoverable "));
     } else {
-      error_cb_(kSbPlayerErrorDecode,
-                "OnMediaCodecError (video): " + diagnostic_info +
-                    (is_recoverable ? ", recoverable " : ", unrecoverable "));
+      ReportError(kSbPlayerErrorDecode,
+                  "OnMediaCodecError (video): " + diagnostic_info +
+                      (is_recoverable ? ", recoverable " : ", unrecoverable "));
     }
   }
 }
diff --git a/starboard/android/shared/media_decoder.h b/starboard/android/shared/media_decoder.h
index 569036a..423d6ac 100644
--- a/starboard/android/shared/media_decoder.h
+++ b/starboard/android/shared/media_decoder.h
@@ -32,6 +32,7 @@
 #include "starboard/shared/internal_only.h"
 #include "starboard/shared/starboard/player/filter/common.h"
 #include "starboard/shared/starboard/player/input_buffer_internal.h"
+#include "starboard/shared/starboard/player/job_queue.h"
 #include "starboard/shared/starboard/thread_checker.h"
 
 namespace starboard {
@@ -40,7 +41,9 @@
 
 // TODO: Better encapsulation the MediaCodecBridge so the decoders no longer
 //       need to talk directly to the MediaCodecBridge.
-class MediaDecoder : private MediaCodecBridge::Handler {
+class MediaDecoder
+    : private MediaCodecBridge::Handler,
+      protected ::starboard::shared::starboard::player::JobQueue::JobOwner {
  public:
   typedef ::starboard::shared::starboard::player::filter::ErrorCB ErrorCB;
   typedef ::starboard::shared::starboard::player::InputBuffer InputBuffer;
@@ -143,6 +146,7 @@
   bool ProcessOneInputBuffer(std::deque<Event>* pending_tasks,
                              std::vector<int>* input_buffer_indices);
   void HandleError(const char* action_name, jint status);
+  void ReportError(const SbPlayerError error, const std::string error_message);
 
   // MediaCodecBridge::Handler methods
   // Note that these methods are called from the default looper and is not on
@@ -169,6 +173,10 @@
 
   ErrorCB error_cb_;
 
+  bool error_occurred_ = false;
+  SbPlayerError error_;
+  std::string error_message_;
+
   atomic_bool stream_ended_;
 
   atomic_bool destroying_;
diff --git a/starboard/android/shared/platform_configuration/configuration.gni b/starboard/android/shared/platform_configuration/configuration.gni
index 9cc420a..32bf7c5 100644
--- a/starboard/android/shared/platform_configuration/configuration.gni
+++ b/starboard/android/shared/platform_configuration/configuration.gni
@@ -55,3 +55,10 @@
 
 sb_widevine_platform = "android"
 platform_tests_path = "//starboard/android/shared:starboard_platform_tests"
+
+cobalt_licenses_platform = "android"
+
+enable_account_manager = true
+
+cobalt_platform_dependencies =
+    [ "//starboard/android/shared/cobalt:cobalt_platform" ]
diff --git a/starboard/benchmark/BUILD.gn b/starboard/benchmark/BUILD.gn
index 39319c7..7fd1215 100644
--- a/starboard/benchmark/BUILD.gn
+++ b/starboard/benchmark/BUILD.gn
@@ -25,6 +25,7 @@
     "//starboard",
     "//third_party/google_benchmark",
   ]
+  deps = cobalt_platform_dependencies
 
   configs += [ "//starboard/build/config:starboard_implementation" ]
 }
diff --git a/starboard/build/config/BUILD.gn b/starboard/build/config/BUILD.gn
index e25a934..5491f81 100644
--- a/starboard/build/config/BUILD.gn
+++ b/starboard/build/config/BUILD.gn
@@ -18,6 +18,7 @@
   if (is_debug) {
     defines += [
       "STARBOARD_BUILD_TYPE_DEBUG",
+      "COBALT_BUILD_TYPE_DEBUG",
       "_DEBUG",
     ]
   }
@@ -25,6 +26,7 @@
   if (is_devel) {
     defines += [
       "STARBOARD_BUILD_TYPE_DEVEL",
+      "COBALT_BUILD_TYPE_DEVEL",
       "_DEBUG",
     ]
   }
@@ -32,6 +34,7 @@
   if (is_qa) {
     defines += [
       "STARBOARD_BUILD_TYPE_QA",
+      "COBALT_BUILD_TYPE_QA",
       "NDEBUG",
     ]
   }
@@ -39,6 +42,7 @@
   if (is_gold) {
     defines += [
       "STARBOARD_BUILD_TYPE_GOLD",
+      "COBALT_BUILD_TYPE_GOLD",
       "NDEBUG",
     ]
   }
@@ -101,6 +105,13 @@
       defines += [ "SB_GN_GL_TYPE_IS_NONE=0" ]
     }
 
+    if (!is_gold) {
+      defines += [
+        "ENABLE_DEBUGGER",
+        "ENABLE_DEBUG_COMMAND_LINE_SWITCHES",
+      ]
+    }
+
     if (abort_on_allocation_failure) {
       defines += [ "SB_ABORT_ON_ALLOCATION_FAILURE" ]
     }
diff --git a/starboard/build/config/base_configuration.gni b/starboard/build/config/base_configuration.gni
index 8aaad47..16893bf 100644
--- a/starboard/build/config/base_configuration.gni
+++ b/starboard/build/config/base_configuration.gni
@@ -120,4 +120,20 @@
 
   # A symbolizer path for ASAN can be added to allow translation of callstacks.
   asan_symbolizer_path = ""
+
+  # Sub-directory to copy license file to.
+  cobalt_licenses_platform = "default"
+
+  # Set to true to enable H5vccAccountManager.
+  enable_account_manager = false
+
+  # Set to true to enable H5vccSSO (Single Sign On).
+  enable_sso = false
+
+  # Set to true to enable filtering of HTTP headers before sending.
+  enable_xhr_header_filtering = false
+
+  # TODO(b/173248397): Migrate to CobaltExtensions or PlatformServices.
+  # List of platform-specific targets that get compiled into cobalt.
+  cobalt_platform_dependencies = []
 }
diff --git a/starboard/common/BUILD.gn b/starboard/common/BUILD.gn
index 28920c1..43e1716 100644
--- a/starboard/common/BUILD.gn
+++ b/starboard/common/BUILD.gn
@@ -18,8 +18,16 @@
 # This must be a static_library, not a source_set. When using a source_set, we
 # see duplicate definition errors when compiling new.cc because of our
 # overloaded operators.
+source_set("common_headers_only") {
+  sources = [ "log.h" ]
+  deps = [ "//starboard:starboard_headers_only" ]
+}
+
 static_library("common") {
-  public_deps = [ "//starboard:starboard_headers_only" ]
+  public_deps = [
+    ":common_headers_only",
+    "//starboard:starboard_headers_only",
+  ]
   check_includes = false
 
   sources = [
@@ -38,7 +46,6 @@
     "flat_map.h",
     "locked_ptr.h",
     "log.cc",
-    "log.h",
     "media.cc",
     "media.h",
     "move.h",
diff --git a/starboard/elf_loader/BUILD.gn b/starboard/elf_loader/BUILD.gn
index 9ce393b..6b7d3f4 100644
--- a/starboard/elf_loader/BUILD.gn
+++ b/starboard/elf_loader/BUILD.gn
@@ -95,6 +95,13 @@
     "//cobalt/content/fonts:copy_font_data",
     "//starboard",
   ]
+
+  # TODO: Remove this dependency once MediaSession is migrated to use CobaltExtensions.
+  deps += cobalt_platform_dependencies
+
+  if (!sb_is_evergreen_compatible) {
+    deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
+  }
 }
 
 target(final_executable_type, "elf_loader_sys_sandbox") {
@@ -122,6 +129,10 @@
     ":sabi_string",
     "//starboard",
   ]
+
+  if (!sb_is_evergreen_compatible) {
+    deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
+  }
 }
 
 target(gtest_target_type, "elf_loader_test") {
@@ -147,6 +158,7 @@
       ":copy_elf_loader_testdata",
       ":elf_loader",
     ]
+    deps += cobalt_platform_dependencies
   }
 }
 
diff --git a/starboard/evergreen/shared/platform_configuration/BUILD.gn b/starboard/evergreen/shared/platform_configuration/BUILD.gn
index 3b7e11b..08c8621 100644
--- a/starboard/evergreen/shared/platform_configuration/BUILD.gn
+++ b/starboard/evergreen/shared/platform_configuration/BUILD.gn
@@ -150,7 +150,7 @@
     defines += [ "ADDRESS_SANITIZER" ]
 
     if (asan_symbolizer_path != "") {
-      defines += [ "ASAN_SYMBOLIZER_PATH='${asan_symbolizer_path}'" ]
+      defines += [ "ASAN_SYMBOLIZER_PATH=\"${asan_symbolizer_path}\"" ]
     }
   } else if (use_tsan) {
     cflags += [
diff --git a/starboard/evergreen/shared/platform_configuration/configuration.gni b/starboard/evergreen/shared/platform_configuration/configuration.gni
index 8d2f2e0..44586a3 100644
--- a/starboard/evergreen/shared/platform_configuration/configuration.gni
+++ b/starboard/evergreen/shared/platform_configuration/configuration.gni
@@ -34,3 +34,5 @@
     "//starboard/evergreen/shared/platform_configuration:pedantic_warnings"
 no_pedantic_warnings_config_path =
     "//starboard/evergreen/shared/platform_configuration:no_pedantic_warnings"
+
+cobalt_licenses_platform = "evergreen"
diff --git a/starboard/linux/shared/BUILD.gn b/starboard/linux/shared/BUILD.gn
index 47b019f..ea46558 100644
--- a/starboard/linux/shared/BUILD.gn
+++ b/starboard/linux/shared/BUILD.gn
@@ -71,8 +71,6 @@
     "//starboard/linux/shared/player_components_factory.cc",
     "//starboard/linux/shared/routes.cc",
     "//starboard/linux/shared/routes.h",
-    "//starboard/linux/shared/soft_mic_platform_service.cc",
-    "//starboard/linux/shared/soft_mic_platform_service.h",
     "//starboard/linux/shared/system_get_connection_type.cc",
     "//starboard/linux/shared/system_get_device_type.cc",
     "//starboard/linux/shared/system_get_extensions.cc",
diff --git a/starboard/linux/shared/platform_configuration/BUILD.gn b/starboard/linux/shared/platform_configuration/BUILD.gn
index 7d23495..684a926 100644
--- a/starboard/linux/shared/platform_configuration/BUILD.gn
+++ b/starboard/linux/shared/platform_configuration/BUILD.gn
@@ -102,6 +102,9 @@
       "-Wl,-u_sanitizer_options_link_helper",
     ]
     defines += [ "ADDRESS_SANITIZER" ]
+    if (asan_symbolizer_path != "") {
+      defines += [ "ASAN_SYMBOLIZER_PATH=\"${asan_symbolizer_path}\"" ]
+    }
   } else if (use_tsan) {
     cflags += [
       "-fsanitize=thread",
diff --git a/starboard/linux/shared/soft_mic_platform_service.cc b/starboard/linux/shared/soft_mic_platform_service.cc
deleted file mode 100644
index 8636b1d..0000000
--- a/starboard/linux/shared/soft_mic_platform_service.cc
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2021 The Cobalt Authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "starboard/linux/shared/soft_mic_platform_service.h"
-
-#include <string>
-
-#include "cobalt/extension/platform_service.h"
-#include "starboard/common/log.h"
-#include "starboard/common/string.h"
-#include "starboard/shared/starboard/application.h"
-
-typedef struct CobaltExtensionPlatformServicePrivate {
-  void* context;
-  ReceiveMessageCallback receive_callback;
-  const char* name;
-
-  ~CobaltExtensionPlatformServicePrivate() {
-    if (name) {
-      delete[] name;
-    }
-  }
-} CobaltExtensionPlatformServicePrivate;
-
-// Omit namespace linux due to symbol name conflict.
-namespace starboard {
-namespace shared {
-
-namespace {
-
-const char kGetMicSupport[] = "\"getMicSupport\"";
-const char kNotifySearchActive[] = "\"notifySearchActive\"";
-const char kNotifySearchInactive[] = "\"notifySearchInactive\"";
-const char kHasHardMicSupport[] = "has_hard_mic_support";
-const char kHasSoftMicSupport[] = "has_soft_mic_support";
-
-// Helper method for constructing JSON response string.
-inline const char* boolToChar(bool value) {
-  return value ? "true" : "false";
-}
-
-bool Has(const char* name) {
-  // Check if platform has service name.
-  SB_LOG(INFO) << "Has(): " << name;
-  return strcmp(name, "com.google.youtube.tv.SoftMic") == 0;
-}
-
-CobaltExtensionPlatformService Open(void* context,
-                                    const char* name,
-                                    ReceiveMessageCallback receive_callback) {
-  SB_DCHECK(context);
-  if (!Has(name)) {
-    SB_LOG(ERROR) << "Cannot open service, does not exist: " << name;
-    return kCobaltExtensionPlatformServiceInvalid;
-  }
-
-  CobaltExtensionPlatformService service =
-      new CobaltExtensionPlatformServicePrivate(
-          {context, receive_callback, name});
-  SB_LOG(INFO) << "Open() Service created: " << name;
-  return service;
-}
-
-void Close(CobaltExtensionPlatformService service) {
-  SB_LOG(INFO) << "Close() Service";
-  delete static_cast<CobaltExtensionPlatformServicePrivate*>(service);
-}
-
-void* Send(CobaltExtensionPlatformService service,
-           void* data,
-           uint64_t length,
-           uint64_t* output_length,
-           bool* invalid_state) {
-  SB_DCHECK(data);
-  SB_DCHECK(length);
-  SB_DCHECK(output_length);
-  SB_DCHECK(invalid_state);
-
-  char* message = new char[length + 1];
-  for (auto i = 0; i < length; i++)
-    message[i] = *(static_cast<char*>(data) + i);
-  message[length] = '\0';
-
-  SB_LOG(INFO) << "Send() message: " << message;
-
-  if (strcmp(message, kGetMicSupport) == 0) {
-    // Process "getMicSupport" web app message.
-    SB_LOG(INFO) << "Send() kGetMicSupport message received";
-
-    auto has_hard_mic = false;
-    auto has_soft_mic = true;
-
-#if !defined(COBALT_BUILD_TYPE_GOLD)
-    using shared::starboard::Application;
-
-    // Check for explicit true or false switch value for kHasHardMicSupport and
-    // kHasSoftMicSupport optional target params. If neither are set use
-    // defaults.
-    auto command_line = Application::Get()->GetCommandLine();
-
-    auto hard_mic_switch_value =
-        command_line->GetSwitchValue(kHasHardMicSupport);
-    if (strcmp("true", hard_mic_switch_value.c_str()) == 0) {
-      has_hard_mic = true;
-    } else if (strcmp("false", hard_mic_switch_value.c_str()) == 0) {
-      has_hard_mic = false;
-    }
-
-    auto soft_mic_switch_value =
-        command_line->GetSwitchValue(kHasSoftMicSupport);
-    if (strcmp("true", soft_mic_switch_value.c_str()) == 0) {
-      has_soft_mic = true;
-    } else if (strcmp("false", soft_mic_switch_value.c_str()) == 0) {
-      has_soft_mic = false;
-    }
-#endif  // !defined(COBALT_BUILD_TYPE_GOLD)
-
-    auto response = FormatString(
-        "{\"hasHardMicSupport\": %s, \"hasSoftMicSupport\": %s}",
-        (has_hard_mic ? "true" : "false"), (has_soft_mic ? "true" : "false"));
-
-    // Here we are synchronously calling the receive_callback() from within
-    // Send() which is unnecessary. Implementations should prioritize
-    // returning from Send() ASAP to avoid blocking the JavaScript thread.
-    static_cast<CobaltExtensionPlatformServicePrivate*>(service)
-        ->receive_callback(service->context, response.c_str(),
-                           response.length());
-  } else if (strcmp(message, kNotifySearchActive) == 0) {
-    // Process "notifySearchActive" web app message.
-    SB_LOG(INFO) << "Send() kNotifySearchActive message received";
-  } else if (strcmp(message, kNotifySearchInactive) == 0) {
-    // Process "notifySearchInactive" web app message.
-    SB_LOG(INFO) << "Send() kNotifySearchInactive message received";
-  }
-
-  delete[] message;
-  // The web app does not expect a synchronous response.
-  return nullptr;
-}
-
-const CobaltExtensionPlatformServiceApi kPlatformServiceApi = {
-    kCobaltExtensionPlatformServiceName,
-    1,  // API version that's implemented.
-    &Has,
-    &Open,
-    &Close,
-    &Send};
-
-}  // namespace
-
-const void* GetPlatformServiceApi() {
-  return &kPlatformServiceApi;
-}
-
-}  // namespace shared
-}  // namespace starboard
diff --git a/starboard/linux/shared/soft_mic_platform_service.h b/starboard/linux/shared/soft_mic_platform_service.h
deleted file mode 100644
index 93f0e0d..0000000
--- a/starboard/linux/shared/soft_mic_platform_service.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2021 The Cobalt Authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef STARBOARD_LINUX_SHARED_SOFT_MIC_PLATFORM_SERVICE_H_
-#define STARBOARD_LINUX_SHARED_SOFT_MIC_PLATFORM_SERVICE_H_
-
-// Omit namespace linux due to symbol name conflict.
-namespace starboard {
-namespace shared {
-
-const void* GetPlatformServiceApi();
-
-}  // namespace shared
-}  // namespace starboard
-
-#endif  // STARBOARD_LINUX_SHARED_SOFT_MIC_PLATFORM_SERVICE_H_
diff --git a/starboard/linux/shared/starboard_platform.gypi b/starboard/linux/shared/starboard_platform.gypi
index b245f3a..fef07e1 100644
--- a/starboard/linux/shared/starboard_platform.gypi
+++ b/starboard/linux/shared/starboard_platform.gypi
@@ -40,8 +40,6 @@
       '<(DEPTH)/starboard/linux/shared/player_components_factory.cc',
       '<(DEPTH)/starboard/linux/shared/routes.cc',
       '<(DEPTH)/starboard/linux/shared/routes.h',
-      '<(DEPTH)/starboard/linux/shared/soft_mic_platform_service.cc',
-      '<(DEPTH)/starboard/linux/shared/soft_mic_platform_service.h',
       '<(DEPTH)/starboard/linux/shared/system_get_connection_type.cc',
       '<(DEPTH)/starboard/linux/shared/system_get_device_type.cc',
       '<(DEPTH)/starboard/linux/shared/system_get_extensions.cc',
diff --git a/starboard/linux/shared/system_get_extensions.cc b/starboard/linux/shared/system_get_extensions.cc
index 0a154b2..3411d93 100644
--- a/starboard/linux/shared/system_get_extensions.cc
+++ b/starboard/linux/shared/system_get_extensions.cc
@@ -17,9 +17,7 @@
 #include "cobalt/extension/configuration.h"
 #include "cobalt/extension/crash_handler.h"
 #include "cobalt/extension/memory_mapped_file.h"
-#include "cobalt/extension/platform_service.h"
 #include "starboard/common/string.h"
-#include "starboard/linux/shared/soft_mic_platform_service.h"
 #include "starboard/shared/posix/memory_mapped_file.h"
 #include "starboard/shared/starboard/crash_handler.h"
 #if SB_IS(EVERGREEN_COMPATIBLE)
@@ -39,9 +37,6 @@
     }
   }
 #endif
-  if (strcmp(name, kCobaltExtensionPlatformServiceName) == 0) {
-    return starboard::shared::GetPlatformServiceApi();
-  }
   if (strcmp(name, kCobaltExtensionConfigurationName) == 0) {
     return starboard::shared::GetConfigurationApi();
   }
diff --git a/starboard/loader_app/BUILD.gn b/starboard/loader_app/BUILD.gn
index 481ccc8..9ce5395 100644
--- a/starboard/loader_app/BUILD.gn
+++ b/starboard/loader_app/BUILD.gn
@@ -39,6 +39,7 @@
       "//cobalt/content/fonts:copy_font_data",
       "//starboard/elf_loader",
     ]
+    deps += cobalt_platform_dependencies
   }
 }
 
@@ -58,6 +59,7 @@
       "//cobalt/content/fonts:copy_font_data",
       "//starboard/elf_loader:elf_loader_sys",
     ]
+    deps += cobalt_platform_dependencies
   }
 }
 
diff --git a/starboard/nplb/BUILD.gn b/starboard/nplb/BUILD.gn
index db60e73..6ca3e60 100644
--- a/starboard/nplb/BUILD.gn
+++ b/starboard/nplb/BUILD.gn
@@ -271,6 +271,7 @@
   }
 
   deps = [ "//starboard/nplb/testdata/file_tests:nplb_file_tests_data" ]
+  deps += cobalt_platform_dependencies
 
   if (is_internal_build) {
     deps += [ "//starboard/private/nplb:nplb_private" ]
diff --git a/starboard/nplb/media_can_play_mime_and_key_system_test.cc b/starboard/nplb/media_can_play_mime_and_key_system_test.cc
index 4c7457c..4c94240 100644
--- a/starboard/nplb/media_can_play_mime_and_key_system_test.cc
+++ b/starboard/nplb/media_can_play_mime_and_key_system_test.cc
@@ -12,10 +12,13 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "starboard/nplb/media_can_play_mime_and_key_system_test_helpers.h"
+
 #include "starboard/common/string.h"
 #include "starboard/media.h"
 #include "starboard/nplb/drm_helpers.h"
 #include "starboard/nplb/performance_helpers.h"
+#include "starboard/time.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace starboard {
@@ -789,9 +792,32 @@
 }
 
 TEST(SbMediaCanPlayMimeAndKeySystem, ValidatePerformance) {
-  TEST_PERF_FUNCWITHARGS_DEFAULT(
-      SbMediaCanPlayMimeAndKeySystem,
-      "video/webm; codecs=\"vp9\"; width=256; height=144; framerate=30", "");
+  auto test_sequential_function_calls =
+      [](const char** mime_params, int num_function_calls,
+         SbTimeMonotonic max_time_delta, const char* query_type) {
+        const SbTimeMonotonic time_start = SbTimeGetMonotonicNow();
+        for (int i = 0; i < num_function_calls; ++i) {
+          SbMediaCanPlayMimeAndKeySystem(mime_params[i], "");
+        }
+        const SbTimeMonotonic time_last = SbTimeGetMonotonicNow();
+        const SbTimeMonotonic time_delta = time_last - time_start;
+        const double time_per_call =
+            static_cast<double>(time_delta) / num_function_calls;
+
+        SB_LOG(INFO) << "SbMediaCanPlayMimeAndKeySystem - " << query_type
+                     << " measured duration " << time_delta
+                     << "us total across " << num_function_calls << " calls.";
+        SB_LOG(INFO) << "  Measured duration " << time_per_call
+                     << "us average per call.";
+        EXPECT_LE(time_delta, max_time_delta);
+      };
+
+  test_sequential_function_calls(kSdrQueryParams,
+                                 SB_ARRAY_SIZE_INT(kSdrQueryParams),
+                                 10 * kSbTimeMillisecond, "SDR queries");
+  test_sequential_function_calls(kHdrQueryParams,
+                                 SB_ARRAY_SIZE_INT(kHdrQueryParams),
+                                 20 * kSbTimeMillisecond, "HDR queries");
 }
 
 }  // namespace
diff --git a/starboard/nplb/media_can_play_mime_and_key_system_test_helpers.h b/starboard/nplb/media_can_play_mime_and_key_system_test_helpers.h
new file mode 100644
index 0000000..a48201a
--- /dev/null
+++ b/starboard/nplb/media_can_play_mime_and_key_system_test_helpers.h
@@ -0,0 +1,211 @@
+// Copyright 2021 The Cobalt Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STARBOARD_NPLB_MEDIA_CAN_PLAY_MIME_AND_KEY_SYSTEM_TEST_HELPERS_H_
+#define STARBOARD_NPLB_MEDIA_CAN_PLAY_MIME_AND_KEY_SYSTEM_TEST_HELPERS_H_
+
+namespace starboard {
+namespace nplb {
+
+// Query params from https://youtu.be/iXvy8ZeCs5M.
+static const char* kSdrQueryParams[] = {
+    "video/mp4; codecs=\"avc1.42001E\"",
+    "audio/mp4; codecs=\"mp4a.40.2\"",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.99.99.00\"",
+    "audio/webm; codecs=\"opus\"",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "audio/webm; codecs=\"opus\"; channels=99",
+    "video/mp4; codecs=av01.0.05M.08",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; width=640",
+    "video/webm; codecs=\"vp9\"; width=99999",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; height=360",
+    "video/webm; codecs=\"vp9\"; height=99999",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; framerate=30",
+    "video/webm; codecs=\"vp9\"; framerate=9999",
+    "video/webm; codecs=\"vp9\"; width=3840; height=2160; bitrate=2000000",
+    "video/webm; codecs=\"vp9\"; width=3840; height=2160; bitrate=20000000",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; bitrate=300000",
+    "video/webm; codecs=\"vp9\"; bitrate=2000000000",
+    "video/mp4; codecs=\"avc1.4d4015\"; width=426; height=240; framerate=24; "
+    "bitrate=233713",
+    "video/mp4; codecs=\"avc1.4d401e\"; width=640; height=360; framerate=24; "
+    "bitrate=422012",
+    "audio/mp4; codecs=\"mp4a.40.2\"; channels=2",
+    "video/mp4; codecs=\"avc1.4d400c\"; width=256; height=144; framerate=24; "
+    "bitrate=110487",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; eotf=bt709",
+    "video/webm; codecs=\"vp9\"; eotf=catavision",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=426; "
+    "height=240; framerate=24; bitrate=191916; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=640; "
+    "height=360; framerate=24; bitrate=400973; eotf=bt709",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "video/mp4; codecs=\"av01.0.00M.08\"; width=256; height=144; framerate=24; "
+    "bitrate=76146; eotf=bt709",
+    "video/mp4; codecs=\"av01.0.00M.08\"; width=426; height=240; framerate=24; "
+    "bitrate=156234; eotf=bt709",
+    "video/mp4; codecs=\"av01.0.01M.08\"; width=640; height=360; framerate=24; "
+    "bitrate=302046; eotf=bt709",
+    "audio/webm; codecs=\"opus\"",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\""};
+
+// Query params from https://youtu.be/1La4QzGeaaQ.
+static const char* kHdrQueryParams[] = {
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.99.99.00\"",
+    "audio/webm; codecs=\"opus\"",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "audio/webm; codecs=\"opus\"; channels=99",
+    "video/mp4; codecs=av01.0.05M.08",
+    "video/mp4; codecs=av99.0.05M.08",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; height=360",
+    "video/webm; codecs=\"vp9\"; height=99999",
+    "video/webm; codecs=\"vp9\"; width=3840; height=2160; bitrate=2000000",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; bitrate=300000",
+    "video/webm; codecs=\"vp9\"; bitrate=2000000000",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; width=640",
+    "video/webm; codecs=\"vp9\"; width=99999",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; framerate=30",
+    "video/webm; codecs=\"vp9\"; framerate=9999",
+    "video/mp4; codecs=\"avc1.4d4015\"; width=426; height=240; framerate=30; "
+    "bitrate=296736",
+    "video/mp4; codecs=\"avc1.4d401e\"; width=640; height=360; framerate=30; "
+    "bitrate=700126",
+    "video/mp4; codecs=\"avc1.4d401f\"; width=854; height=480; framerate=30; "
+    "bitrate=1357113",
+    "video/mp4; codecs=\"avc1.4d401f\"; width=1280; height=720; framerate=30; "
+    "bitrate=2723992",
+    "audio/mp4; codecs=\"mp4a.40.2\"; channels=2",
+    "video/mp4; codecs=\"avc1.4d400c\"; width=256; height=144; framerate=30; "
+    "bitrate=123753",
+    "video/webm; codecs=\"vp9\"",
+    "video/webm; codecs=\"vp9\"; eotf=bt709",
+    "video/webm; codecs=\"vp9\"; eotf=catavision",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=426; "
+    "height=240; framerate=30; bitrate=202710; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=640; "
+    "height=360; framerate=30; bitrate=427339; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=854; "
+    "height=480; framerate=30; bitrate=782821; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=1280; "
+    "height=720; framerate=30; bitrate=1542503; eotf=bt709",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "video/mp4; codecs=\"avc1.4d4020\"; width=1280; height=720; framerate=60; "
+    "bitrate=3488936",
+    "video/mp4; codecs=\"avc1.64002a\"; width=1920; height=1080; framerate=60; "
+    "bitrate=5833750",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=1280; "
+    "height=720; framerate=60; bitrate=2676194; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=1920; "
+    "height=1080; framerate=60; bitrate=4461346; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=2560; "
+    "height=1440; framerate=60; bitrate=13384663; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=3840; "
+    "height=2160; framerate=60; bitrate=26752474; eotf=bt709",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=256; "
+    "height=144; framerate=60; bitrate=245561",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=426; "
+    "height=240; framerate=60; bitrate=500223",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=640; "
+    "height=360; framerate=60; bitrate=1064485",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=854; "
+    "height=480; framerate=60; bitrate=1998847",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=1280; "
+    "height=720; framerate=60; bitrate=4556353",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=1920; "
+    "height=1080; framerate=60; bitrate=6946958",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=2560; "
+    "height=1440; framerate=60; bitrate=16930005",
+    "video/webm; codecs=\"vp09.02.51.10.01.09.16.09.00\"; width=3840; "
+    "height=2160; framerate=60; bitrate=30184402",
+    "video/mp4; codecs=\"av01.0.00M.10.0.110.09.16.09.0\"; width=256; "
+    "height=144; framerate=30; bitrate=89195; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.00M.10.0.110.09.16.09.0\"; width=426; "
+    "height=240; framerate=30; bitrate=172861; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.01M.10.0.110.09.16.09.0\"; width=640; "
+    "height=360; framerate=30; bitrate=369517; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.04M.10.0.110.09.16.09.0\"; width=854; "
+    "height=480; framerate=30; bitrate=695606; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.08M.10.0.110.09.16.09.0\"; width=1280; "
+    "height=720; framerate=60; bitrate=2017563; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.09M.10.0.110.09.16.09.0\"; width=1920; "
+    "height=1080; framerate=60; bitrate=3755257; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.12M.10.0.110.09.16.09.0\"; width=2560; "
+    "height=1440; framerate=60; bitrate=8546165; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.13M.10.0.110.09.16.09.0\"; width=3840; "
+    "height=2160; framerate=60; bitrate=17537773; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.17M.10.0.110.09.16.09.0\"; width=7680; "
+    "height=4320; framerate=60; bitrate=37270368; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.00M.10.0.110.09.16.09.0\"; width=256; "
+    "height=144; framerate=60; bitrate=193907; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.01M.10.0.110.09.16.09.0\"; width=426; "
+    "height=240; framerate=60; bitrate=400353; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.04M.10.0.110.09.16.09.0\"; width=640; "
+    "height=360; framerate=60; bitrate=817812; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.05M.10.0.110.09.16.09.0\"; width=854; "
+    "height=480; framerate=60; bitrate=1558025; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.08M.10.0.110.09.16.09.0\"; width=1280; "
+    "height=720; framerate=60; bitrate=4167668; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.09M.10.0.110.09.16.09.0\"; width=1920; "
+    "height=1080; framerate=60; bitrate=6870811; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.12M.10.0.110.09.16.09.0\"; width=2560; "
+    "height=1440; framerate=60; bitrate=17316706; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.13M.10.0.110.09.16.09.0\"; width=3840; "
+    "height=2160; framerate=60; bitrate=31942925; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.17M.10.0.110.09.16.09.0\"; width=7680; "
+    "height=4320; framerate=60; bitrate=66038840; eotf=smpte2084",
+    "video/mp4; codecs=\"av01.0.17M.10.0.110.09.16.09.0\"; width=7680; "
+    "height=4320; framerate=60; bitrate=45923436; eotf=smpte2084",
+    "video/mp4; codecs=\"avc1.4d4015\"; width=426; height=240; framerate=24; "
+    "bitrate=160590",
+    "video/mp4; codecs=\"avc1.4d401e\"; width=640; height=360; framerate=24; "
+    "bitrate=255156",
+    "video/mp4; codecs=\"avc1.4d401e\"; width=854; height=480; framerate=24; "
+    "bitrate=490890",
+    "video/mp4; codecs=\"avc1.4d401f\"; width=1280; height=720; framerate=24; "
+    "bitrate=1000556",
+    "video/mp4; codecs=\"avc1.640028\"; width=1920; height=1080; framerate=24; "
+    "bitrate=1810004",
+    "audio/mp4; codecs=\"mp4a.40.2\"; channels=2",
+    "video/mp4; codecs=\"avc1.4d400c\"; width=256; height=144; framerate=24; "
+    "bitrate=82746",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=426; "
+    "height=240; framerate=24; bitrate=178701; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=640; "
+    "height=360; framerate=24; bitrate=371303; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=854; "
+    "height=480; framerate=24; bitrate=579918; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=1280; "
+    "height=720; framerate=24; bitrate=999223; eotf=bt709",
+    "video/webm; codecs=\"vp09.00.51.08.01.01.01.01.00\"; width=1920; "
+    "height=1080; framerate=24; bitrate=1814623; eotf=bt709",
+    "audio/webm; codecs=\"opus\"; channels=2",
+    "audio/webm; codecs=\"opus\"; channels=2"};
+
+}  // namespace nplb
+}  // namespace starboard
+
+#endif  // STARBOARD_NPLB_MEDIA_CAN_PLAY_MIME_AND_KEY_SYSTEM_TEST_HELPERS_H_
diff --git a/starboard/nplb/nplb.gyp b/starboard/nplb/nplb.gyp
index 3d496e3..3d9fe68 100644
--- a/starboard/nplb/nplb.gyp
+++ b/starboard/nplb/nplb.gyp
@@ -126,6 +126,7 @@
         # files.
         'media_buffer_test.cc',
         'media_can_play_mime_and_key_system_test.cc',
+        'media_can_play_mime_and_key_system_test_helpers.h',
         'media_configuration_test.cc',
         'memory_align_to_page_size_test.cc',
         'memory_allocate_aligned_test.cc',
diff --git a/starboard/shared/starboard/player/filter/testing/BUILD.gn b/starboard/shared/starboard/player/filter/testing/BUILD.gn
index c1d4ba7..755b4e4 100644
--- a/starboard/shared/starboard/player/filter/testing/BUILD.gn
+++ b/starboard/shared/starboard/player/filter/testing/BUILD.gn
@@ -38,6 +38,8 @@
     "//starboard/shared/starboard/media:media_util",
     "//testing/gmock",
   ]
+
+  deps = cobalt_platform_dependencies
 }
 
 if (!is_win) {
@@ -53,6 +55,8 @@
       ":test_util",
       "//third_party/google_benchmark",
     ]
+
+    deps = cobalt_platform_dependencies
   }
 }
 
diff --git a/starboard/shared/starboard/player/player_worker.cc b/starboard/shared/starboard/player/player_worker.cc
index a17ab85..5ab9a8a 100644
--- a/starboard/shared/starboard/player/player_worker.cc
+++ b/starboard/shared/starboard/player/player_worker.cc
@@ -216,9 +216,13 @@
   SB_DCHECK(job_queue_->BelongsToCurrentThread());
 
   SB_DCHECK(player_state_ != kSbPlayerStateDestroyed);
-  SB_DCHECK(!error_occurred_);
   SB_DCHECK(ticket_ != ticket);
 
+  if (error_occurred_) {
+    SB_LOG(ERROR) << "Tried to seek after error occurred.";
+    return;
+  }
+
   SB_DLOG(INFO) << "Try to seek to " << seek_to_time << " microseconds.";
 
   if (write_pending_sample_job_token_.is_valid()) {
diff --git a/starboard/stub/platform_configuration/BUILD.gn b/starboard/stub/platform_configuration/BUILD.gn
index f897308..ab1385e 100644
--- a/starboard/stub/platform_configuration/BUILD.gn
+++ b/starboard/stub/platform_configuration/BUILD.gn
@@ -22,6 +22,7 @@
       "-Wno-unused-parameter",
     ]
   } else {
+    cflags_cc = [ "-std=gnu++14" ]
     ldflags = [ "-static-libstdc++" ]
 
     if (is_debug) {
diff --git a/third_party/crashpad/compat/linux/sys/mman.cc b/third_party/crashpad/compat/linux/sys/mman.cc
index 12aaa2c..044dbca 100644
--- a/third_party/crashpad/compat/linux/sys/mman.cc
+++ b/third_party/crashpad/compat/linux/sys/mman.cc
@@ -22,7 +22,7 @@
 
 extern "C" {
 
-int memfd_create(const char* name, unsigned int flags) {
+int memfd_create(const char* name, unsigned int flags) __THROW {
   using MemfdCreateType = int (*)(const char*, int);
   static const MemfdCreateType next_memfd_create =
       reinterpret_cast<MemfdCreateType>(dlsym(RTLD_NEXT, "memfd_create"));
diff --git a/third_party/crashpad/compat/linux/sys/mman.h b/third_party/crashpad/compat/linux/sys/mman.h
index 61c55d7..43155da 100644
--- a/third_party/crashpad/compat/linux/sys/mman.h
+++ b/third_party/crashpad/compat/linux/sys/mman.h
@@ -29,7 +29,7 @@
 extern "C" {
 #endif
 
-int memfd_create(const char* name, unsigned int flags);
+int memfd_create(const char* name, unsigned int flags) __THROW;
 
 #ifdef __cplusplus
 }  // extern "C"
diff --git a/third_party/devtools/BUILD.gn b/third_party/devtools/BUILD.gn
index e505be2..f12b7e1 100644
--- a/third_party/devtools/BUILD.gn
+++ b/third_party/devtools/BUILD.gn
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-import("//third_party/blink/public/public_features.gni")
+import("//third_party/devtools/third_party/blink/public/public_features.gni")
 
 all_devtools_files = [
   "front_end/accessibility/accessibilityNode.css",
@@ -1128,6 +1128,10 @@
   "front_end/test_runner/module.json",
 ]
 
+if (is_starboard) {
+  devtools_test_files -= [ "//third_party/axe-core/axe.js" ]
+}
+
 devtools_embedder_scripts = [
   "front_end/devtools_compatibility.js",
   "front_end/Tests.js",
@@ -1782,6 +1786,18 @@
   "$resources_out_dir/worker_app.js",
 ]
 
+if (is_starboard) {
+  generated_applications -= [
+    "$resources_out_dir/audits_worker.js",
+    "$resources_out_dir/js_app.html",
+    "$resources_out_dir/js_app.js",
+    "$resources_out_dir/node_app.html",
+    "$resources_out_dir/node_app.js",
+    "$resources_out_dir/toolbox.html",
+    "$resources_out_dir/toolbox.js",
+  ]
+}
+
 generated_non_autostart_non_remote_modules = [
   "$resources_out_dir/animation/animation_module.js",
   "$resources_out_dir/audits/audits_module.js",
@@ -1884,6 +1900,17 @@
   "worker_app",
 ]
 
+if (is_starboard) {
+  devtools_applications -= [
+    "audits_worker",
+    "integration_test_runner",
+    "js_app",
+    "ndb_app",
+    "node_app",
+    "toolbox",
+  ]
+}
+
 #-------------------------------------------------------------------------------
 
 group("devtools_all_files") {
@@ -1912,6 +1939,18 @@
   ":copy_devtools_modules",
 ]
 
+if (is_starboard) {
+  devtools_frontend_resources_deps -= [
+    ":aria_properties",
+    ":copy_embedder_scripts",
+    ":copy_emulated_devices_images",
+    ":copy_htaccess",
+    ":copy_lighthouse_locale_files",
+    ":copy_wasm_deps",
+    ":devtools_extension_api",
+  ]
+}
+
 if (debug_devtools) {
   devtools_frontend_resources_deps += [
     ":build_debug_devtools",
@@ -1975,41 +2014,43 @@
   ]
 }
 
-action("generate_devtools_grd") {
-  script = "scripts/build/generate_devtools_grd.py"
+if (!is_starboard) {
+  action("generate_devtools_grd") {
+    script = "scripts/build/generate_devtools_grd.py"
 
-  deps = [
-    ":devtools_frontend_resources",
-  ]
+    deps = [
+      ":devtools_frontend_resources",
+    ]
 
-  grd_files =
-      copied_devtools_modules + generated_applications +
-      generated_non_autostart_non_remote_modules + devtools_embedder_scripts +
-      generated_scripts + generated_worker_bundles +
-      [
-        "$resources_out_dir/devtools_extension_api.js",
-        "$resources_out_dir/sdk/wasm_source_map/pkg/wasm_source_map_bg.wasm",
-      ]
+    grd_files =
+        copied_devtools_modules + generated_applications +
+        generated_non_autostart_non_remote_modules + devtools_embedder_scripts +
+        generated_scripts + generated_worker_bundles +
+        [
+          "$resources_out_dir/devtools_extension_api.js",
+          "$resources_out_dir/sdk/wasm_source_map/pkg/wasm_source_map_bg.wasm",
+        ]
 
-  inputs = grd_files + devtools_image_files
-  outfile = "$root_gen_dir/devtools/devtools_resources.grd"
-  outputs = [
-    outfile,
-  ]
+    inputs = grd_files + devtools_image_files
+    outfile = "$root_gen_dir/devtools/devtools_resources.grd"
+    outputs = [
+      outfile,
+    ]
 
-  relative_path_dirs = [
-    resources_out_dir,
-    "front_end",
-  ]
+    relative_path_dirs = [
+      resources_out_dir,
+      "front_end",
+    ]
 
-  args = rebase_path(grd_files, root_build_dir) + [ "--relative_path_dirs" ] +
-         rebase_path(relative_path_dirs, root_build_dir) +
-         [
-           "--images",
-           rebase_path("front_end/Images", root_build_dir),
-           "--output",
-           rebase_path(outfile, root_build_dir),
-         ]
+    args = rebase_path(grd_files, root_build_dir) + [ "--relative_path_dirs" ] +
+          rebase_path(relative_path_dirs, root_build_dir) +
+          [
+            "--images",
+            rebase_path("front_end/Images", root_build_dir),
+            "--output",
+            rebase_path(outfile, root_build_dir),
+          ]
+  }
 }
 
 action("devtools_extension_api") {
@@ -2028,9 +2069,15 @@
 action("supported_css_properties") {
   script = "scripts/build/generate_supported_css.py"
 
-  inputs = [
-    "//third_party/blink/renderer/core/css/css_properties.json5",
-  ]
+  if (is_starboard) {
+    inputs = [
+      "blink/properties/CSSProperties.json5",
+    ]
+  } else {
+    inputs = [
+      "//third_party/blink/renderer/core/css/css_properties.json5",
+    ]
+  }
 
   outputs = [
     "$resources_out_dir/SupportedCSSProperties.js",
@@ -2040,26 +2087,34 @@
       rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
 }
 
-action("aria_properties") {
-  script = "scripts/build/generate_aria.py"
+if (!is_starboard) {
+  action("aria_properties") {
+    script = "scripts/build/generate_aria.py"
 
-  inputs = [
-    "//third_party/blink/renderer/core/html/aria_properties.json5",
-  ]
+    inputs = [
+      "//third_party/blink/renderer/core/html/aria_properties.json5",
+    ]
 
-  outputs = [
-    "$resources_out_dir/accessibility/ARIAProperties.js",
-  ]
+    outputs = [
+      "$resources_out_dir/accessibility/ARIAProperties.js",
+    ]
 
-  args =
-      rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
+    args =
+        rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
+  }
 }
 
 action("frontend_protocol_sources") {
   script = "scripts/build/code_generator_frontend.py"
-  deps = [
-    "//third_party/blink/public/devtools_protocol:protocol_version",
-  ]
+  if (is_starboard) {
+    deps = [
+      "third_party/blink/public/devtools_protocol:protocol_version",
+    ]
+  } else {
+    deps = [
+      "//third_party/blink/public/devtools_protocol:protocol_version",
+    ]
+  }
   inputs = [
     "$root_gen_dir/third_party/blink/public/devtools_protocol/protocol.json",
   ]
@@ -2074,7 +2129,8 @@
 }
 
 action("build_release_devtools") {
-  script = "scripts/build/build_release_applications.py"
+  script = "//starboard/build/run_bash.py"
+  py_script = "scripts/build/build_release_applications.py"
 
   deps = [
     ":aria_properties",
@@ -2082,6 +2138,10 @@
     ":supported_css_properties",
   ]
 
+  if (is_starboard) {
+    deps -= [ ":aria_properties" ]
+  }
+
   helper_scripts = [
     "scripts/build/modular_build.py",
     "scripts/build/rjsmin.py",
@@ -2098,7 +2158,17 @@
       generated_remote_modules + generated_test_modules +
       generated_worker_bundles
 
-  args = devtools_applications + [
+  if (is_starboard) {
+    inputs -= generated_aria_properties
+    outputs -= generated_remote_modules
+    outputs -= generated_test_modules
+  }
+
+  args = [
+           "python2",
+           rebase_path(py_script, root_build_dir),
+         ] + devtools_applications +
+         [
            "--input_path",
            rebase_path("front_end", root_build_dir),
            "--output_path",
@@ -2107,7 +2177,8 @@
 }
 
 action("copy_devtools_modules") {
-  script = "scripts/build/copy_devtools_modules.py"
+  script = "//starboard/build/run_bash.py"
+  py_script = "scripts/build/copy_devtools_modules.py"
 
   deps = [
     ":build_release_devtools",
@@ -2116,7 +2187,11 @@
   inputs = all_devtools_modules
   outputs = copied_devtools_modules
 
-  args = all_devtools_modules + [
+  args = [
+           "python2",
+           rebase_path(py_script, root_build_dir),
+         ] + all_devtools_modules +
+         [
            "--input_path",
            rebase_path(".", root_build_dir),
            "--output_path",
diff --git a/third_party/devtools/scripts/build/generate_supported_css.py b/third_party/devtools/scripts/build/generate_supported_css.py
index 6df3086..3077c05 100755
--- a/third_party/devtools/scripts/build/generate_supported_css.py
+++ b/third_party/devtools/scripts/build/generate_supported_css.py
@@ -38,7 +38,7 @@
 
 
 def _keep_only_required_keys(entry):
-    for key in entry.keys():
+    for key in list(entry.keys()):
         if key not in ("name", "longhands", "svg", "inherited", "keywords"):
             del entry[key]
     return entry
diff --git a/third_party/devtools/third_party/blink/public/devtools_protocol/BUILD.gn b/third_party/devtools/third_party/blink/public/devtools_protocol/BUILD.gn
index 66e0c36..f5bec1c 100644
--- a/third_party/devtools/third_party/blink/public/devtools_protocol/BUILD.gn
+++ b/third_party/devtools/third_party/blink/public/devtools_protocol/BUILD.gn
@@ -2,8 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-browser_protocol_pdl = "//third_party/blink/public/devtools_protocol/browser_protocol.pdl"
-js_protocol_pdl = "//v8/include/js_protocol.pdl"
+browser_protocol_pdl = "//third_party/devtools/third_party/blink/public/devtools_protocol/browser_protocol.pdl"
+js_protocol_pdl = "//third_party/v8/include/js_protocol.pdl"
 
 action("protocol_version") {
   script = "//third_party/inspector_protocol/concatenate_protocols.py"
diff --git a/third_party/icu/BUILD.gn b/third_party/icu/BUILD.gn
index c36739b..8c9c1a1 100644
--- a/third_party/icu/BUILD.gn
+++ b/third_party/icu/BUILD.gn
@@ -14,6 +14,10 @@
   import("//build/config/sanitizers/sanitizers.gni")
 }
 
+if (is_starboard) {
+  import("//cobalt/build/contents_dir.gni")
+}
+
 assert(!icu_disable_thin_archive || !is_component_build,
        "icu_disable_thin_archive only works in static library builds")
 
@@ -53,6 +57,14 @@
     "UCONFIG_NO_REGULAR_EXPRESSIONS"
   ]
 
+  if (is_starboard) {
+    defines -= [
+      "USE_CHROMIUM_ICU=1",
+      "U_ENABLE_TRACING=1",
+      "U_ENABLE_RESOURCE_TRACING=0",
+    ]
+  }
+
   if (!is_component_build) {
     defines += [ "U_STATIC_IMPLEMENTATION" ]
   }
@@ -373,7 +385,16 @@
 data_bundle = "${data_bundle_prefix}.dat"
 
 if (icu_use_data_file) {
-  if (is_ios) {
+  if (is_starboard) {
+    not_needed([ "data_bundle", "data_dir" ])
+    copy("icudata") {
+      filename = "icudt68l.dat"
+      sources = [ "$static_contents_source_dir/icu/$filename"]
+      output = "$sb_static_contents_output_data_dir/icu/$filename"
+      outputs = [ output ]
+      data = [ output ]
+    }
+  } else if (is_ios) {
     bundle_data("icudata") {
       sources = [ "$data_dir/$data_bundle" ]
       outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
diff --git a/third_party/libjpeg-turbo/BUILD.gn b/third_party/libjpeg-turbo/BUILD.gn
index ab09f6e..c8905a5 100644
--- a/third_party/libjpeg-turbo/BUILD.gn
+++ b/third_party/libjpeg-turbo/BUILD.gn
@@ -31,7 +31,7 @@
   }
 }
 
-if (current_cpu == "x86" || current_cpu == "x64") {
+if (yasm_exists && (current_cpu == "x86" || current_cpu == "x64")) {
   if (is_starboard) {
     import("//starboard/build/nasm_assemble.gni")
   } else {
@@ -150,10 +150,10 @@
   include_dirs = [ "." ]
   deps = [ ":libjpeg_headers" ]
 
-  if (current_cpu == "x86") {
+  if (current_cpu == "x86" && yasm_exists) {
     deps += [ ":simd_asm" ]
     sources = [ "simd/i386/jsimd.c" ]
-  } else if (current_cpu == "x64") {
+  } else if (current_cpu == "x64" && yasm_exists) {
     deps += [ ":simd_asm" ]
     sources = [ "simd/x86_64/jsimd.c" ]
   } else if ((current_cpu == "arm" || current_cpu == "arm64") && arm_use_neon) {
@@ -188,7 +188,9 @@
 
     defines = [ "NEON_INTRINSICS" ]
 
-    configs -= [ "//build/config/compiler:default_optimization" ]
+    if (!is_starboard) {
+      configs -= [ "//build/config/compiler:default_optimization" ]
+    }
     configs += [ "//build/config/compiler:optimize_speed" ]
   } else {
     sources = [ "jsimd_none.c" ]
@@ -224,7 +226,9 @@
     "jctrans.c",
     "jdapimin.c",
     "jdapistd.c",
+    "jdatadst-tj.c",
     "jdatadst.c",
+    "jdatasrc-tj.c",
     "jdatasrc.c",
     "jdcoefct.c",
     "jdcolor.c",
@@ -254,6 +258,8 @@
     "jquant1.c",
     "jquant2.c",
     "jutils.c",
+    "transupp.c",
+    "turbojpeg.c",
   ]
 
   defines = [
@@ -267,12 +273,14 @@
       "jcarith.c",
       "jdarith.c",
     ]
+
     # These dependencies are needed for file io
     # and are not currently used by Cobalt
     sources -= [
       "jdatadst.c",
       "jdatasrc.c",
     ]
+
     # This is defined in code.
     defines -= [ "NO_GETENV" ]
   }
diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn
index cc230d2..1f249ba 100644
--- a/third_party/libxml/BUILD.gn
+++ b/third_party/libxml/BUILD.gn
@@ -150,6 +150,7 @@
     visibility += [
       "//base/test:test_support",
       "//cobalt/base",
+      "//cobalt/dom_parser",
       "//cobalt/renderer/rasterizer/skia/skia",
     ]
   }
@@ -247,7 +248,7 @@
     "src/parserInternals.c",
     "src/pattern.c",
 
-    #"src/relaxng.c",
+    "src/relaxng.c",
     "src/save.h",
 
     #"src/schematron.c",
@@ -276,17 +277,17 @@
     #"src/xmlmodule.c",
     "src/xmlreader.c",
 
-    #"src/xmlregexp.c",
+    "src/xmlregexp.c",
     "src/xmlsave.c",
 
-    #"src/xmlschemas.c",
-    #"src/xmlschemastypes.c",
+    "src/xmlschemas.c",
+    "src/xmlschemastypes.c",
     "src/xmlstring.c",
     "src/xmlunicode.c",
     "src/xmlwriter.c",
     "src/xpath.c",
 
-    #"src/xpointer.c",
+    "src/xpointer.c",
     #"src/xzlib.c",
     "src/xzlib.h",
     "win32/config.h",
diff --git a/third_party/llvm-project/libcxx/BUILD.gn b/third_party/llvm-project/libcxx/BUILD.gn
index 60c976e..83f05f6 100644
--- a/third_party/llvm-project/libcxx/BUILD.gn
+++ b/third_party/llvm-project/libcxx/BUILD.gn
@@ -51,10 +51,6 @@
 
 static_library("cxx") {
   sources = [
-    "include/apple_availability.h",
-    "include/atomic_support.h",
-    "include/config_elast.h",
-    "include/refstring.h",
     "src/algorithm.cpp",
     "src/any.cpp",
     "src/bind.cpp",
@@ -62,6 +58,10 @@
     "src/chrono.cpp",
     "src/condition_variable.cpp",
     "src/exception.cpp",
+    "src/include/apple_availability.h",
+    "src/include/atomic_support.h",
+    "src/include/config_elast.h",
+    "src/include/refstring.h",
 
     # Remove file system operations
     #"src/filesystem/directory_iterator.cpp",
diff --git a/third_party/llvm-project/libunwind/src/AddressSpace.hpp b/third_party/llvm-project/libunwind/src/AddressSpace.hpp
index 08dc656..cf12cf4 100644
--- a/third_party/llvm-project/libunwind/src/AddressSpace.hpp
+++ b/third_party/llvm-project/libunwind/src/AddressSpace.hpp
@@ -45,7 +45,7 @@
 
 #if defined(STARBOARD_IMPLEMENTATION)
 #include "starboard/memory.h"
-#include "starboard/elf_loader/evergreen_info.h"
+#include "starboard/elf_loader/evergreen_info.h"  // nogncheck
 #endif
 
 #ifdef __APPLE__
diff --git a/third_party/musl/BUILD.gn b/third_party/musl/BUILD.gn
index 08059c2..a3b98a6 100644
--- a/third_party/musl/BUILD.gn
+++ b/third_party/musl/BUILD.gn
@@ -499,6 +499,11 @@
       "src/string/memset.c",
     ]
   }
+
+  deps = [
+    "//starboard:starboard_headers_only",
+    "//starboard/common:common_headers_only",
+  ]
 }
 
 target(gtest_target_type, "musl_unittests") {
diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn
index 46161c7..a377526 100644
--- a/third_party/protobuf/BUILD.gn
+++ b/third_party/protobuf/BUILD.gn
@@ -178,7 +178,10 @@
     "//build/config/compiler:no_size_t_to_int_warning",
   ]
 
-  if (!is_starboard) {
+  if (is_starboard) {
+    public_configs -= [ ":protobuf_config" ]
+    all_dependent_configs = [ ":protobuf_config" ]
+  } else {
     deps = [
       "//build/config/sanitizers:deps",
     ]
diff --git a/third_party/skia/gn/effects_imagefilters.gni b/third_party/skia/gn/effects_imagefilters.gni
index 8a477a2..46448c2 100644
--- a/third_party/skia/gn/effects_imagefilters.gni
+++ b/third_party/skia/gn/effects_imagefilters.gni
@@ -28,7 +28,6 @@
 skia_effects_imagefilter_sources = [
   "$_src/effects/imagefilters/SkAlphaThresholdFilter.cpp",
   "$_src/effects/imagefilters/SkArithmeticImageFilter.cpp",
-  "$_src/effects/imagefilters/SkBlurImageFilter.cpp",
   "$_src/effects/imagefilters/SkColorFilterImageFilter.cpp",
   "$_src/effects/imagefilters/SkComposeImageFilter.cpp",
   "$_src/effects/imagefilters/SkDisplacementMapEffect.cpp",
diff --git a/third_party/woff2/BUILD.gn b/third_party/woff2/BUILD.gn
index 0433da9..8e5c1ba 100644
--- a/third_party/woff2/BUILD.gn
+++ b/third_party/woff2/BUILD.gn
@@ -2,8 +2,6 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-# optimize_target_for_speed
-
 config("woff2_includes") {
   include_dirs = [ "include" ]
 }
@@ -31,6 +29,11 @@
     "//third_party/brotli:dec",
   ]
 
+  if (is_starboard) {
+    configs -= [ "//starboard/build/config:size" ]
+    configs += [ "//starboard/build/config:speed" ]
+  }
+
   public_configs = [ ":woff2_includes" ]
 
   # TODO(ksakamoto): http://crbug.com/167187