[Common UI] Test agentService.isBrowser

This commit is contained in:
Victor Woeltjen 2015-12-04 14:12:00 -08:00
parent 37890280ae
commit d2a4a85e04

View File

@ -81,6 +81,13 @@ define(
expect(agentService.isPortrait()).toBeTruthy();
expect(agentService.isLandscape()).toBeFalsy();
});
it("allows for checking browser type", function () {
testWindow.navigator.userAgent = "Chromezilla Safarifox";
agentService = new AgentService(testWindow);
expect(agentService.isBrowser("Chrome")).toBe(true);
expect(agentService.isBrowser("Firefox")).toBe(false);
});
});
}
);