Skip to content

Reproduce problems which occur only with the test runner #293

Closed
@zoechi

Description

@zoechi

I have a Polymer.dart test which fails only when run with pub run test -pfirefox or pub run test -pphantomjs.
It looks like it depends on native custom elements support or one of the related standards because the test succeeds in Chrome and Dartium.

  • Dartium: ok
  • Chrome: ok
  • Firefox: fail
  • Phantom.js: fail

When I run the tests without the test runner the test succeeds also in Firefox (have to replace x-link-dart with a proper Dart Polymer script tag <script type="application/dart" src="html_test.dart"></script> to make it work)

  • Dartium: ok
  • Chrome: ok
  • Firefox: ok
  • Phantom.js: not tested

I have tried to create an additional HTML entry page where I load the test html file in an iframe to simulate the test runner environment, but it still works.

Any ideas how I might be able to reproduce the problem when run without the test runner to be able to debug the problem?

  • Dart VM version: 1.12.0-edge.bfd2d4ed2a40d8aff7926d1f9ff058643c83a21b (Tue Jul 21 10:08:31 2015) on "linux_x64"
  • polymer: 0.16.3+3
  • test: 0.12.3+8

Error message in Firefox

 (master) $ pub run test  -pfirefox --pub-serve=8080
00:01 +0: compiling test/testing/polymer_test_example/html_test.dart                               
"pub serve" is compiling test/testing/polymer_test_example/html_test.dart...
00:32 +1 -1: test/testing/polymer_test_example/html_test.dart: getParentElement Polymer elements   
  NullError: element is null
  package:stack_trace                         dart<.Declarer.test.<fn>.<fn>
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification.registerUnaryCallback.<fn>.<fn>
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification._run
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification.registerUnaryCallback.<fn>
  dart:async                                  dart<._Future._completeWithValue
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification._run
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification.registerCallback.<fn>
  ===== asynchronous gap ===========================
  dart:async                                  dart<.Future.Future.<fn>
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification._run
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification.registerCallback.<fn>
  dart:_internal                              dart<._CustomZone.bindCallback.<fn>
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification._run
  package:web_components/src/init.dart 29:45  dart<.StackZoneSpecification.registerCallback.<fn>
  ===== asynchronous gap ===========================
  package:stack_trace                         dart<.Invoker._onRun.<fn>
  package:web_components/src/init.dart 29:45  dart<.Chain.capture.<fn>
  dart:_internal                              dart<._CustomZone.run
  package:web_components/src/init.dart 29:45  dart<.Chain.static.Chain.capture

in Phantom.js

 (master) $ pub run test  -pphantomjs --pub-serve=8080
00:03 +1 -1: test/testing/polymer_test_example/html_test.dart: getParentElement Polymer elements   
  NullError: method not found: 'parentNode' on null
  package:stack_trace                         <fn>
  package:web_components/src/init.dart 29:45  call
  package:web_components/src/init.dart 29:45  _run
  package:web_components/src/init.dart 29:45  <fn>
  dart:async                                  <fn>
  package:web_components/src/init.dart 29:45  _run
  package:web_components/src/init.dart 29:45  <fn>
  ===== asynchronous gap ===========================
  dart:async                                  <fn>
  package:web_components/src/init.dart 29:45  _run
  package:web_components/src/init.dart 29:45  <fn>
  dart:_internal                              <fn>
  package:web_components/src/init.dart 29:45  _run
  package:web_components/src/init.dart 29:45  <fn>
  ===== asynchronous gap ===========================
  package:stack_trace                         call
  package:web_components/src/init.dart 29:45  <fn>
  dart:_internal                              <fn>
  package:web_components/src/init.dart 29:45  Chain.capture

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions