| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/media/webrtc_browsertest_base.h" | 5 #include "chrome/browser/media/webrtc_browsertest_base.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| 79 | 79 |
| 80 WebRtcTestBase::WebRtcTestBase(): detect_errors_in_javascript_(false) { | 80 WebRtcTestBase::WebRtcTestBase(): detect_errors_in_javascript_(false) { |
| 81 // The handler gets set for each test method, but that's fine since this | 81 // The handler gets set for each test method, but that's fine since this |
| 82 // set operation is idempotent. | 82 // set operation is idempotent. |
| 83 logging::SetLogMessageHandler(&JavascriptErrorDetectingLogHandler); | 83 logging::SetLogMessageHandler(&JavascriptErrorDetectingLogHandler); |
| 84 hit_javascript_errors_.Get() = false; | 84 hit_javascript_errors_.Get() = false; |
| 85 | |
| 86 EnablePixelOutput(); | |
| 87 } | 85 } |
| 88 | 86 |
| 89 WebRtcTestBase::~WebRtcTestBase() { | 87 WebRtcTestBase::~WebRtcTestBase() { |
| 90 if (detect_errors_in_javascript_) { | 88 if (detect_errors_in_javascript_) { |
| 91 EXPECT_FALSE(hit_javascript_errors_.Get()) | 89 EXPECT_FALSE(hit_javascript_errors_.Get()) |
| 92 << "Encountered javascript errors during test execution (Search " | 90 << "Encountered javascript errors during test execution (Search " |
| 93 << "for Uncaught or ERROR:CONSOLE in the test output)."; | 91 << "for Uncaught or ERROR:CONSOLE in the test output)."; |
| 94 } | 92 } |
| 95 } | 93 } |
| 96 | 94 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 #endif | 359 #endif |
| 362 } | 360 } |
| 363 | 361 |
| 364 bool WebRtcTestBase::OnWin8() const { | 362 bool WebRtcTestBase::OnWin8() const { |
| 365 #if defined(OS_WIN) | 363 #if defined(OS_WIN) |
| 366 return base::win::GetVersion() > base::win::VERSION_WIN7; | 364 return base::win::GetVersion() > base::win::VERSION_WIN7; |
| 367 #else | 365 #else |
| 368 return false; | 366 return false; |
| 369 #endif | 367 #endif |
| 370 } | 368 } |
| OLD | NEW |