title: Angular 4 Karma component test fail due to CORS issue
body: <p>when I run <code>ng test</code> I get this error (I use standard setup with <code>Karma</code>) when I try to test component:</p>
  
  <p><code>XMLHttpRequest cannot load ng:///DynamicTestModule/FullModalHeaderComponent.ngfactory.js. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.</code></p>
  
  <p>How can I address this issue?</p>
  
  <p>Code:</p>
  
  <pre><code>import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  
  import { FullModalHeaderComponent } from './full-modal-header.component';
  
  describe('FullModalHeaderComponent', () =&gt; {
    let component: FullModalHeaderComponent;
    let fixture: ComponentFixture&lt;FullModalHeaderComponent&gt;;
  
    beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [FullModalHeaderComponent]
      })
        .compileComponents();
    }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(FullModalHeaderComponent);
      fixture.detectChanges();
    });
  
    it('should be created', () =&gt; {
      expect(component).toBeTruthy();
    });
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>import { Component, Input } from '@angular/core';
  import { ProcessingCenter, Publication } from '../../publications/model';
  
  @Component({
    selector: 'gom-full-modal-header',
    templateUrl: './full-modal-header.component.html'
  })
  export class FullModalHeaderComponent {
  
    @Input('processingCenter') processingCenter: ProcessingCenter;
    @Input('publication') publication: Publication;
    @Input('title') title: string;
  
  }
  </code></pre>
  
  <p>Also, when I run tests with <code>ng test --sourcemaps=false</code> issue goes away.</p>