.`);
    });
    it('should match shallow content queries in views inserted / removed by ngIf', () => {
      function IfTemplate(rf: RenderFlags, ctx: any) {
        if (rf & RenderFlags.Create) {
          element(0, 'div', null, ['foo', '']);
        }
      }
      /**
       * 
       *    
       * 
       */
      const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) {
        if (rf & RenderFlags.Create) {
          elementStart(0, 'shallow-comp');
          { template(1, IfTemplate, 2, 0, null, [AttributeMarker.SelectOnly, 'ngIf', '']); }
          elementEnd();
        }
        if (rf & RenderFlags.Update) {
          elementProperty(1, 'ngIf', bind(ctx.showing));
        }
      }, 2, 1, [ShallowComp, NgIf]);
      const fixture = new ComponentFixture(AppComponent);
      const qList = shallowCompInstance !.foos;
      expect(qList.length).toBe(0);
      fixture.component.showing = true;
      fixture.update();
      expect(qList.length).toBe(1);
      fixture.component.showing = false;
      fixture.update();
      expect(qList.length).toBe(0);
    });
    // https://stackblitz.com/edit/angular-wlenwd?file=src%2Fapp%2Fapp.component.ts
    it('should support view and content queries matching the same element', () => {
      /**
       * 
       * 
       * class Cmpt {
       *  @ViewChildren('foo, bar') foos;
       * }
       */
      const AppComponent = createComponent(
          'app-component',
          function(rf: RenderFlags, ctx: any) {
            if (rf & RenderFlags.Create) {
              elementStart(1, 'div', ['with-content', '']);
              { element(2, 'div', null, ['foo', '']); }
              elementEnd();
              element(4, 'div', ['id', 'after'], ['bar', '']);
            }
          },
          6, 0, [WithContentDirective], [],
          function(rf: RenderFlags, ctx: any) {
            if (rf & RenderFlags.Create) {
              query(0, ['foo', 'bar'], true, QUERY_READ_FROM_NODE);
            }
            if (rf & RenderFlags.Update) {
              let tmp: any;
              queryRefresh(tmp = load
>(0)) && (ctx.foos = tmp as QueryList);
            }
          });
      const fixture = new ComponentFixture(AppComponent);
      const viewQList = fixture.component.foos;
      expect(viewQList.length).toBe(2);
      expect(withContentInstance !.foos.length).toBe(1);
      expect(viewQList.first.nativeElement).toBe(withContentInstance !.foos.first.nativeElement);
      expect(viewQList.last.nativeElement.id).toBe('after');
    });
    it('should not report deep content query matches found above content children', () => {
      /**
       * 
       *   
    <-- should match content query
       *