Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: chrome/test/data/third_party/spaceport/js/Modernizr.js

Issue 10154006: Add test data for spaceport benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 define([ ], function () {
2 var window = { };
3 (function () {
4
5 /* Modernizr 2.0.6 (Custom Build) | MIT & BSD
6 * Build: http://www.modernizr.com/download/#-opacity-csstransforms-csstransform s3d-canvas-canvastext-audio-video-webworkers-svg-svgclippaths-touch-webgl-testst yles-testprop-hasevent-prefixes
7 */
8 ;window.Modernizr=function(a,b,c){function B(a,b){for(var d in a)if(j[a[d]]!==c) return b=="pfx"?a[d]:!0;return!1}function A(a,b){return!!~(""+a).indexOf(b)}func tion z(a,b){return typeof a===b}function y(a,b){return x(m.join(a+";")+(b||""))} function x(a){j.cssText=a}var d="2.0.6",e={},f=b.documentElement,g=b.head||b.get ElementsByTagName("head")[0],h="modernizr",i=b.createElement(h),j=i.style,k,l=Ob ject.prototype.toString,m=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),n={svg: "http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=function(a,c,d,e){var g,i,j, k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j. id=e?e[d]:h+(d+1),k.appendChild(j);g=["&shy;","<style>",a,"</style>"].join(""),k .id=h,k.innerHTML+=g,f.appendChild(k),i=c(k,a),k.parentNode.removeChild(k);retur n!!i},t=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;va r f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.remo veAttribute&&(e.setAttribute(d,""),f=z(e[d],"function"),z(e[d],c)||(e[d]=c),e.re moveAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:" form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),u,v={}.hasOwn Property,w;!z(v,c)&&!z(v.call,c)?w=function(a,b){return v.call(a,b)}:w=function( a,b){return b in a&&z(a.constructor.prototype[b],c)};var C=function(c,d){var f=c .join(""),g=d.length;s(f,function(c,d){var f=b.styleSheets[b.styleSheets.length- 1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNode s,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop== =9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9},g,d)}([,["@media (",m.joi n("touch-enabled),("),h,")","{#touch{top:9px;position:absolute}}"].join(""),["@m edia (",m.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:abs olute}}"].join("")],[,"touch","csstransforms3d"]);o.canvas=function(){var a=b.cr eateElement("canvas");return!!a.getContext&&!!a.getContext("2d")},o.canvastext=f unction(){return!!e.canvas&&!!z(b.createElement("canvas").getContext("2d").fillT ext,"function")},o.webgl=function(){return!!a.WebGLRenderingContext},o.touch=fun ction(){return e.touch},o.opacity=function(){y("opacity:.55");return/^0.55$/.tes t(j.opacity)},o.csstransforms=function(){return!!B(["transformProperty","WebkitT ransform","MozTransform","OTransform","msTransform"])},o.csstransforms3d=functio n(){var a=!!B(["perspectiveProperty","WebkitPerspective","MozPerspective","OPers pective","msPerspective"]);a&&"webkitPerspective"in f.style&&(a=e.csstransforms3 d);return a},o.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a .canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"') ;var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayTy pe(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}c atch(e){}return c},o.audio=function(){var a=b.createElement("audio"),c=!1;try{if (c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorb is"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs= "1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){ }return c},o.webworkers=function(){return!!a.Worker},o.svg=function(){return!!b. createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.svgclippaths= function(){return!!b.createElementNS&&/SVG/.test(l.call(b.createElementNS(n.svg, "clipPath")))};for(var D in o)w(o,D)&&(u=D.toLowerCase(),e[u]=o[D](),r.push((e[u ]?"":"no-")+u));x(""),i=k=null,e._version=d,e._prefixes=m,e.hasEvent=t,e.testPro p=function(a){return B([a])},e.testStyles=s;return e}(this,this.document);
9
10 }.call(null));
11 return window.Modernizr;
12 });
OLDNEW
« no previous file with comments | « chrome/test/data/third_party/spaceport/index.html ('k') | chrome/test/data/third_party/spaceport/js/curl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698