Back to build
Raw log | Switch to full mode | Login

Test 'DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0' completed with the following status(es): 'FAILURE','SUCCESS' Test 'DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0' had the following logs when run: ================================================================================ [ RUN ] DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0 Xlib: extension "RANDR" missing on display ":109". [10929:10984:0522/003146.865740:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [10929:10929:0522/003146.870868:WARNING:password_store_factory.cc(262)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. (browser_tests:10929): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Unknown or unsupported transport 'disabled' for address 'disabled:' [10929:10970:0522/003146.968102:WARNING:leveldb_database.cc(106)] Unable to open /b/s/w/itCAxUvs/.org.chromium.Chromium.KS272g/dy2F33l/Default/shared_proto_db: Invalid argument: /b/s/w/itCAxUvs/.org.chromium.Chromium.KS272g/dy2F33l/Default/shared_proto_db: does not exist (create_if_missing is false) [10929:11044:0522/003147.006182:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10929:11044:0522/003147.006229:WARNING:property.cc(146)] DaemonVersion: GetAndBlock: failed. [10929:11044:0522/003147.006458:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10929:11044:0522/003147.006655:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10929:11059:0522/003147.078547:WARNING:embedded_test_server.cc(238)] Request not handled. Returning 404: /foo ../../chrome/browser/data_reduction_proxy/data_reduction_proxy_browsertest.cc:692: Failure Expected equality of these values: GetBody() Which is: "\n \n \n \n \n \n This does.not.resolve page can\xE2\x80\x99t be found\n \n \n No webpage was found for the web address: http://does.not.resolve/foo\n \n \n \n \n \n \n \n \n \n \n \n HTTP ERROR 404\n \n null\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Reload\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n No webpage was found for the web address: http://does.not.resolve/foo\n \n\n \n \n \n \n \n\n\n// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * @fileoverview This file defines a singleton which provides access to all data\n * that is available as soon as the page's resources are loaded (before DOM\n * content has finished loading). This data includes both localized strings and\n * any data that is important to have ready from a very early stage (e.g. things\n * that must be displayed right away).\n *\n * Note that loadTimeData is not guaranteed to be consistent between page\n * refreshes (https://crbug.com/740629) and should not contain values that might\n * change if the page is re-opened later.\n */\n\n/**\n * @typedef {{\n * substitutions: (Array<string>|undefined),\n * attrs: (Object<function(Node, string):boolean>|undefined),\n * tags: (Array<string>|undefined),\n * }}\n */\nlet SanitizeInnerHtmlOpts;\n\n// eslint-disable-next-line no-var\n/** @type {!LoadTimeData} */ var loadTimeData;\n\n// Expose this type globally as a temporary work around until\n// https://github.com/google/closure-compiler/issues/544 is fixed.\n/** @constructor */\nfunction LoadTimeData(){}\n\n(function() {\n 'use strict';\n\n LoadTimeData.prototype = {\n /**\n * Sets the backing object.\n *\n * Note that there is no getter for |data_| to discourage abuse of the form:\n *\n * var value = loadTimeData.data()['key'];\n *\n * @param {Object} value The de-serialized page data.\n */\n set data(value) {\n expect(!this.data_, 'Re-setting data.');\n this.data_ = value;\n },\n\n /**\n * Returns a JsEvalContext for |data_|.\n * @returns {JsEvalContext}\n */\n createJsEvalContext: function() {\n return new JsEvalContext(this.data_);\n },\n\n /**\n * @param {string} id An ID of a value that might exist.\n * @return {boolean} True if |id| is a key in the dictionary.\n */\n valueExists: function(id) {\n return id in this.data_;\n },\n\n /**\n * Fetches a value, expecting that it exists.\n * @param {string} id The key that identifies the desired value.\n * @return {*} The corresponding value.\n */\n getValue: function(id) {\n expect(this.data_, 'No data. Did you remember to include strings.js?');\n const value = this.data_[id];\n expect(typeof value != 'undefined', 'Could not find value for ' + id);\n return value;\n },\n\n /**\n * As above, but also makes sure that the value is a string.\n * @param {string} id The key that identifies the desired string.\n * @return {string} The corresponding string value.\n */\n getString: function(id) {\n const value = this.getValue(id);\n expectIsType(id, value, 'string');\n return /** @type {string} */ (value);\n },\n\n /**\n * Returns a formatted localized string where $1 to $9 are replaced by the\n * second to the tenth argument.\n * @param {string} id The ID of the string we want.\n * @param {...(string|number)} var_args The extra values to include in the\n * formatted output.\n * @return {string} The formatted string.\n */\n getStringF: function(id, var_args) {\n const value = this.getString(id);\n if (!value) {\n return '';\n }\n\n const args = Array.prototype.slice.call(arguments);\n args[0] = value;\n return this.substituteString.apply(this, args);\n },\n\n /**\n * Make a string safe for use with with Polymer bindings that are\n * inner-h-t-m-l (or other innerHTML use).\n * @param {string} rawString The unsanitized string.\n * @param {SanitizeInnerHtmlOpts=} opts Optional additional allowed tags and\n * attributes.\n * @return {string}\n */\n sanitizeInnerHtml: function(rawString, opts) {\n opts = opts || {};\n return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs)\n .firstChild.innerHTML;\n },\n\n /**\n * Returns a formatted localized string where $1 to $9 are replaced by the\n * second to the tenth argument. Any standalone $ signs must be escaped as\n * $$.\n * @param {string} label The label to substitute through.\n * This is not an resource ID.\n * @param {...(string|number)} var_args The extra values to include in the\n * formatted output.\n * @return {string} The formatted string.\n */\n substituteString: function(label, var_args) {\n const varArgs = arguments;\n return label.replace(/\\$(.|$|\\n)/g, function(m) {\n assert(m.match(/\\$[$1-9]/), 'Unescaped $ found in localized string.');\n return m == '$$' ? '$' : varArgs[m[1]];\n });\n },\n\n /**\n * Returns a formatted string where $1 to $9 are replaced by the second to\n * tenth argument, split apart into a list of pieces describing how the\n * substitution was performed. Any standalone $ signs must be escaped as $$.\n * @param {string} label A localized string to substitute through.\n * This is not an resource ID.\n * @param {...(string|number)} var_args The extra values to include in the\n * formatted output.\n * @return {!Array<!{value: string, arg: (null|string)}>} The formatted\n * string pieces.\n */\n getSubstitutedStringPieces: function(label, var_args) {\n const varArgs = arguments;\n // Split the string by separately matching all occurrences of $1-9 and of\n // non $1-9 pieces.\n const pieces = (label.match(/(\\$[1-9])|(([^$]|\\$([^1-9]|$))+)/g) ||\n []).map(function(p) {\n // Pieces that are not $1-9 should be returned after replacing $$\n // with $.\n if (!p.match(/^\\$[1-9]$/)) {\n assert(\n (p.match(/\\$/g) || []).length % 2 == 0,\n 'Unescaped $ found in localized string.');\n return {value: p.replace(/\\$\\$/g, '$'), arg: null};\n }\n\n // Otherwise, return the substitution value.\n return {value: varArgs[p[1]], arg: p};\n });\n\n return pieces;\n },\n\n /**\n * As above, but also makes sure that the value is a boolean.\n * @param {string} id The key that identifies the desired boolean.\n * @return {boolean} The corresponding boolean value.\n */\n getBoolean: function(id) {\n const value = this.getValue(id);\n expectIsType(id, value, 'boolean');\n return /** @type {boolean} */ (value);\n },\n\n /**\n * As above, but also makes sure that the value is an integer.\n * @param {string} id The key that identifies the desired number.\n * @return {number} The corresponding number value.\n */\n getInteger: function(id) {\n const value = this.getValue(id);\n expectIsType(id, value, 'number');\n expect(value == Math.floor(value), 'Number isn\\'t integer: ' + value);\n return /** @type {number} */ (value);\n },\n\n /**\n * Override values in loadTimeData with the values found in |replacements|.\n * @param {Object} replacements The dictionary object of keys to replace.\n */\n overrideValues: function(replacements) {\n expect(\n typeof replacements == 'object',\n 'Replacements must be a dictionary object.');\n for (const key in replacements) {\n this.data_[key] = replacements[key];\n }\n }\n };\n\n /**\n * Checks condition, displays error message if expectation fails.\n * @param {*} condition The condition to check for truthiness.\n * @param {string} message The message to display if the check fails.\n */\n function expect(condition, message) {\n if (!condition) {\n console.error(\n 'Unexpected condition on ' + document.location.href + ': ' + message);\n }\n }\n\n /**\n * Checks that the given value has the given type.\n * @param {string} id The id of the value (only used for error message).\n * @param {*} value The value to check the type on.\n * @param {string} type The type we expect |value| to be.\n */\n function expectIsType(id, value, type) {\n expect(\n typeof value == type, '[' + value + '] (' + id + ') is not a ' + type);\n }\n\n expect(!loadTimeData, 'should only include this file once');\n loadTimeData = new LoadTimeData;\n})();\nloadTimeData.data = {\"details\":\"Details\",\"errorCode\":\"HTTP ERROR 404\",\"fontfamily\":\"sans, Arial, sans-serif\",\"fontsize\":\"75%\",\"heading\":{\"hostName\":\"does.not.resolve\",\"msg\":\"This \\u003Cspan jscontent=\\\"hostName\\\">\\u003C/span> page can\xE2\x80\x99t be found\"},\"hideDetails\":\"Hide details\",\"iconClass\":\"icon-generic\",\"language\":\"en\",\"reloadButton\":{\"msg\":\"Reload\",\"reloadTrackingId\":-1,\"reloadUrl\":\"http://does.not.resolve/foo\"},\"suggestionsDetails\":[],\"suggestionsSummaryList\":[],\"summary\":{\"failedUrl\":\"http://does.not.resolve/foo\",\"hostName\":\"does.not.resolve\",\"msg\":\"No webpage was found for the web address: \\u003Cstrong jscontent=\\\"failedUrl\\\">\\u003C/strong>\"},\"textdirection\":\"ltr\",\"title\":\"does.not.resolve\"};// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// This file serves as a proxy to bring the included js file from /third_party\n// into its correct location under the resources directory tree, whence it is\n// delivered via a chrome://resources URL. See ../webui_resources.grd.\n\n// Note: this <include> is not behind a single-line comment because the first\n// line of the file is source code (so the first line would be skipped) instead\n// of a licence header.\n// clang-format off\n(function(){var i=null;function k(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function l(a,b){var c=k(arguments,2);return function(){return b.apply(a,c)}}function m(a,b){var c=new n(b);for(c.f=[a];c.f.length;){var e=c,d=c.f.shift();e.g(d);for(d=d.firstChild;d;d=d.nextSibling)d.nodeType==1&&e.f.push(d)}}function n(a){this.g=a}function o(a){a.style.display=\"\"}function p(a){a.style.display=\"none\"};var q=\":\",r=/\\s*;\\s*/;function s(){this.i.apply(this,arguments)}s.prototype.i=function(a,b){if(!this.a)this.a={};if(b){var c=this.a,e=b.a,d;for(d in e)c[d]=e[d]}else for(c in d=this.a,e=t,e)d[c]=e[c];this.a.$this=a;this.a.$context=this;this.d=typeof a!=\"undefined\"&&a!=i?a:\"\";if(!b)this.a.$top=this.d};var t={$default:i},u=[];function v(a){for(var b in a.a)delete a.a[b];a.d=i;u.push(a)}function w(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return t.$default}}\nfunction x(a,b,c,e){if(u.length>0){var d=u.pop();s.call(d,b,a);a=d}else a=new s(b,a);a.a.$index=c;a.a.$count=e;return a}var y=\"a_\",z=\"b_\",A=\"with (a_) with (b_) return \",D={};function E(a){if(!D[a])try{D[a]=new Function(y,z,A+a)}catch(b){}return D[a]}function F(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c){var d=a[c].indexOf(q);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\\s+/,\"\").replace(/\\s+$/,\"\");d=E(a[c].substr(d+1));b.push(f,d)}}return b};var G=\"jsinstance\",H=\"jsts\",I=\"*\",J=\"div\",K=\"id\";function L(){}var M=0,N={0:{}},P={},Q={},R=[];function S(a){a.__jstcache||m(a,function(a){T(a)})}var U=[[\"jsselect\",E],[\"jsdisplay\",E],[\"jsvalues\",F],[\"jsvars\",F],[\"jseval\",function(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c)if(a[c]){var d=E(a[c]);b.push(d)}return b}],[\"transclude\",function(a){return a}],[\"jscontent\",E],[\"jsskip\",E]];\nfunction T(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute(\"jstcache\");if(b!=i)return a.__jstcache=N[b];for(var b=R.length=0,c=U.length;b<c;++b){var e=U[b][0],d=a.getAttribute(e);Q[e]=d;d!=i&&R.push(e+\"=\"+d)}if(R.length==0)return a.setAttribute(\"jstcache\",\"0\"),a.__jstcache=N[0];var f=R.join(\"&\");if(b=P[f])return a.setAttribute(\"jstcache\",b),a.__jstcache=N[b];for(var h={},b=0,c=U.length;b<c;++b){var d=U[b],e=d[0],g=d[1],d=Q[e];d!=i&&(h[e]=g(d))}b=\"\"+ ++M;a.setAttribute(\"jstcache\",b);N[b]=\nh;P[f]=b;return a.__jstcache=h}function V(a,b){a.h.push(b);a.k.push(0)}function W(a){return a.c.length?a.c.pop():[]}\nL.prototype.e=function(a,b){var c=X(b),e=c.transclude;if(e)(c=Y(e))?(b.parentNode.replaceChild(c,b),e=W(this),e.push(this.e,a,c),V(this,e)):b.parentNode.removeChild(b);else if(c=c.jsselect){var c=w(a,c,b),d=b.getAttribute(G),f=!1;d&&(d.charAt(0)==I?(d=parseInt(d.substr(1),10),f=!0):d=parseInt(d,10));var h=c!=i&&typeof c==\"object\"&&typeof c.length==\"number\",e=h?c.length:1,g=h&&e==0;if(h)if(g)d?b.parentNode.removeChild(b):(b.setAttribute(G,\"*0\"),p(b));else if(o(b),d===i||d===\"\"||f&&d<e-1){f=W(this);\nd=d||0;for(h=e-1;d<h;++d){var j=b.cloneNode(!0);b.parentNode.insertBefore(j,b);Z(j,c,d);g=x(a,c[d],d,e);f.push(this.b,g,j,v,g,i)}Z(b,c,d);g=x(a,c[d],d,e);f.push(this.b,g,b,v,g,i);V(this,f)}else d<e?(f=c[d],Z(b,c,d),g=x(a,f,d,e),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f)):b.parentNode.removeChild(b);else c==i?p(b):(o(b),g=x(a,c,0,1),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f))}else this.b(a,b)};\nL.prototype.b=function(a,b){var c=X(b),e=c.jsdisplay;if(e){if(!w(a,e,b)){p(b);return}o(b)}if(e=c.jsvars)for(var d=0,f=e.length;d<f;d+=2){var h=e[d],g=w(a,e[d+1],b);a.a[h]=g}if(e=c.jsvalues){d=0;for(f=e.length;d<f;d+=2)if(g=e[d],h=w(a,e[d+1],b),g.charAt(0)==\"$\")a.a[g]=h;else if(g.charAt(0)==\".\"){for(var g=g.substr(1).split(\".\"),j=b,O=g.length,B=0,$=O-1;B<$;++B){var C=g[B];j[C]||(j[C]={});j=j[C]}j[g[O-1]]=h}else g&&(typeof h==\"boolean\"?h?b.setAttribute(g,g):b.removeAttribute(g):b.setAttribute(g,\"\"+\nh))}if(e=c.jseval){d=0;for(f=e.length;d<f;++d)w(a,e[d],b)}e=c.jsskip;if(!e||!w(a,e,b))if(c=c.jscontent){if(c=\"\"+w(a,c,b),b.innerHTML!=c){for(;b.firstChild;)e=b.firstChild,e.parentNode.removeChild(e);b.appendChild(this.j.createTextNode(c))}}else{c=W(this);for(e=b.firstChild;e;e=e.nextSibling)e.nodeType==1&&c.push(this.e,a,e);c.length&&V(this,c)}};function X(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute(\"jstcache\");if(b)return a.__jstcache=N[b];return T(a)}\nfunction Y(a,b){var c=document;if(b){var e=c.getElementById(a);if(!e){var e=b(),d=H,f=c.getElementById(d);if(!f)f=c.createElement(J),f.id=d,p(f),f.style.position=\"absolute\",c.body.appendChild(f);d=c.createElement(J);f.appendChild(d);d.innerHTML=e;e=c.getElementById(a)}c=e}else c=c.getElementById(a);return c?(S(c),c=c.cloneNode(!0),c.removeAttribute(K),c):i}function Z(a,b,c){c==b.length-1?a.setAttribute(G,I+c):a.setAttribute(G,\"\"+c)};window.jstGetTemplate=Y;window.JsEvalContext=s;window.jstProcess=function(a,b){var c=new L;S(b);c.j=b?b.nodeType==9?b:b.ownerDocument||document:document;var e=l(c,c.e,a,b),d=c.h=[],f=c.k=[];c.c=[];e();for(var h,g,j;d.length;)h=d[d.length-1],e=f[f.length-1],e>=h.length?(e=c,g=d.pop(),g.length=0,e.c.push(g),f.pop()):(g=h[e++],j=h[e++],h=h[e++],f[f.length-1]=e,g.call(c,j,h))};\n})()\nvar tp = document.getElementById('t');jstProcess(loadTimeData.createJsEvalContext(), tp);" As Text: " This does.not.resolve page can?t be found No webpage was found for the web address: http://does.not.resolve/foo HTTP ERROR 404 null Reload No webpage was found for the web address: http://does.not.resolve/foo // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file defines a singleton which provides access to all data * that is available as soon as the page's resources are loaded (before DOM * content has finished loading). This data includes both localized strings and * any data that is important to have ready from a very early stage (e.g. things * that must be displayed right away). * * Note that loadTimeData is not guaranteed to be consistent between page * refreshes (https://crbug.com/740629) and should not contain values that might * change if the page is re-opened later. */ /** * @typedef {{ * substitutions: (Array<string>|undefined), * attrs: (Object<function(Node, string):boolean>|undefined), * tags: (Array<string>|undefined), * }} */ let SanitizeInnerHtmlOpts; // eslint-disable-next-line no-var /** @type {!LoadTimeData} */ var loadTimeData; // Expose this type globally as a temporary work around until // https://github.com/google/closure-compiler/issues/544 is fixed. /** @constructor */ function LoadTimeData(){} (function() { 'use strict'; LoadTimeData.prototype = { /** * Sets the backing object. * * Note that there is no getter for |data_| to discourage abuse of the form: * * var value = loadTimeData.data()['key']; * * @param {Object} value The de-serialized page data. */ set data(value) { expect(!this.data_, 'Re-setting data.'); this.data_ = value; }, /** * Returns a JsEvalContext for |data_|. * @returns {JsEvalContext} */ createJsEvalContext: function() { return new JsEvalContext(this.data_); }, /** * @param {string} id An ID of a value that might exist. * @return {boolean} True if |id| is a key in the dictionary. */ valueExists: function(id) { return id in this.data_; }, /** * Fetches a value, expecting that it exists. * @param {string} id The key that identifies the desired value. * @return {*} The corresponding value. */ getValue: function(id) { expect(this.data_, 'No data. Did you remember to include strings.js?'); const value = this.data_[id]; expect(typeof value != 'undefined', 'Could not find value for ' + id); return value; }, /** * As above, but also makes sure that the value is a string. * @param {string} id The key that identifies the desired string. * @return {string} The corresponding string value. */ getString: function(id) { const value = this.getValue(id); expectIsType(id, value, 'string'); return /** @type {string} */ (value); }, /** * Returns a formatted localized string where $1 to $9 are replaced by the * second to the tenth argument. * @param {string} id The ID of the string we want. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {string} The formatted string. */ getStringF: function(id, var_args) { const value = this.getString(id); if (!value) { return ''; } const args = Array.prototype.slice.call(arguments); args[0] = value; return this.substituteString.apply(this, args); }, /** * Make a string safe for use with with Polymer bindings that are * inner-h-t-m-l (or other innerHTML use). * @param {string} rawString The unsanitized string. * @param {SanitizeInnerHtmlOpts=} opts Optional additional allowed tags and * attributes. * @return {string} */ sanitizeInnerHtml: function(rawString, opts) { opts = opts || {}; return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs) .firstChild.innerHTML; }, /** * Returns a formatted localized string where $1 to $9 are replaced by the * second to the tenth argument. Any standalone $ signs must be escaped as * $$. * @param {string} label The label to substitute through. * This is not an resource ID. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {string} The formatted string. */ substituteString: function(label, var_args) { const varArgs = arguments; return label.replace(/\$(.|$|\n)/g, function(m) { assert(m.match(/\$[$1-9]/), 'Unescaped $ found in localized string.'); return m == '$$' ? '$' : varArgs[m[1]]; }); }, /** * Returns a formatted string where $1 to $9 are replaced by the second to * tenth argument, split apart into a list of pieces describing how the * substitution was performed. Any standalone $ signs must be escaped as $$. * @param {string} label A localized string to substitute through. * This is not an resource ID. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {!Array<!{value: string, arg: (null|string)}>} The formatted * string pieces. */ getSubstitutedStringPieces: function(label, var_args) { const varArgs = arguments; // Split the string by separately matching all occurrences of $1-9 and of // non $1-9 pieces. const pieces = (label.match(/(\$[1-9])|(([^$]|\$([^1-9]|$))+)/g) || []).map(function(p) { // Pieces that are not $1-9 should be returned after replacing $$ // with $. if (!p.match(/^\$[1-9]$/)) { assert( (p.match(/\$/g) || []).length % 2 == 0, 'Unescaped $ found in localized string.'); return {value: p.replace(/\$\$/g, '$'), arg: null}; } // Otherwise, return the substitution value. return {value: varArgs[p[1]], arg: p}; }); return pieces; }, /** * As above, but also makes sure that the value is a boolean. * @param {string} id The key that identifies the desired boolean. * @return {boolean} The corresponding boolean value. */ getBoolean: function(id) { const value = this.getValue(id); expectIsType(id, value, 'boolean'); return /** @type {boolean} */ (value); }, /** * As above, but also makes sure that the value is an integer. * @param {string} id The key that identifies the desired number. * @return {number} The corresponding number value. */ getInteger: function(id) { const value = this.getValue(id); expectIsType(id, value, 'number'); expect(value == Math.floor(value), 'Number isn\'t integer: ' + value); return /** @type {number} */ (value); }, /** * Override values in loadTimeData with the values found in |replacements|. * @param {Object} replacements The dictionary object of keys to replace. */ overrideValues: function(replacements) { expect( typeof replacements == 'object', 'Replacements must be a dictionary object.'); for (const key in replacements) { this.data_[key] = replacements[key]; } } }; /** * Checks condition, displays error message if expectation fails. * @param {*} condition The condition to check for truthiness. * @param {string} message The message to display if the check fails. */ function expect(condition, message) { if (!condition) { console.error( 'Unexpected condition on ' + document.location.href + ': ' + message); } } /** * Checks that the given value has the given type. * @param {string} id The id of the value (only used for error message). * @param {*} value The value to check the type on. * @param {string} type The type we expect |value| to be. */ function expectIsType(id, value, type) { expect( typeof value == type, '[' + value + '] (' + id + ') is not a ' + type); } expect(!loadTimeData, 'should only include this file once'); loadTimeData = new LoadTimeData; })(); loadTimeData.data = {"details":"Details","errorCode":"HTTP ERROR 404","fontfamily":"sans, Arial, sans-serif","fontsize":"75%","heading":{"hostName":"does.not.resolve","msg":"This \u003Cspan jscontent=\"hostName\">\u003C/span> page can?t be found"},"hideDetails":"Hide details","iconClass":"icon-generic","language":"en","reloadButton":{"msg":"Reload","reloadTrackingId":-1,"reloadUrl":"http://does.not.resolve/foo"},"suggestionsDetails":[],"suggestionsSummaryList":[],"summary":{"failedUrl":"http://does.not.resolve/foo","hostName":"does.not.resolve","msg":"No webpage was found for the web address: \u003Cstrong jscontent=\"failedUrl\">\u003C/strong>"},"textdirection":"ltr","title":"does.not.resolve"};// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file serves as a proxy to bring the included js file from /third_party // into its correct location under the resources directory tree, whence it is // delivered via a chrome://resources URL. See ../webui_resources.grd. // Note: this <include> is not behind a single-line comment because the first // line of the file is source code (so the first line would be skipped) instead // of a licence header. // clang-format off (function(){var i=null;function k(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function l(a,b){var c=k(arguments,2);return function(){return b.apply(a,c)}}function m(a,b){var c=new n(b);for(c.f=[a];c.f.length;){var e=c,d=c.f.shift();e.g(d);for(d=d.firstChild;d;d=d.nextSibling)d.nodeType==1&&e.f.push(d)}}function n(a){this.g=a}function o(a){a.style.display=""}function p(a){a.style.display="none"};var q=":",r=/\s*;\s*/;function s(){this.i.apply(this,arguments)}s.prototype.i=function(a,b){if(!this.a)this.a={};if(b){var c=this.a,e=b.a,d;for(d in e)c[d]=e[d]}else for(c in d=this.a,e=t,e)d[c]=e[c];this.a.$this=a;this.a.$context=this;this.d=typeof a!="undefined"&&a!=i?a:"";if(!b)this.a.$top=this.d};var t={$default:i},u=[];function v(a){for(var b in a.a)delete a.a[b];a.d=i;u.push(a)}function w(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return t.$default}} function x(a,b,c,e){if(u.length>0){var d=u.pop();s.call(d,b,a);a=d}else a=new s(b,a);a.a.$index=c;a.a.$count=e;return a}var y="a_",z="b_",A="with (a_) with (b_) return ",D={};function E(a){if(!D[a])try{D[a]=new Function(y,z,A+a)}catch(b){}return D[a]}function F(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c){var d=a[c].indexOf(q);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\s+/,"").replace(/\s+$/,"");d=E(a[c].substr(d+1));b.push(f,d)}}return b};var G="jsinstance",H="jsts",I="*",J="div",K="id";function L(){}var M=0,N={0:{}},P={},Q={},R=[];function S(a){a.__jstcache||m(a,function(a){T(a)})}var U=[["jsselect",E],["jsdisplay",E],["jsvalues",F],["jsvars",F],["jseval",function(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c)if(a[c]){var d=E(a[c]);b.push(d)}return b}],["transclude",function(a){return a}],["jscontent",E],["jsskip",E]]; function T(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b!=i)return a.__jstcache=N[b];for(var b=R.length=0,c=U.length;b<c;++b){var e=U[b][0],d=a.getAttribute(e);Q[e]=d;d!=i&&R.push(e+"="+d)}if(R.length==0)return a.setAttribute("jstcache","0"),a.__jstcache=N[0];var f=R.join("&");if(b=P[f])return a.setAttribute("jstcache",b),a.__jstcache=N[b];for(var h={},b=0,c=U.length;b<c;++b){var d=U[b],e=d[0],g=d[1],d=Q[e];d!=i&&(h[e]=g(d))}b=""+ ++M;a.setAttribute("jstcache",b);N[b]= h;P[f]=b;return a.__jstcache=h}function V(a,b){a.h.push(b);a.k.push(0)}function W(a){return a.c.length?a.c.pop():[]} L.prototype.e=function(a,b){var c=X(b),e=c.transclude;if(e)(c=Y(e))?(b.parentNode.replaceChild(c,b),e=W(this),e.push(this.e,a,c),V(this,e)):b.parentNode.removeChild(b);else if(c=c.jsselect){var c=w(a,c,b),d=b.getAttribute(G),f=!1;d&&(d.charAt(0)==I?(d=parseInt(d.substr(1),10),f=!0):d=parseInt(d,10));var h=c!=i&&typeof c=="object"&&typeof c.length=="number",e=h?c.length:1,g=h&&e==0;if(h)if(g)d?b.parentNode.removeChild(b):(b.setAttribute(G,"*0"),p(b));else if(o(b),d===i||d===""||f&&d<e-1){f=W(this); d=d||0;for(h=e-1;d<h;++d){var j=b.cloneNode(!0);b.parentNode.insertBefore(j,b);Z(j,c,d);g=x(a,c[d],d,e);f.push(this.b,g,j,v,g,i)}Z(b,c,d);g=x(a,c[d],d,e);f.push(this.b,g,b,v,g,i);V(this,f)}else d<e?(f=c[d],Z(b,c,d),g=x(a,f,d,e),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f)):b.parentNode.removeChild(b);else c==i?p(b):(o(b),g=x(a,c,0,1),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f))}else this.b(a,b)}; L.prototype.b=function(a,b){var c=X(b),e=c.jsdisplay;if(e){if(!w(a,e,b)){p(b);return}o(b)}if(e=c.jsvars)for(var d=0,f=e.length;d<f;d+=2){var h=e[d],g=w(a,e[d+1],b);a.a[h]=g}if(e=c.jsvalues){d=0;for(f=e.length;d<f;d+=2)if(g=e[d],h=w(a,e[d+1],b),g.charAt(0)=="$")a.a[g]=h;else if(g.charAt(0)=="."){for(var g=g.substr(1).split("."),j=b,O=g.length,B=0,$=O-1;B<$;++B){var C=g[B];j[C]||(j[C]={});j=j[C]}j[g[O-1]]=h}else g&&(typeof h=="boolean"?h?b.setAttribute(g,g):b.removeAttribute(g):b.setAttribute(g,""+ h))}if(e=c.jseval){d=0;for(f=e.length;d<f;++d)w(a,e[d],b)}e=c.jsskip;if(!e||!w(a,e,b))if(c=c.jscontent){if(c=""+w(a,c,b),b.innerHTML!=c){for(;b.firstChild;)e=b.firstChild,e.parentNode.removeChild(e);b.appendChild(this.j.createTextNode(c))}}else{c=W(this);for(e=b.firstChild;e;e=e.nextSibling)e.nodeType==1&&c.push(this.e,a,e);c.length&&V(this,c)}};function X(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b)return a.__jstcache=N[b];return T(a)} function Y(a,b){var c=document;if(b){var e=c.getElementById(a);if(!e){var e=b(),d=H,f=c.getElementById(d);if(!f)f=c.createElement(J),f.id=d,p(f),f.style.position="absolute",c.body.appendChild(f);d=c.createElement(J);f.appendChild(d);d.innerHTML=e;e=c.getElementById(a)}c=e}else c=c.getElementById(a);return c?(S(c),c=c.cloneNode(!0),c.removeAttribute(K),c):i}function Z(a,b,c){c==b.length-1?a.setAttribute(G,I+c):a.setAttribute(G,""+c)};window.jstGetTemplate=Y;window.JsEvalContext=s;window.jstProcess=function(a,b){var c=new L;S(b);c.j=b?b.nodeType==9?b:b.ownerDocument||document:document;var e=l(c,c.e,a,b),d=c.h=[],f=c.k=[];c.c=[];e();for(var h,g,j;d.length;)h=d[d.length-1],e=f[f.length-1],e>=h.length?(e=c,g=d.pop(),g.length=0,e.c.push(g),f.pop()):(g=h[e++],j=h[e++],h=h[e++],f[f.length-1]=e,g.call(c,j,h))}; })() var tp = document.getElementById('t');jstProcess(loadTimeData.createJsEvalContext(), tp);" kPrimaryResponse Which is: "primary" With diff: @@ -1,354 +1,1 @@ - - - - - - - This does.not.resolve page can\xE2\x80\x99t be found - - - No webpage was found for the web address: http://does.not.resolve/foo - - - - - - - - - - - - HTTP ERROR 404 - - null - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Reload - - - - - - - - - - - - - - - - - - - - - - No webpage was found for the web address: http://does.not.resolve/foo - - - - - - - - - -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** - * @fileoverview This file defines a singleton which provides access to all data - * that is available as soon as the page's resources are loaded (before DOM - * content has finished loading). This data includes both localized strings and - * any data that is important to have ready from a very early stage (e.g. things - * that must be displayed right away). - * - * Note that loadTimeData is not guaranteed to be consistent between page - * refreshes (https://crbug.com/740629) and should not contain values that might - * change if the page is re-opened later. - */ - -/** - * @typedef {{ - * substitutions: (Array<string>|undefined), - * attrs: (Object<function(Node, string):boolean>|undefined), - * tags: (Array<string>|undefined), - * }} - */ -let SanitizeInnerHtmlOpts; - -// eslint-disable-next-line no-var -/** @type {!LoadTimeData} */ var loadTimeData; - -// Expose this type globally as a temporary work around until -// https://github.com/google/closure-compiler/issues/544 is fixed. -/** @constructor */ -function LoadTimeData(){} - -(function() { - 'use strict'; - - LoadTimeData.prototype = { - /** - * Sets the backing object. - * - * Note that there is no getter for |data_| to discourage abuse of the form: - * - * var value = loadTimeData.data()['key']; - * - * @param {Object} value The de-serialized page data. - */ - set data(value) { - expect(!this.data_, 'Re-setting data.'); - this.data_ = value; - }, - - /** - * Returns a JsEvalContext for |data_|. - * @returns {JsEvalContext} - */ - createJsEvalContext: function() { - return new JsEvalContext(this.data_); - }, - - /** - * @param {string} id An ID of a value that might exist. - * @return {boolean} True if |id| is a key in the dictionary. - */ - valueExists: function(id) { - return id in this.data_; - }, - - /** - * Fetches a value, expecting that it exists. - * @param {string} id The key that identifies the desired value. - * @return {*} The corresponding value. - */ - getValue: function(id) { - expect(this.data_, 'No data. Did you remember to include strings.js?'); - const value = this.data_[id]; - expect(typeof value != 'undefined', 'Could not find value for ' + id); - return value; - }, - - /** - * As above, but also makes sure that the value is a string. - * @param {string} id The key that identifies the desired string. - * @return {string} The corresponding string value. - */ - getString: function(id) { - const value = this.getValue(id); - expectIsType(id, value, 'string'); - return /** @type {string} */ (value); - }, - - /** - * Returns a formatted localized string where $1 to $9 are replaced by the - * second to the tenth argument. - * @param {string} id The ID of the string we want. - * @param {...(string|number)} var_args The extra values to include in the - * formatted output. - * @return {string} The formatted string. - */ - getStringF: function(id, var_args) { - const value = this.getString(id); - if (!value) { - return ''; - } - - const args = Array.prototype.slice.call(arguments); - args[0] = value; - return this.substituteString.apply(this, args); - }, - - /** - * Make a string safe for use with with Polymer bindings that are - * inner-h-t-m-l (or other innerHTML use). - * @param {string} rawString The unsanitized string. - * @param {SanitizeInnerHtmlOpts=} opts Optional additional allowed tags and - * attributes. - * @return {string} - */ - sanitizeInnerHtml: function(rawString, opts) { - opts = opts || {}; - return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs) - .firstChild.innerHTML; - }, - - /** - * Returns a formatted localized string where $1 to $9 are replaced by the - * second to the tenth argument. Any standalone $ signs must be escaped as - * $$. - * @param {string} label The label to substitute through. - * This is not an resource ID. - * @param {...(string|number)} var_args The extra values to include in the - * formatted output. - * @return {string} The formatted string. - */ - substituteString: function(label, var_args) { - const varArgs = arguments; - return label.replace(/\\$(.|$|\\n)/g, function(m) { - assert(m.match(/\\$[$1-9]/), 'Unescaped $ found in localized string.'); - return m == '$$' ? '$' : varArgs[m[1]]; - }); - }, - - /** - * Returns a formatted string where $1 to $9 are replaced by the second to - * tenth argument, split apart into a list of pieces describing how the - * substitution was performed. Any standalone $ signs must be escaped as $$. - * @param {string} label A localized string to substitute through. - * This is not an resource ID. - * @param {...(string|number)} var_args The extra values to include in the - * formatted output. - * @return {!Array<!{value: string, arg: (null|string)}>} The formatted - * string pieces. - */ - getSubstitutedStringPieces: function(label, var_args) { - const varArgs = arguments; - // Split the string by separately matching all occurrences of $1-9 and of - // non $1-9 pieces. - const pieces = (label.match(/(\\$[1-9])|(([^$]|\\$([^1-9]|$))+)/g) || - []).map(function(p) { - // Pieces that are not $1-9 should be returned after replacing $$ - // with $. - if (!p.match(/^\\$[1-9]$/)) { - assert( - (p.match(/\\$/g) || []).length % 2 == 0, - 'Unescaped $ found in localized string.'); - return {value: p.replace(/\\$\\$/g, '$'), arg: null}; - } - - // Otherwise, return the substitution value. - return {value: varArgs[p[1]], arg: p}; - }); - - return pieces; - }, - - /** - * As above, but also makes sure that the value is a boolean. - * @param {string} id The key that identifies the desired boolean. - * @return {boolean} The corresponding boolean value. - */ - getBoolean: function(id) { - const value = this.getValue(id); - expectIsType(id, value, 'boolean'); - return /** @type {boolean} */ (value); - }, - - /** - * As above, but also makes sure that the value is an integer. - * @param {string} id The key that identifies the desired number. - * @return {number} The corresponding number value. - */ - getInteger: function(id) { - const value = this.getValue(id); - expectIsType(id, value, 'number'); - expect(value == Math.floor(value), 'Number isn\\'t integer: ' + value); - return /** @type {number} */ (value); - }, - - /** - * Override values in loadTimeData with the values found in |replacements|. - * @param {Object} replacements The dictionary object of keys to replace. - */ - overrideValues: function(replacements) { - expect( - typeof replacements == 'object', - 'Replacements must be a dictionary object.'); - for (const key in replacements) { - this.data_[key] = replacements[key]; - } - } - }; - - /** - * Checks condition, displays error message if expectation fails. - * @param {*} condition The condition to check for truthiness. - * @param {string} message The message to display if the check fails. - */ - function expect(condition, message) { - if (!condition) { - console.error( - 'Unexpected condition on ' + document.location.href + ': ' + message); - } - } - - /** - * Checks that the given value has the given type. - * @param {string} id The id of the value (only used for error message). - * @param {*} value The value to check the type on. - * @param {string} type The type we expect |value| to be. - */ - function expectIsType(id, value, type) { - expect( - typeof value == type, '[' + value + '] (' + id + ') is not a ' + type); - } - - expect(!loadTimeData, 'should only include this file once'); - loadTimeData = new LoadTimeData; -})(); -loadTimeData.data = {\"details\":\"Details\",\"errorCode\":\"HTTP ERROR 404\",\"fontfamily\":\"sans, Arial, sans-serif\",\"fontsize\":\"75%\",\"heading\":{\"hostName\":\"does.not.resolve\",\"msg\":\"This \\u003Cspan jscontent=\\\"hostName\\\">\\u003C/span> page can\xE2\x80\x99t be found\"},\"hideDetails\":\"Hide details\",\"iconClass\":\"icon-generic\",\"language\":\"en\",\"reloadButton\":{\"msg\":\"Reload\",\"reloadTrackingId\":-1,\"reloadUrl\":\"http://does.not.resolve/foo\"},\"suggestionsDetails\":[],\"suggestionsSummaryList\":[],\"summary\":{\"failedUrl\":\"http://does.not.resolve/foo\",\"hostName\":\"does.not.resolve\",\"msg\":\"No webpage was found for the web address: \\u003Cstrong jscontent=\\\"failedUrl\\\">\\u003C/strong>\"},\"textdirection\":\"ltr\",\"title\":\"does.not.resolve\"};// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file serves as a proxy to bring the included js file from /third_party -// into its correct location under the resources directory tree, whence it is -// delivered via a chrome://resources URL. See ../webui_resources.grd. - -// Note: this <include> is not behind a single-line comment because the first -// line of the file is source code (so the first line would be skipped) instead -// of a licence header. -// clang-format off -(function(){var i=null;function k(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function l(a,b){var c=k(arguments,2);return function(){return b.apply(a,c)}}function m(a,b){var c=new n(b);for(c.f=[a];c.f.length;){var e=c,d=c.f.shift();e.g(d);for(d=d.firstChild;d;d=d.nextSibling)d.nodeType==1&&e.f.push(d)}}function n(a){this.g=a}function o(a){a.style.display=\"\"}function p(a){a.style.display=\"none\"};var q=\":\",r=/\\s*;\\s*/;function s(){this.i.apply(this,arguments)}s.prototype.i=function(a,b){if(!this.a)this.a={};if(b){var c=this.a,e=b.a,d;for(d in e)c[d]=e[d]}else for(c in d=this.a,e=t,e)d[c]=e[c];this.a.$this=a;this.a.$context=this;this.d=typeof a!=\"undefined\"&&a!=i?a:\"\";if(!b)this.a.$top=this.d};var t={$default:i},u=[];function v(a){for(var b in a.a)delete a.a[b];a.d=i;u.push(a)}function w(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return t.$default}} -function x(a,b,c,e){if(u.length>0){var d=u.pop();s.call(d,b,a);a=d}else a=new s(b,a);a.a.$index=c;a.a.$count=e;return a}var y=\"a_\",z=\"b_\",A=\"with (a_) with (b_) return \",D={};function E(a){if(!D[a])try{D[a]=new Function(y,z,A+a)}catch(b){}return D[a]}function F(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c){var d=a[c].indexOf(q);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\\s+/,\"\").replace(/\\s+$/,\"\");d=E(a[c].substr(d+1));b.push(f,d)}}return b};var G=\"jsinstance\",H=\"jsts\",I=\"*\",J=\"div\",K=\"id\";function L(){}var M=0,N={0:{}},P={},Q={},R=[];function S(a){a.__jstcache||m(a,function(a){T(a)})}var U=[[\"jsselect\",E],[\"jsdisplay\",E],[\"jsvalues\",F],[\"jsvars\",F],[\"jseval\",function(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c)if(a[c]){var d=E(a[c]);b.push(d)}return b}],[\"transclude\",function(a){return a}],[\"jscontent\",E],[\"jsskip\",E]]; -function T(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute(\"jstcache\");if(b!=i)return a.__jstcache=N[b];for(var b=R.length=0,c=U.length;b<c;++b){var e=U[b][0],d=a.getAttribute(e);Q[e]=d;d!=i&&R.push(e+\"=\"+d)}if(R.length==0)return a.setAttribute(\"jstcache\",\"0\"),a.__jstcache=N[0];var f=R.join(\"&\");if(b=P[f])return a.setAttribute(\"jstcache\",b),a.__jstcache=N[b];for(var h={},b=0,c=U.length;b<c;++b){var d=U[b],e=d[0],g=d[1],d=Q[e];d!=i&&(h[e]=g(d))}b=\"\"+ ++M;a.setAttribute(\"jstcache\",b);N[b]= -h;P[f]=b;return a.__jstcache=h}function V(a,b){a.h.push(b);a.k.push(0)}function W(a){return a.c.length?a.c.pop():[]} -L.prototype.e=function(a,b){var c=X(b),e=c.transclude;if(e)(c=Y(e))?(b.parentNode.replaceChild(c,b),e=W(this),e.push(this.e,a,c),V(this,e)):b.parentNode.removeChild(b);else if(c=c.jsselect){var c=w(a,c,b),d=b.getAttribute(G),f=!1;d&&(d.charAt(0)==I?(d=parseInt(d.substr(1),10),f=!0):d=parseInt(d,10));var h=c!=i&&typeof c==\"object\"&&typeof c.length==\"number\",e=h?c.length:1,g=h&&e==0;if(h)if(g)d?b.parentNode.removeChild(b):(b.setAttribute(G,\"*0\"),p(b));else if(o(b),d===i||d===\"\"||f&&d<e-1){f=W(this); -d=d||0;for(h=e-1;d<h;++d){var j=b.cloneNode(!0);b.parentNode.insertBefore(j,b);Z(j,c,d);g=x(a,c[d],d,e);f.push(this.b,g,j,v,g,i)}Z(b,c,d);g=x(a,c[d],d,e);f.push(this.b,g,b,v,g,i);V(this,f)}else d<e?(f=c[d],Z(b,c,d),g=x(a,f,d,e),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f)):b.parentNode.removeChild(b);else c==i?p(b):(o(b),g=x(a,c,0,1),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f))}else this.b(a,b)}; -L.prototype.b=function(a,b){var c=X(b),e=c.jsdisplay;if(e){if(!w(a,e,b)){p(b);return}o(b)}if(e=c.jsvars)for(var d=0,f=e.length;d<f;d+=2){var h=e[d],g=w(a,e[d+1],b);a.a[h]=g}if(e=c.jsvalues){d=0;for(f=e.length;d<f;d+=2)if(g=e[d],h=w(a,e[d+1],b),g.charAt(0)==\"$\")a.a[g]=h;else if(g.charAt(0)==\".\"){for(var g=g.substr(1).split(\".\"),j=b,O=g.length,B=0,$=O-1;B<$;++B){var C=g[B];j[C]||(j[C]={});j=j[C]}j[g[O-1]]=h}else g&&(typeof h==\"boolean\"?h?b.setAttribute(g,g):b.removeAttribute(g):b.setAttribute(g,\"\"+ -h))}if(e=c.jseval){d=0;for(f=e.length;d<f;++d)w(a,e[d],b)}e=c.jsskip;if(!e||!w(a,e,b))if(c=c.jscontent){if(c=\"\"+w(a,c,b),b.innerHTML!=c){for(;b.firstChild;)e=b.firstChild,e.parentNode.removeChild(e);b.appendChild(this.j.createTextNode(c))}}else{c=W(this);for(e=b.firstChild;e;e=e.nextSibling)e.nodeType==1&&c.push(this.e,a,e);c.length&&V(this,c)}};function X(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute(\"jstcache\");if(b)return a.__jstcache=N[b];return T(a)} -function Y(a,b){var c=document;if(b){var e=c.getElementById(a);if(!e){var e=b(),d=H,f=c.getElementById(d);if(!f)f=c.createElement(J),f.id=d,p(f),f.style.position=\"absolute\",c.body.appendChild(f);d=c.createElement(J);f.appendChild(d);d.innerHTML=e;e=c.getElementById(a)}c=e}else c=c.getElementById(a);return c?(S(c),c=c.cloneNode(!0),c.removeAttribute(K),c):i}function Z(a,b,c){c==b.length-1?a.setAttribute(G,I+c):a.setAttribute(G,\"\"+c)};window.jstGetTemplate=Y;window.JsEvalContext=s;window.jstProcess=function(a,b){var c=new L;S(b);c.j=b?b.nodeType==9?b:b.ownerDocument||document:document;var e=l(c,c.e,a,b),d=c.h=[],f=c.k=[];c.c=[];e();for(var h,g,j;d.length;)h=d[d.length-1],e=f[f.length-1],e>=h.length?(e=c,g=d.pop(),g.length=0,e.c.push(g),f.pop()):(g=h[e++],j=h[e++],h=h[e++],f[f.length-1]=e,g.call(c,j,h))}; -})() -var tp = document.getElementById('t');jstProcess(loadTimeData.createJsEvalContext(), tp);" As Text: " This does.not.resolve page can?t be found No webpage was found for the web address: http://does.not.resolve/foo HTTP ERROR 404 null Reload No webpage was found for the web address: http://does.not.resolve/foo // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file defines a singleton which provides access to all data * that is available as soon as the page's resources are loaded (before DOM * content has finished loading). This data includes both localized strings and * any data that is important to have ready from a very early stage (e.g. things * that must be displayed right away). * * Note that loadTimeData is not guaranteed to be consistent between page * refreshes (https://crbug.com/740629) and should not contain values that might * change if the page is re-opened later. */ /** * @typedef {{ * substitutions: (Array<string>|undefined), * attrs: (Object<function(Node, string):boolean>|undefined), * tags: (Array<string>|undefined), * }} */ let SanitizeInnerHtmlOpts; // eslint-disable-next-line no-var /** @type {!LoadTimeData} */ var loadTimeData; // Expose this type globally as a temporary work around until // https://github.com/google/closure-compiler/issues/544 is fixed. /** @constructor */ function LoadTimeData(){} (function() { 'use strict'; LoadTimeData.prototype = { /** * Sets the backing object. * * Note that there is no getter for |data_| to discourage abuse of the form: * * var value = loadTimeData.data()['key']; * * @param {Object} value The de-serialized page data. */ set data(value) { expect(!this.data_, 'Re-setting data.'); this.data_ = value; }, /** * Returns a JsEvalContext for |data_|. * @returns {JsEvalContext} */ createJsEvalContext: function() { return new JsEvalContext(this.data_); }, /** * @param {string} id An ID of a value that might exist. * @return {boolean} True if |id| is a key in the dictionary. */ valueExists: function(id) { return id in this.data_; }, /** * Fetches a value, expecting that it exists. * @param {string} id The key that identifies the desired value. * @return {*} The corresponding value. */ getValue: function(id) { expect(this.data_, 'No data. Did you remember to include strings.js?'); const value = this.data_[id]; expect(typeof value != 'undefined', 'Could not find value for ' + id); return value; }, /** * As above, but also makes sure that the value is a string. * @param {string} id The key that identifies the desired string. * @return {string} The corresponding string value. */ getString: function(id) { const value = this.getValue(id); expectIsType(id, value, 'string'); return /** @type {string} */ (value); }, /** * Returns a formatted localized string where $1 to $9 are replaced by the * second to the tenth argument. * @param {string} id The ID of the string we want. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {string} The formatted string. */ getStringF: function(id, var_args) { const value = this.getString(id); if (!value) { return ''; } const args = Array.prototype.slice.call(arguments); args[0] = value; return this.substituteString.apply(this, args); }, /** * Make a string safe for use with with Polymer bindings that are * inner-h-t-m-l (or other innerHTML use). * @param {string} rawString The unsanitized string. * @param {SanitizeInnerHtmlOpts=} opts Optional additional allowed tags and * attributes. * @return {string} */ sanitizeInnerHtml: function(rawString, opts) { opts = opts || {}; return parseHtmlSubset('<b>' + rawString + '</b>', opts.tags, opts.attrs) .firstChild.innerHTML; }, /** * Returns a formatted localized string where $1 to $9 are replaced by the * second to the tenth argument. Any standalone $ signs must be escaped as * $$. * @param {string} label The label to substitute through. * This is not an resource ID. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {string} The formatted string. */ substituteString: function(label, var_args) { const varArgs = arguments; return label.replace(/\$(.|$| -)/g, function(m) { assert(m.match(/\$[$1-9]/), 'Unescaped $ found in localized string.'); return m == '$$' ? '$' : varArgs[m[1]]; }); }, /** * Returns a formatted string where $1 to $9 are replaced by the second to * tenth argument, split apart into a list of pieces describing how the * substitution was performed. Any standalone $ signs must be escaped as $$. * @param {string} label A localized string to substitute through. * This is not an resource ID. * @param {...(string|number)} var_args The extra values to include in the * formatted output. * @return {!Array<!{value: string, arg: (null|string)}>} The formatted * string pieces. */ getSubstitutedStringPieces: function(label, var_args) { const varArgs = arguments; // Split the string by separately matching all occurrences of $1-9 and of // non $1-9 pieces. const pieces = (label.match(/(\$[1-9])|(([^$]|\$([^1-9]|$))+)/g) || []).map(function(p) { // Pieces that are not $1-9 should be returned after replacing $$ // with $. if (!p.match(/^\$[1-9]$/)) { assert( (p.match(/\$/g) || []).length % 2 == 0, 'Unescaped $ found in localized string.'); return {value: p.replace(/\$\$/g, '$'), arg: null}; } // Otherwise, return the substitution value. return {value: varArgs[p[1]], arg: p}; }); return pieces; }, /** * As above, but also makes sure that the value is a boolean. * @param {string} id The key that identifies the desired boolean. * @return {boolean} The corresponding boolean value. */ getBoolean: function(id) { const value = this.getValue(id); expectIsType(id, value, 'boolean'); return /** @type {boolean} */ (value); }, /** * As above, but also makes sure that the value is an integer. * @param {string} id The key that identifies the desired number. * @return {number} The corresponding number value. */ getInteger: function(id) { const value = this.getValue(id); expectIsType(id, value, 'number'); expect(value == Math.floor(value), 'Number isn\'t integer: ' + value); return /** @type {number} */ (value); }, /** * Override values in loadTimeData with the values found in |replacements|. * @param {Object} replacements The dictionary object of keys to replace. */ overrideValues: function(replacements) { expect( typeof replacements == 'object', 'Replacements must be a dictionary object.'); for (const key in replacements) { this.data_[key] = replacements[key]; } } }; /** * Checks condition, displays error message if expectation fails. * @param {*} condition The condition to check for truthiness. * @param {string} message The message to display if the check fails. */ function expect(condition, message) { if (!condition) { console.error( 'Unexpected condition on ' + document.location.href + ': ' + message); } } /** * Checks that the given value has the given type. * @param {string} id The id of the value (only used for error message). * @param {*} value The value to check the type on. * @param {string} type The type we expect |value| to be. */ function expectIsType(id, value, type) { expect( typeof value == type, '[' + value + '] (' + id + ') is not a ' + type); } expect(!loadTimeData, 'should only include this file once'); loadTimeData = new LoadTimeData; })(); loadTimeData.data = {"details":"Details","errorCode":"HTTP ERROR 404","fontfamily":"sans, Arial, sans-serif","fontsize":"75%","heading":{"hostName":"does.not.resolve","msg":"This \u003Cspan jscontent=\"hostName\">\u003C/span> page can?t be found"},"hideDetails":"Hide details","iconClass":"icon-generic","language":"en","reloadButton":{"msg":"Reload","reloadTrackingId":-1,"reloadUrl":"http://does.not.resolve/foo"},"suggestionsDetails":[],"suggestionsSummaryList":[],"summary":{"failedUrl":"http://does.not.resolve/foo","hostName":"does.not.resolve","msg":"No webpage was found for the web address: \u003Cstrong jscontent=\"failedUrl\">\u003C/strong>"},"textdirection":"ltr","title":"does.not.resolve"};// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file serves as a proxy to bring the included js file from /third_party // into its correct location under the resources directory tree, whence it is // delivered via a chrome://resources URL. See ../webui_resources.grd. // Note: this <include> is not behind a single-line comment because the first // line of the file is source code (so the first line would be skipped) instead // of a licence header. // clang-format off (function(){var i=null;function k(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function l(a,b){var c=k(arguments,2);return function(){return b.apply(a,c)}}function m(a,b){var c=new n(b);for(c.f=[a];c.f.length;){var e=c,d=c.f.shift();e.g(d);for(d=d.firstChild;d;d=d.nextSibling)d.nodeType==1&&e.f.push(d)}}function n(a){this.g=a}function o(a){a.style.display=""}function p(a){a.style.display="none"};var q=":",r=/\s*;\s*/;function s(){this.i.apply(this,arguments)}s.prototype.i=function(a,b){if(!this.a)this.a={};if(b){var c=this.a,e=b.a,d;for(d in e)c[d]=e[d]}else for(c in d=this.a,e=t,e)d[c]=e[c];this.a.$this=a;this.a.$context=this;this.d=typeof a!="undefined"&&a!=i?a:"";if(!b)this.a.$top=this.d};var t={$default:i},u=[];function v(a){for(var b in a.a)delete a.a[b];a.d=i;u.push(a)}function w(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return t.$default}} function x(a,b,c,e){if(u.length>0){var d=u.pop();s.call(d,b,a);a=d}else a=new s(b,a);a.a.$index=c;a.a.$count=e;return a}var y="a_",z="b_",A="with (a_) with (b_) return ",D={};function E(a){if(!D[a])try{D[a]=new Function(y,z,A+a)}catch(b){}return D[a]}function F(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c){var d=a[c].indexOf(q);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\s+/,"").replace(/\s+$/,"");d=E(a[c].substr(d+1));b.push(f,d)}}return b};var G="jsinstance",H="jsts",I="*",J="div",K="id";function L(){}var M=0,N={0:{}},P={},Q={},R=[];function S(a){a.__jstcache||m(a,function(a){T(a)})}var U=[["jsselect",E],["jsdisplay",E],["jsvalues",F],["jsvars",F],["jseval",function(a){for(var b=[],a=a.split(r),c=0,e=a.length;c<e;++c)if(a[c]){var d=E(a[c]);b.push(d)}return b}],["transclude",function(a){return a}],["jscontent",E],["jsskip",E]]; function T(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b!=i)return a.__jstcache=N[b];for(var b=R.length=0,c=U.length;b<c;++b){var e=U[b][0],d=a.getAttribute(e);Q[e]=d;d!=i&&R.push(e+"="+d)}if(R.length==0)return a.setAttribute("jstcache","0"),a.__jstcache=N[0];var f=R.join("&");if(b=P[f])return a.setAttribute("jstcache",b),a.__jstcache=N[b];for(var h={},b=0,c=U.length;b<c;++b){var d=U[b],e=d[0],g=d[1],d=Q[e];d!=i&&(h[e]=g(d))}b=""+ ++M;a.setAttribute("jstcache",b);N[b]= h;P[f]=b;return a.__jstcache=h}function V(a,b){a.h.push(b);a.k.push(0)}function W(a){return a.c.length?a.c.pop():[]} L.prototype.e=function(a,b){var c=X(b),e=c.transclude;if(e)(c=Y(e))?(b.parentNode.replaceChild(c,b),e=W(this),e.push(this.e,a,c),V(this,e)):b.parentNode.removeChild(b);else if(c=c.jsselect){var c=w(a,c,b),d=b.getAttribute(G),f=!1;d&&(d.charAt(0)==I?(d=parseInt(d.substr(1),10),f=!0):d=parseInt(d,10));var h=c!=i&&typeof c=="object"&&typeof c.length=="number",e=h?c.length:1,g=h&&e==0;if(h)if(g)d?b.parentNode.removeChild(b):(b.setAttribute(G,"*0"),p(b));else if(o(b),d===i||d===""||f&&d<e-1){f=W(this); d=d||0;for(h=e-1;d<h;++d){var j=b.cloneNode(!0);b.parentNode.insertBefore(j,b);Z(j,c,d);g=x(a,c[d],d,e);f.push(this.b,g,j,v,g,i)}Z(b,c,d);g=x(a,c[d],d,e);f.push(this.b,g,b,v,g,i);V(this,f)}else d<e?(f=c[d],Z(b,c,d),g=x(a,f,d,e),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f)):b.parentNode.removeChild(b);else c==i?p(b):(o(b),g=x(a,c,0,1),f=W(this),f.push(this.b,g,b,v,g,i),V(this,f))}else this.b(a,b)}; L.prototype.b=function(a,b){var c=X(b),e=c.jsdisplay;if(e){if(!w(a,e,b)){p(b);return}o(b)}if(e=c.jsvars)for(var d=0,f=e.length;d<f;d+=2){var h=e[d],g=w(a,e[d+1],b);a.a[h]=g}if(e=c.jsvalues){d=0;for(f=e.length;d<f;d+=2)if(g=e[d],h=w(a,e[d+1],b),g.charAt(0)=="$")a.a[g]=h;else if(g.charAt(0)=="."){for(var g=g.substr(1).split("."),j=b,O=g.length,B=0,$=O-1;B<$;++B){var C=g[B];j[C]||(j[C]={});j=j[C]}j[g[O-1]]=h}else g&&(typeof h=="boolean"?h?b.setAttribute(g,g):b.removeAttribute(g):b.setAttribute(g,""+ h))}if(e=c.jseval){d=0;for(f=e.length;d<f;++d)w(a,e[d],b)}e=c.jsskip;if(!e||!w(a,e,b))if(c=c.jscontent){if(c=""+w(a,c,b),b.innerHTML!=c){for(;b.firstChild;)e=b.firstChild,e.parentNode.removeChild(e);b.appendChild(this.j.createTextNode(c))}}else{c=W(this);for(e=b.firstChild;e;e=e.nextSibling)e.nodeType==1&&c.push(this.e,a,e);c.length&&V(this,c)}};function X(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b)return a.__jstcache=N[b];return T(a)} function Y(a,b){var c=document;if(b){var e=c.getElementById(a);if(!e){var e=b(),d=H,f=c.getElementById(d);if(!f)f=c.createElement(J),f.id=d,p(f),f.style.position="absolute",c.body.appendChild(f);d=c.createElement(J);f.appendChild(d);d.innerHTML=e;e=c.getElementById(a)}c=e}else c=c.getElementById(a);return c?(S(c),c=c.cloneNode(!0),c.removeAttribute(K),c):i}function Z(a,b,c){c==b.length-1?a.setAttribute(G,I+c):a.setAttribute(G,""+c)};window.jstGetTemplate=Y;window.JsEvalContext=s;window.jstProcess=function(a,b){var c=new L;S(b);c.j=b?b.nodeType==9?b:b.ownerDocument||document:document;var e=l(c,c.e,a,b),d=c.h=[],f=c.k=[];c.c=[];e();for(var h,g,j;d.length;)h=d[d.length-1],e=f[f.length-1],e>=h.length?(e=c,g=d.pop(),g.length=0,e.c.push(g),f.pop()):(g=h[e++],j=h[e++],h=h[e++],f[f.length-1]=e,g.call(c,j,h))}; })() var tp = document.getElementById('t');jstProcess(loadTimeData.createJsEvalContext(), tp); +primary Stack trace: #0 0x55606bd97aff StackTraceGetter::CurrentStackTrace() #1 0x55606bda043c testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #2 0x55606bd9fd99 testing::internal::AssertHelper::operator=() #3 0x55606a902171 data_reduction_proxy::DataReductionProxyWithHoldbackBrowsertest_UpdateConfig_Test::RunTestOnMainThread() #4 0x55606e3a1c81 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #5 0x55606dfa8c80 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #6 0x55606dfa795d ChromeBrowserMainParts::PreMainMessageLoopRun() #7 0x55606c754d2f content::BrowserMainLoop::PreMainMessageLoopRun() #8 0x55606cb26457 content::StartupTaskRunner::RunAllTasksNow() #9 0x55606c753918 content::BrowserMainLoop::CreateStartupTasks() #10 0x55606c756bc2 content::BrowserMainRunnerImpl::Initialize() #11 0x55606c751dbf content::BrowserMain() #12 0x55606dc0c059 content::ContentMainRunnerImpl::RunServiceManager() #13 0x55606dc0bce6 content::ContentMainRunnerImpl::Run() #14 0x55606fa9b38b service_manager::Main() #15 0x55606dc09fe1 content::ContentMain() #16 0x55606e3a189f content::BrowserTestBase::SetUp() #17 0x55606df4fa87 InProcessBrowserTest::SetUp() [10929:10960:0522/003147.521896:ERROR:browser_process_sub_thread.cc(221)] Waited 15 ms for network service [10929:10929:0522/003147.526090:WARNING:pref_notifier_impl.cc(36)] Pref observer for browser.relaunch_notification_period found at shutdown. [10929:10929:0522/003147.526125:WARNING:pref_notifier_impl.cc(36)] Pref observer for media_router.cast_allow_all_ips found at shutdown. [ FAILED ] DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0, where GetParam() = false (985 ms) [ RUN ] DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0 Xlib: extension "RANDR" missing on display ":109". [11155:11155:0522/003335.975276:WARNING:password_store_factory.cc(262)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. [11155:11188:0522/003335.987319:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") (browser_tests:11155): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Unknown or unsupported transport 'disabled' for address 'disabled:' [11155:11176:0522/003336.056650:WARNING:leveldb_database.cc(106)] Unable to open /b/s/w/itCAxUvs/.org.chromium.Chromium.KS272g/dJxag6x/Default/shared_proto_db: Invalid argument: /b/s/w/itCAxUvs/.org.chromium.Chromium.KS272g/dJxag6x/Default/shared_proto_db: does not exist (create_if_missing is false) [11155:11236:0522/003336.070390:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [11155:11236:0522/003336.070421:WARNING:property.cc(146)] DaemonVersion: GetAndBlock: failed. [11155:11236:0522/003336.070619:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [11155:11236:0522/003336.070838:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [11155:11168:0522/003336.169682:ERROR:browser_process_sub_thread.cc(221)] Waited 7 ms for network service [11155:11155:0522/003336.191094:WARNING:pref_notifier_impl.cc(36)] Pref observer for browser.relaunch_notification_period found at shutdown. [11155:11155:0522/003336.191118:WARNING:pref_notifier_impl.cc(36)] Pref observer for media_router.cast_allow_all_ips found at shutdown. [ OK ] DataReductionProxyWithHoldbackBrowsertest.UpdateConfig/0 (410 ms) ================================================================================