diff --git a/src/cdk/testing/fake-viewport-ruler.ts b/src/cdk/testing/fake-viewport-ruler.ts deleted file mode 100644 index 267c45fa062..00000000000 --- a/src/cdk/testing/fake-viewport-ruler.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -/** @docs-private */ -export class FakeViewportRuler { - getViewportRect() { - return { - left: 0, top: 0, width: 1014, height: 686, bottom: 686, right: 1014 - }; - } - - getViewportSize() { - return {width: 1014, height: 686}; - } - - getViewportScrollPosition() { - return {top: 0, left: 0}; - } -} diff --git a/src/cdk/testing/index.ts b/src/cdk/testing/index.ts index 96b6b70a623..676ca90f1ff 100644 --- a/src/cdk/testing/index.ts +++ b/src/cdk/testing/index.ts @@ -6,6 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ - - export * from './public-api'; diff --git a/src/cdk/testing/public-api.ts b/src/cdk/testing/public-api.ts index 7922e59e492..752df0b0d44 100644 --- a/src/cdk/testing/public-api.ts +++ b/src/cdk/testing/public-api.ts @@ -10,5 +10,4 @@ export * from './dispatch-events'; export * from './event-objects'; export * from './type-in-element'; export * from './wrapped-error-message'; -export * from './fake-viewport-ruler'; export * from './mock-ng-zone'; diff --git a/src/lib/button/button.spec.ts b/src/lib/button/button.spec.ts index 3aed8f7fafa..955454e523d 100644 --- a/src/lib/button/button.spec.ts +++ b/src/lib/button/button.spec.ts @@ -1,8 +1,6 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {Component, DebugElement} from '@angular/core'; import {By} from '@angular/platform-browser'; -import {ViewportRuler} from '@angular/cdk/scrolling'; -import {FakeViewportRuler} from '@angular/cdk/testing'; import {MatButtonModule} from './index'; import {MatRipple} from '@angular/material/core'; @@ -13,9 +11,6 @@ describe('MatButton', () => { TestBed.configureTestingModule({ imports: [MatButtonModule], declarations: [TestApp], - providers: [ - {provide: ViewportRuler, useClass: FakeViewportRuler}, - ] }); TestBed.compileComponents(); diff --git a/src/lib/radio/radio.spec.ts b/src/lib/radio/radio.spec.ts index aa275181a41..ddae2c3c640 100644 --- a/src/lib/radio/radio.spec.ts +++ b/src/lib/radio/radio.spec.ts @@ -2,8 +2,7 @@ import {async, ComponentFixture, fakeAsync, TestBed, tick} from '@angular/core/t import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '@angular/forms'; import {Component, DebugElement} from '@angular/core'; import {By} from '@angular/platform-browser'; -import {ViewportRuler} from '@angular/cdk/scrolling'; -import {dispatchFakeEvent, FakeViewportRuler} from '@angular/cdk/testing'; +import {dispatchFakeEvent} from '@angular/cdk/testing'; import {RIPPLE_FADE_IN_DURATION, RIPPLE_FADE_OUT_DURATION} from '@angular/material/core'; import {MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule} from './index'; @@ -20,9 +19,6 @@ describe('MatRadio', () => { StandaloneRadioButtons, InterleavedRadioGroup, TranscludingWrapper - ], - providers: [ - {provide: ViewportRuler, useClass: FakeViewportRuler} ] });