| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/path_service.h" | 5 #include "base/path_service.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/test/remoting/qunit_browser_test_runner.h" | 7 #include "chrome/test/remoting/qunit_browser_test_runner.h" |
| 8 | 8 |
| 9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| 11 #endif // !defined(OS_MACOSX) | 11 #endif // !defined(OS_MACOSX) |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 | 14 |
| 15 // Disable test on (dbg) as it takes longer than 30s to complete. | 15 // Disable test on (dbg) as it takes longer than 30s to complete. |
| 16 // https://crbug.com/504204. | 16 // https://crbug.com/504204. |
| 17 #if (!defined(NDEBUG)) | 17 // Also disable on ASAN due to flake: crbug.com/685025 |
| 18 #if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) |
| 18 #define MAYBE_Remoting_Webapp_Js_Unittest DISABLED_Remoting_Webapp_Js_Unittest | 19 #define MAYBE_Remoting_Webapp_Js_Unittest DISABLED_Remoting_Webapp_Js_Unittest |
| 19 #else | 20 #else |
| 20 #define MAYBE_Remoting_Webapp_Js_Unittest Remoting_Webapp_Js_Unittest | 21 #define MAYBE_Remoting_Webapp_Js_Unittest Remoting_Webapp_Js_Unittest |
| 21 #endif | 22 #endif |
| 22 | 23 |
| 23 IN_PROC_BROWSER_TEST_F(QUnitBrowserTestRunner, | 24 IN_PROC_BROWSER_TEST_F(QUnitBrowserTestRunner, |
| 24 MAYBE_Remoting_Webapp_Js_Unittest) { | 25 MAYBE_Remoting_Webapp_Js_Unittest) { |
| 25 base::FilePath base_dir; | 26 base::FilePath base_dir; |
| 26 ASSERT_TRUE(PathService::Get(base::DIR_EXE, &base_dir)); | 27 ASSERT_TRUE(PathService::Get(base::DIR_EXE, &base_dir)); |
| 27 | 28 |
| 28 #if defined(OS_MACOSX) | 29 #if defined(OS_MACOSX) |
| 29 if (base::mac::AmIBundled()) { | 30 if (base::mac::AmIBundled()) { |
| 30 // If we are inside a mac bundle, navigate up to the output directory | 31 // If we are inside a mac bundle, navigate up to the output directory |
| 31 base_dir = base::mac::GetAppBundlePath(base_dir).DirName(); | 32 base_dir = base::mac::GetAppBundlePath(base_dir).DirName(); |
| 32 } | 33 } |
| 33 #endif // !defined(OS_MACOSX) | 34 #endif // !defined(OS_MACOSX) |
| 34 RunTest( | 35 RunTest( |
| 35 base_dir.Append(FILE_PATH_LITERAL("remoting/unittests/unittests.html"))); | 36 base_dir.Append(FILE_PATH_LITERAL("remoting/unittests/unittests.html"))); |
| 36 } | 37 } |
| 37 | 38 |
| 38 } // namespace remoting | 39 } // namespace remoting |
| OLD | NEW |