Index: chrome/browser/resources/gpu_internals/browser_bridge.js |
diff --git a/chrome/browser/resources/gpu_internals/browser_bridge.js b/chrome/browser/resources/gpu_internals/browser_bridge.js |
index bcc97b87d69865277c13375a805a8b9df0ed4e7b..b632b35ea0daaa19241bcd6ed8887f0fdb770e23 100644 |
--- a/chrome/browser/resources/gpu_internals/browser_bridge.js |
+++ b/chrome/browser/resources/gpu_internals/browser_bridge.js |
@@ -11,13 +11,11 @@ cr.define('gpu', function() { |
function BrowserBridge() { |
// If we are not running inside WebUI, output chrome.send messages |
// to the console to help with quick-iteration debugging. |
- if (chrome.send === undefined && console.log) { |
- this.debugMode_ = true; |
+ this.debugMode_ = (chrome.send === undefined && console.log); |
+ if (this.debugMode_) { |
var browserBridgeTests = document.createElement('script'); |
browserBridgeTests.src = './gpu_internals/browser_bridge_tests.js'; |
document.body.appendChild(browserBridgeTests); |
- } else { |
- this.debugMode_ = false; |
} |
this.nextRequestId_ = 0; |