summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-28 17:52:52 +0000
committershadi@chromium.org <shadi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-28 17:52:52 +0000
commit8eb331e5c232bbde9b9bde3f7cddf0b5ddb86206 (patch)
tree734314ac0babbcd2e10cc00c4555b83330c10cf7
parent77caeaab4baeebe96fb7b5b163912e79eaa3ed85 (diff)
downloadchromium_src-8eb331e5c232bbde9b9bde3f7cddf0b5ddb86206.zip
chromium_src-8eb331e5c232bbde9b9bde3f7cddf0b5ddb86206.tar.gz
chromium_src-8eb331e5c232bbde9b9bde3f7cddf0b5ddb86206.tar.bz2
Revert 254088 "Perf test to measure loading CDM library."
> Perf test to measure loading CDM library. > > BUG=337674 > > Review URL: https://codereview.chromium.org/151283003 Failing on Windows. BUG=348037 TBR=shadi@chromium.org Review URL: https://codereview.chromium.org/184033006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254163 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/all.gyp1
-rw-r--r--chrome/browser/load_library_perf_test.cc62
-rw-r--r--chrome/chrome_tests.gypi18
3 files changed, 0 insertions, 81 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 8342c11..3bfc588 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -479,7 +479,6 @@
'dependencies': [
'../cc/cc_tests.gyp:cc_perftests',
'../chrome/chrome.gyp:chrome',
- '../chrome/chrome.gyp:load_library_perf_tests',
'../chrome/chrome.gyp:performance_browser_tests',
'../chrome/chrome.gyp:performance_ui_tests',
'../chrome/chrome.gyp:sync_performance_tests',
diff --git a/chrome/browser/load_library_perf_test.cc b/chrome/browser/load_library_perf_test.cc
deleted file mode 100644
index e778af9..0000000
--- a/chrome/browser/load_library_perf_test.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 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.
-
-#include "base/files/file_path.h"
-#include "base/path_service.h"
-#include "base/scoped_native_library.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/perf/perf_test.h"
-#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
-
-
-void MeasureTimeToLoadNativeLibrary(const base::FilePath& library_name) {
- base::FilePath output_dir;
- ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &output_dir));
- base::FilePath library_path = output_dir.Append(library_name);
- std::string error;
- base::TimeTicks start = base::TimeTicks::HighResNow();
- base::NativeLibrary native_library =
- base::LoadNativeLibrary(library_path, &error);
- double delta = (base::TimeTicks::HighResNow() - start).InMillisecondsF();
- ASSERT_TRUE(native_library) << "Error loading library:\n" << error;
- base::UnloadNativeLibrary(native_library);
- perf_test::PrintResult("time_to_load_library",
- "",
- library_name.AsUTF8Unsafe(),
- delta,
- "ms",
- true);
-}
-
-// Use the base name of the library to dynamically get the platform specific
-// name. See base::GetNativeLibraryName() for details.
-void MeasureTimeToLoadNativeLibraryByBaseName(
- const std::string& base_library_name) {
- MeasureTimeToLoadNativeLibrary(base::FilePath::FromUTF16Unsafe(
- base::GetNativeLibraryName(base::ASCIIToUTF16(base_library_name))));
-}
-
-#if defined(ENABLE_PEPPER_CDMS)
-#if defined(WIDEVINE_CDM_AVAILABLE)
-TEST(LoadCDMPerfTest, Widevine) {
- MeasureTimeToLoadNativeLibrary(
- base::FilePath(FILE_PATH_LITERAL(kWidevineCdmFileName)));
-}
-
-TEST(LoadCDMPerfTest, WidevineAdapter) {
- MeasureTimeToLoadNativeLibrary(
- base::FilePath(FILE_PATH_LITERAL(kWidevineCdmAdapterFileName)));
-}
-#endif // defined(WIDEVINE_CDM_AVAILABLE)
-
-TEST(LoadCDMPerfTest, ExternalClearKey) {
- MeasureTimeToLoadNativeLibraryByBaseName("clearkeycdm");
-}
-
-TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) {
- MeasureTimeToLoadNativeLibraryByBaseName("clearkeycdmadapter");
-}
-#endif // defined(ENABLE_PEPPER_CDMS)
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 006c64e..853fbbb 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2833,24 +2833,6 @@
'../third_party/webrtc/tools/tools.gyp:rgba_to_i420_converter',
],
}, # target 'webrtc_test_tools'
- {
- # Executable to measure time to load libraries.
- 'target_name': 'load_library_perf_tests',
- 'type': '<(gtest_target_type)',
- 'dependencies': [
- '../base/base.gyp:test_support_perf',
- '../testing/gtest.gyp:gtest',
- '../testing/perf/perf_test.gyp:*',
- '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
- ],
- 'sources': [
- 'browser/load_library_perf_test.cc',
- ],
- 'include_dirs': [
- '..',
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- }, # target 'load_library_perf_tests'
],
'conditions': [
['OS=="mac"', {