Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: third_party/pkg/angular/test/core_dom/shadow_root_options_spec.dart

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/test/core_dom/shadow_root_options_spec.dart
diff --git a/third_party/pkg/angular/test/core_dom/shadow_root_options_spec.dart b/third_party/pkg/angular/test/core_dom/shadow_root_options_spec.dart
deleted file mode 100644
index 9cfa4026103280f5baac9128340f639413f0f858..0000000000000000000000000000000000000000
--- a/third_party/pkg/angular/test/core_dom/shadow_root_options_spec.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-library shadow_root_options_spec;
-
-import '../_specs.dart';
-
-@NgComponent(
- selector: 'reset-style-inheritance',
- template: '<div class="c">Reset me foo</div>',
- applyAuthorStyles: false,
- resetStyleInheritance: true
-)
-class ResetStyleInheritanceComponent {
- static var lastTemplateLoader;
- ResetStyleInheritanceComponent(Element elt, TemplateLoader tl) {
- lastTemplateLoader = tl.template;
- }
-}
-
-@NgComponent(
- selector: 'apply-author-style',
- template: '<div>Style me foo</div>',
- applyAuthorStyles: true
-)
-class ApplyAuthorStyleComponent {
- static var lastTemplateLoader;
- ApplyAuthorStyleComponent(Element elt, TemplateLoader tl) {
- lastTemplateLoader = tl.template;
- }
-}
-
-@NgComponent(
- selector: 'default-options',
- template: '<div class="c">Style me foo</div>'
-)
-class DefaultOptionsComponent {
- static var lastTemplateLoader;
- DefaultOptionsComponent(Element elt, TemplateLoader tl) {
- lastTemplateLoader = tl.template;
- }
-}
-
-main() {
- describe('shadow dom options', () {
- Compiler $compile;
- DirectiveMap directives;
- Injector injector;
- Scope $rootScope;
-
- beforeEach(module((Module module) {
- module
- ..type(ApplyAuthorStyleComponent)
- ..type(ResetStyleInheritanceComponent)
- ..type(DefaultOptionsComponent);
- return (Injector _injector) {
- injector = _injector;
- $compile = injector.get(Compiler);
- $rootScope = injector.get(Scope);
- directives = injector.get(DirectiveMap);
- };
- }));
-
- it('should respect the apply-author-style option', async(inject(() {
- var element = $(
- '<style>div { border: 3px solid green }</style>' +
- '<apply-author-style>not included</apply-author-style>' +
- '<default-options>not included</default-options>');
- element.forEach((elt) { document.body.append(elt); }); // we need the computed style.
- $compile(element, directives)(injector, element);
-
- microLeap();
- expect(element[1].shadowRoot.query('div').getComputedStyle().border).toContain('3px solid');
- // ""0px none"" is the default style.
- expect(element[2].shadowRoot.query('div').getComputedStyle().border).toContain('0px none');
- })));
-
- it('should respect the reset-style-inheritance option', async(inject(() {
- var element = $(
- '<style>body { font-size: 20px; }</style>' + // font-size inherit's by default
- '<reset-style-inheritance>not included</reset-style-inheritance>' +
- '<default-options>not included</default-options>');
- element.forEach((elt) { document.body.append(elt); }); // we need the computed style.
- $compile(element, directives)(injector, element);
-
- microLeap();
- expect(element[1].shadowRoot.query('div').getComputedStyle().fontSize).toEqual('16px');
- expect(element[2].shadowRoot.query('div').getComputedStyle().fontSize).toEqual('20px');
- })));
- });
-}

Powered by Google App Engine
This is Rietveld 408576698