Skip to content

Commit

Permalink
Revert "Remove several packages from DEPS"
Browse files Browse the repository at this point in the history
Looks like we have tests that require these

This reverts commit 7a9cc03.

Review-Url: https://codereview.chromium.org/2980303002 .
  • Loading branch information
kevmoo committed Jul 18, 2017
1 parent 7a9cc03 commit b6d15d8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 102 deletions.
6 changes: 6 additions & 0 deletions .packages
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ browser:pkg/browser/lib
charcode:third_party/pkg/charcode/lib
charted:third_party/observatory_pub_packages/packages/charted/lib
cli_util:third_party/pkg/cli_util/lib
code_transformers:third_party/pkg/code_transformers/lib
collection:third_party/pkg/collection/lib
compiler:pkg/compiler/lib
# Compiler is imported as compiler_unsupported so it can work outside the SDK.
Expand All @@ -43,6 +44,7 @@ http:third_party/pkg/http/lib
http_multi_server:third_party/pkg/http_multi_server/lib
http_parser:third_party/pkg/http_parser/lib
http_throttle:third_party/pkg/http_throttle/lib
initialize:third_party/pkg/initialize/lib
intl:third_party/pkg/intl/lib
isolate:third_party/pkg/isolate/lib
js:pkg/js/lib
Expand All @@ -61,7 +63,9 @@ microlytics:pkg/microlytics/lib
mime:third_party/pkg/mime/lib
mustache4dart:third_party/pkg/mustache4dart/lib
oauth2:third_party/pkg/oauth2/lib
observable:third_party/pkg/observable/lib
observatory:runtime/observatory/lib
observe:third_party/pkg/observe/lib
package_config:third_party/pkg_tested/package_config/lib
package_resolver:third_party/pkg_tested/package_resolver/lib
path:third_party/pkg/path/lib
Expand All @@ -80,6 +84,7 @@ shelf:third_party/pkg/shelf/lib
shelf_packages_handler:third_party/pkg/shelf_packages_handler/lib
shelf_static:third_party/pkg/shelf_static/lib
shelf_web_socket:third_party/pkg/shelf_web_socket/lib
smoke:third_party/pkg/smoke/lib
source_map_stack_trace:third_party/pkg/source_map_stack_trace/lib
source_maps:third_party/pkg/source_maps/lib
source_span:third_party/pkg/source_span/lib
Expand All @@ -98,5 +103,6 @@ unittest:third_party/pkg/unittest/lib
usage:third_party/pkg/usage/lib
utf:third_party/pkg/utf/lib
watcher:third_party/pkg/watcher/lib
web_components:third_party/pkg/web_components/lib
web_socket_channel:third_party/pkg/web_socket_channel/lib
yaml:third_party/pkg/yaml/lib
20 changes: 20 additions & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ vars = {
"charcode_tag": "@v1.1.1",
"chrome_rev" : "@19997",
"cli_util_tag" : "@0.1.0",
"code_transformers_tag": "@v0.5.1",
"collection_tag": "@1.13.0",
"convert_tag": "@2.0.1",
"crypto_tag" : "@2.0.1",
Expand All @@ -75,6 +76,7 @@ vars = {
"http_tag" : "@0.11.3+13",
"http_throttle_tag" : "@1.0.1",
"idl_parser_rev": "@7fbe68cab90c38147dee4f48c30ad0d496c17915",
"initialize_tag": "@v0.6.2+5",
"intl_tag": "@0.14.0",
"isolate_tag": "@1.0.0",
"jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
Expand All @@ -87,7 +89,9 @@ vars = {
"mime_rev": "@75890811d4af5af080351ba8a2853ad4c8df98dd",
"mustache4dart_tag" : "@v1.1.0",
"oauth2_tag": "@1.0.2",
"observable_tag": "@0.17.0",
"observatory_pub_packages_rev": "@26aad88f1c1915d39bbcbff3cad589e2402fdcf1",
"observe_tag": "@0.15.0",
"package_config_tag": "@1.0.0",
"package_resolver_tag": "@1.0.2+1",
"path_tag": "@1.4.1",
Expand All @@ -105,6 +109,7 @@ vars = {
"shelf_packages_handler_tag": "@1.0.0",
"shelf_tag": "@0.6.7+2",
"shelf_web_socket_tag": "@0.2.1",
"smoke_tag" : "@v0.3.6+2",
"source_map_stack_trace_tag": "@1.1.4",
"source_maps-0.9.4_rev": "@38524",
"source_maps_tag": "@0.10.4",
Expand All @@ -120,6 +125,7 @@ vars = {
"usage_tag": "@3.3.0",
"utf_tag": "@0.9.0+3",
"watcher_tag": "@0.9.7+3",
"web_components_rev": "@6349e09f9118dce7ae1b309af5763745e25a9d61",
"web_socket_channel_tag": "@1.0.4",
"WebCore_rev": "@3c45690813c112373757bbef53de1602a62af609",
"yaml_tag": "@2.1.12",
Expand Down Expand Up @@ -197,6 +203,9 @@ deps = {
(Var("github_mirror") % "crypto") + Var("crypto_tag"),
Var("dart_root") + "/third_party/pkg/csslib":
(Var("github_mirror") % "csslib") + Var("csslib_tag"),
Var("dart_root") + "/third_party/pkg/code_transformers":
(Var("github_mirror") % "code_transformers") +
Var("code_transformers_tag"),
Var("dart_root") + "/third_party/dart-services":
(Var("github_mirror") % "dart-services") +
Var("dart_services_rev"),
Expand Down Expand Up @@ -224,6 +233,8 @@ deps = {
Var("dart_root") + "/third_party/pkg/http_throttle":
(Var("github_mirror") % "http_throttle") +
Var("http_throttle_tag"),
Var("dart_root") + "/third_party/pkg/initialize":
(Var("github_mirror") % "initialize") + Var("initialize_tag"),
Var("dart_root") + "/third_party/pkg/intl":
(Var("github_mirror") % "intl") + Var("intl_tag"),
Var("dart_root") + "/third_party/pkg/isolate":
Expand All @@ -248,6 +259,10 @@ deps = {
+ Var("mustache4dart_tag"),
Var("dart_root") + "/third_party/pkg/oauth2":
(Var("github_mirror") % "oauth2") + Var("oauth2_tag"),
Var("dart_root") + "/third_party/pkg/observable":
(Var("github_mirror") % "observable") + Var("observable_tag"),
Var("dart_root") + "/third_party/pkg/observe":
(Var("github_mirror") % "observe") + Var("observe_tag"),
Var("dart_root") + "/third_party/observatory_pub_packages":
(Var("github_mirror") % "observatory_pub_packages")
+ Var("observatory_pub_packages_rev"),
Expand Down Expand Up @@ -286,6 +301,8 @@ deps = {
Var("dart_root") + "/third_party/pkg/shelf_web_socket":
(Var("github_mirror") % "shelf_web_socket") +
Var("shelf_web_socket_tag"),
Var("dart_root") + "/third_party/pkg/smoke":
(Var("github_mirror") % "smoke") + Var("smoke_tag"),
Var("dart_root") + "/third_party/pkg/source_maps":
(Var("github_mirror") % "source_maps") + Var("source_maps_tag"),
Var("dart_root") + "/third_party/pkg/source_span":
Expand Down Expand Up @@ -319,6 +336,9 @@ deps = {
(Var("github_mirror") % "utf") + Var("utf_tag"),
Var("dart_root") + "/third_party/pkg/watcher":
(Var("github_mirror") % "watcher") + Var("watcher_tag"),
Var("dart_root") + "/third_party/pkg/web_components":
(Var("github_mirror") % "web-components") +
Var("web_components_rev"),
Var("dart_root") + "/third_party/pkg/web_socket_channel":
(Var("github_mirror") % "web_socket_channel") +
Var("web_socket_channel_tag"),
Expand Down
52 changes: 1 addition & 51 deletions tests/html/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:html';
import 'dart:js' as js;
import 'dart:typed_data';
import 'package:unittest/unittest.dart';
export 'package:web_components/polyfill.dart';

/**
* Verifies that [actual] has the same graph structure as [expected].
Expand Down Expand Up @@ -166,54 +167,3 @@ void upgradeCustomElements(Node node) {
js.context['CustomElements'].callMethod('upgradeAll', [node]);
}
}

/**
* A future that completes once all custom elements in the initial HTML page
* have been upgraded.
*
* This is needed because the native implementation can update the elements
* while parsing the HTML document, but the custom element polyfill cannot,
* so it completes this future once all elements are upgraded.
*/
// TODO(jmesserly): rename to webComponentsReady to match the event?
Future customElementsReady = () {
if (_isReady) return new Future.value();

// Not upgraded. Wait for the polyfill to fire the WebComponentsReady event.
// Note: we listen on document (not on document.body) to allow this polyfill
// to be loaded in the HEAD element.
return document.on['WebComponentsReady'].first;
}();

// Return true if we are using the polyfill and upgrade is complete, or if we
// have native document.register and therefore the browser took care of it.
// Otherwise return false, including the case where we can't find the polyfill.
bool get _isReady {
// If we don't have dart:js, assume things are ready
if (js.context == null) return true;

var customElements = js.context['CustomElements'];
if (customElements == null) {
// Return true if native document.register, otherwise false.
// (Maybe the polyfill isn't loaded yet. Wait for it.)
return document.supportsRegisterElement;
}

return customElements['ready'] == true;
}

/**
* *Note* this API is primarily intended for tests. In other code it is better
* to write it in a style that works with or without the polyfill, rather than
* using this method.
*
* Synchronously trigger evaluation of pending lifecycle events, which otherwise
* need to wait for a [MutationObserver] to signal the changes in the polyfill.
* This method can be used to resolve differences in timing between native and
* polyfilled custom elements.
*/
void customElementsTakeRecords([Node node]) {
var customElements = js.context['CustomElements'];
if (customElements == null) return;
customElements.callMethod('takeRecords', [node]);
}
52 changes: 1 addition & 51 deletions tests/lib_strong/html/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:html';
import 'dart:js' as js;
import 'dart:typed_data';
import 'package:unittest/unittest.dart';
export 'package:web_components/polyfill.dart';

/**
* Verifies that [actual] has the same graph structure as [expected].
Expand Down Expand Up @@ -166,54 +167,3 @@ void upgradeCustomElements(Node node) {
js.context['CustomElements'].callMethod('upgradeAll', [node]);
}
}

/**
* A future that completes once all custom elements in the initial HTML page
* have been upgraded.
*
* This is needed because the native implementation can update the elements
* while parsing the HTML document, but the custom element polyfill cannot,
* so it completes this future once all elements are upgraded.
*/
// TODO(jmesserly): rename to webComponentsReady to match the event?
Future customElementsReady = () {
if (_isReady) return new Future.value();

// Not upgraded. Wait for the polyfill to fire the WebComponentsReady event.
// Note: we listen on document (not on document.body) to allow this polyfill
// to be loaded in the HEAD element.
return document.on['WebComponentsReady'].first;
}();

// Return true if we are using the polyfill and upgrade is complete, or if we
// have native document.register and therefore the browser took care of it.
// Otherwise return false, including the case where we can't find the polyfill.
bool get _isReady {
// If we don't have dart:js, assume things are ready
if (js.context == null) return true;

var customElements = js.context['CustomElements'];
if (customElements == null) {
// Return true if native document.register, otherwise false.
// (Maybe the polyfill isn't loaded yet. Wait for it.)
return document.supportsRegisterElement;
}

return customElements['ready'] == true;
}

/**
* *Note* this API is primarily intended for tests. In other code it is better
* to write it in a style that works with or without the polyfill, rather than
* using this method.
*
* Synchronously trigger evaluation of pending lifecycle events, which otherwise
* need to wait for a [MutationObserver] to signal the changes in the polyfill.
* This method can be used to resolve differences in timing between native and
* polyfilled custom elements.
*/
void customElementsTakeRecords([Node node]) {
var customElements = js.context['CustomElements'];
if (customElements == null) return;
customElements.callMethod('takeRecords', [node]);
}

0 comments on commit b6d15d8

Please sign in to comment.