refactor(core): move DomAdapter style methods to ServerRenderer (#32408)
PR Close #32408
This commit is contained in:

committed by
Miško Hevery

parent
970b58b13f
commit
c207ad80fd
@ -36,27 +36,6 @@ import {isTextNode} from '@angular/platform-browser/testing/src/browser_util';
|
||||
expect(() => getDOM().remove(d)).not.toThrow();
|
||||
});
|
||||
|
||||
it('should parse styles with urls correctly', () => {
|
||||
const d = getDOM().createElement('div');
|
||||
getDOM().setStyle(d, 'background-url', 'url(http://test.com/bg.jpg)');
|
||||
expect(getDOM().getStyle(d, 'background-url')).toBe('url(http://test.com/bg.jpg)');
|
||||
});
|
||||
|
||||
// Test for regression caused by angular/angular#22536
|
||||
it('should parse styles correctly following the spec', () => {
|
||||
const d = getDOM().createElement('div');
|
||||
getDOM().setStyle(d, 'background-image', 'url("paper.gif")');
|
||||
expect(d.style.backgroundImage).toBe('url("paper.gif")');
|
||||
expect(d.style.getPropertyValue('background-image')).toBe('url("paper.gif")');
|
||||
expect(getDOM().getStyle(d, 'background-image')).toBe('url("paper.gif")');
|
||||
});
|
||||
|
||||
it('should parse camel-case styles correctly', () => {
|
||||
const d = getDOM().createElement('div');
|
||||
getDOM().setStyle(d, 'marginRight', '10px');
|
||||
expect(getDOM().getStyle(d, 'margin-right')).toBe('10px');
|
||||
});
|
||||
|
||||
if (getDOM().supportsDOMEvents()) {
|
||||
describe('getBaseHref', () => {
|
||||
beforeEach(() => getDOM().resetBaseElement());
|
||||
|
Reference in New Issue
Block a user