diff --git a/lib/mixins/element-mixin.html b/lib/mixins/element-mixin.html
index 82fe0554de..0869aa3934 100644
--- a/lib/mixins/element-mixin.html
+++ b/lib/mixins/element-mixin.html
@@ -414,11 +414,8 @@
this._importPath = meta.url.slice(0, meta.url.lastIndexOf('/') + 1);
} else {
const module = Polymer.DomModule && Polymer.DomModule.import(/** @type {PolymerElementConstructor} */ (this).is);
- if (module) {
- this._importPath = module ? module.assetpath : '';
- } else {
- this._importPath = Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;
- }
+ this._importPath = (module && module.assetpath) ||
+ Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;
}
}
return this._importPath;
diff --git a/test/unit/resolveurl.html b/test/unit/resolveurl.html
index 0502bb4710..5cd59980ca 100644
--- a/test/unit/resolveurl.html
+++ b/test/unit/resolveurl.html
@@ -58,7 +58,7 @@
var resolvedUrl = new RegExp(`${folder}/foo\\.z`);
var styleHashUrl = /url\('#bar'\)/;
var styleAbsUrl = /url\('\/zot'\)/;
- var style = el.shadowRoot.querySelector('style') || document.querySelector('style[scope=p-r]');
+ var style = el.shadowRoot.querySelector('style') || document.querySelector(`style[scope=${elementName}]`);
assert.match(style.textContent, resolvedUrl, 'url not relative to main document');
assert.match(style.textContent, styleHashUrl, 'hash url incorrectly resolved');
assert.match(style.textContent, styleAbsUrl, 'absolute url incorrectly resolved');