Make bots green again: mostly status updates, but also fix check in custom-element upgrades

Change-Id: Ic5e5b58be60261c4843f00eb090e0c1e4ed7e093
Reviewed-on: https://dart-review.googlesource.com/63325
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 768f130..4a4dd6b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -38625,7 +38625,11 @@
   Element upgrade(Element element) {
     // Only exact type matches are supported- cannot be a subclass.
     if (element.runtimeType != _nativeType) {
-      throw new ArgumentError('element $element of type \'${element.runtimeType}\' is not a subclass of $_nativeType');
+      // Some browsers may represent non-upgraded elements <x-foo> as
+      // UnknownElement and not a plain HtmlElement.
+      if (_nativeType != HtmlElement || element.runtimeType != UnknownElement) {
+        throw new ArgumentError('element is not subclass of $_nativeType');
+      }
     }
 
     setNativeSubclassDispatchRecord(element, _interceptor);
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 781b944..96e1f72 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -2467,7 +2467,6 @@
 LayoutTests/fast/css/content/content-normal_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/content/content-quotes-06_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/counters/complex-before_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/css-escaped-identifier_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/css3-nth-tokens-style_t01: RuntimeError # Please triage this failure
@@ -2533,7 +2532,6 @@
 LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-webkit-font-smoothing_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/position-absolute-float_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/css/pseudo-any_t01: RuntimeError # Please triage this failure
@@ -3180,7 +3178,6 @@
 LayoutTests/fast/speechsynthesis/speech-synthesis-voices_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/storage/disallowed-storage_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/sub-pixel/cssom-subpixel-precision_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/svg/getbbox_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/svg/tabindex-focus_t01: RuntimeError # Please triage this failure
@@ -3626,7 +3623,10 @@
 LayoutTests/fast/canvas/webgl/tex-sub-image-2d-bad-args_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/webgl/texture-complete_t01: Skip # Times out sometimes
 LayoutTests/fast/canvas/webgl/texture-npot_t01: Skip # Times out sometimes
+LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError
+LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError
 LayoutTests/fast/forms/submit-form-attributes_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError
 LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError # Dartium JSInterop failure
 LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError # Dartium JSInterop failure
@@ -3642,6 +3642,8 @@
 LayoutTests/fast/forms/submit-form-attributes_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/media/color-does-not-include-alpha_t01: RuntimeError # Issue 31161
 LayoutTests/fast/media/media-query-list_t01: Pass, RuntimeError # Issue 32257
+LibTest/core/Uri/Uri_A06_t03: Pass, Slow
+LibTest/core/Uri/encodeQueryComponent_A01_t02: Pass, Slow
 
 [ $compiler == dart2js && $runtime == ff && $checked ]
 LayoutTests/fast/canvas/webgl/framebuffer-object-attachment_t01: RuntimeError # Please triage this failure
@@ -4038,7 +4040,6 @@
 LayoutTests/fast/css/nested-at-rules_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/nested-rule-parent-sheet_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/overflow-property_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/padding-no-renderer_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/padding-start-end_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-at-rule-recovery_t01: RuntimeError # Please triage this failure
@@ -4285,6 +4286,7 @@
 LayoutTests/fast/dom/Node/contains-method_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Node/fragment-mutation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Node/initial-values_t01: Skip # Times out. Please triage this failure
+LayoutTests/fast/dom/NodeIterator/NodeIterator-basic_t01: RuntimeError
 LayoutTests/fast/dom/NodeList/nodelist-moved-to-fragment-2_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/NodeList/nodelist-reachable_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/13000_t01: RuntimeError # Please triage this failure
@@ -4322,6 +4324,7 @@
 LayoutTests/fast/dom/Text/next-element-sibling_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Text/normalize-crash-in-spell-checker_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Text/previous-element-sibling_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError
 LayoutTests/fast/dom/Window/atob-btoa_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/getMatchedCSSRules-nested-rules_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/getMatchedCSSRules-null-crash_t01: RuntimeError # Please triage this failure
@@ -5887,6 +5890,7 @@
 LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError
 LayoutTests/fast/dom/Window/atob-btoa_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/getMatchedCSSRules-parent-stylesheets_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Window/window-resize-contents_t01: RuntimeError # Please triage this failure
@@ -6150,8 +6154,6 @@
 LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-selection-preservation_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/validationMessage_t01: RuntimeError # Issue 32567
-LayoutTests/fast/forms/validity-property_t01: RuntimeError # co19 issue 140
-LayoutTests/fast/forms/willvalidate_t01: RuntimeError # co19 issue 142
 LayoutTests/fast/html/hidden-attr_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/html/imports/import-element-removed-flag_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/html/imports/import-events_t01: RuntimeError # Please triage this failure
@@ -7055,7 +7057,6 @@
 LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: Crash
 LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash
 LibTest/html/HttpRequest/getString_A01_t01: Crash
-LibTest/html/HttpRequest/overrideMimeType_A01_t01: Crash
 LibTest/html/HttpRequest/request_A01_t01: Crash
 LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash
 LibTest/html/HttpRequest/statusText_A01_t01: Crash
@@ -7104,7 +7105,6 @@
 LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash
 LibTest/html/HttpRequest/getString_A01_t01: Crash
 LibTest/html/HttpRequest/onError_A01_t02: Crash
-LibTest/html/HttpRequest/overrideMimeType_A01_t01: Crash
 LibTest/html/HttpRequest/request_A01_t01: Crash
 LibTest/html/HttpRequest/responseText_A01_t02: Crash
 LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 9dd0262..6ee2255 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -323,6 +323,9 @@
 async/catch_errors11_test: Pass, Timeout # Issue 22696
 async/timer_isActive_test: Fail, Pass, Timeout # Issue 22696
 
+[ $runtime == ff && $system == windows ]
+convert/utf85_test: Pass, Slow, Timeout
+
 [ $runtime != none && !$strong ]
 async/stream_first_where_test: RuntimeError
 async/stream_last_where_test: RuntimeError
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index ad52cb1..ce48337 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -382,6 +382,9 @@
 html/text_event_test: Fail # Issue 17893
 html/webgl_1_test: Pass, Fail # Issue 8219
 
+[ $compiler == dart2js && $runtime == ff && $system == windows ]
+convert/utf85_test: Pass, Slow, Timeout
+
 [ $compiler == dart2js && $runtime == ie11 ]
 html/element_types_content_test: RuntimeError # Issue 29922
 html/element_types_datalist_test: RuntimeError # Issue 29922
diff --git a/tools/dom/src/dart2js_CustomElementSupport.dart b/tools/dom/src/dart2js_CustomElementSupport.dart
index 983ba1a..98c3c24 100644
--- a/tools/dom/src/dart2js_CustomElementSupport.dart
+++ b/tools/dom/src/dart2js_CustomElementSupport.dart
@@ -200,7 +200,11 @@
   Element upgrade(Element element) {
     // Only exact type matches are supported- cannot be a subclass.
     if (element.runtimeType != _nativeType) {
-      throw new ArgumentError('element is not subclass of $_nativeType');
+      // Some browsers may represent non-upgraded elements <x-foo> as
+      // UnknownElement and not a plain HtmlElement.
+      if (_nativeType != HtmlElement || element.runtimeType != UnknownElement) {
+        throw new ArgumentError('element is not subclass of $_nativeType');
+      }
     }
 
     setNativeSubclassDispatchRecord(element, _interceptor);