Skip to content

Commit

Permalink
Amp-font: Unhandled Promise Rejection ampproject#1095
Browse files Browse the repository at this point in the history
  • Loading branch information
camelburrito committed Dec 9, 2015
1 parent 051aaea commit 7285958
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 5 additions & 1 deletion extensions/amp-font/0.1/amp-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ const DEFAULT_SIZE_ = 'medium';
*/
const CACHED_FONT_LOAD_TIME_ = 100;

/** @const {string} */
const TAG_ = 'AmpFont';


export class AmpFont extends AMP.BaseElement {

Expand Down Expand Up @@ -124,7 +127,8 @@ export class AmpFont extends AMP.BaseElement {
this.onFontLoadSuccess_();
}).catch(error => {
this.onFontLoadError_();
throw error;
console./* OK */warn(
'Font download timed out for ' + this.fontFamily_);
});
}

Expand Down
12 changes: 4 additions & 8 deletions test/integration/test-example-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,11 @@ describe('example', function() {
* @constructor {!Array<!RegExp>}
*/
const errorWhitelist = [
// TODO(dvoytenko): Remove once validator supports "data-videoid" for
// "amp-youtube" elements.
/MANDATORY_ATTR_MISSING video-id/,

// TODO(dvoytenko): Remove once validator supports "amp-font" element.
/DISALLOWED_TAG amp-font/,

// Remove once validator supports "amp-brightcove".
/DISALLOWED_TAG amp-brightcove/
/DISALLOWED_TAG amp-brightcove/,

//Remove once validator is fixed.
/MANDATORY_ATTR_MISSING shortcode or src/
];

const usedWhitelist = [];
Expand Down

0 comments on commit 7285958

Please sign in to comment.