Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: cc/layer_tree_host_perftest.cc

Issue 11412289: Basic pixel tests for cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moves png comparison code to cc/test, does actual comparison Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layer_tree_host_perftest.cc
diff --git a/cc/layer_tree_host_perftest.cc b/cc/layer_tree_host_perftest.cc
index d72c1bd4de9aa8e0de2c8572d541f222c5ae9b8d..fde2f93a461a2c37cf2fcfa1abd34dcd635caf3f 100644
--- a/cc/layer_tree_host_perftest.cc
+++ b/cc/layer_tree_host_perftest.cc
@@ -10,6 +10,7 @@
#include "base/json/json_reader.h"
#include "base/path_service.h"
#include "base/string_piece.h"
+#include "cc/cc_paths.h"
#include "cc/content_layer.h"
#include "cc/nine_patch_layer.h"
#include "cc/solid_color_layer.h"
@@ -240,12 +241,11 @@ class LayerTreeHostPerfTestJsonReader : public LayerTreeHostPerfTest {
void readTestFile(std::string name) {
test_name_ = name;
- FilePath filepath;
- ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &filepath));
- filepath = filepath.AppendASCII("cc").AppendASCII("test")
- .AppendASCII("data").AppendASCII(name + ".json");
+ FilePath test_data_dir;
+ ASSERT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir));
+ FilePath json_file = test_data_dir.AppendASCII(name + ".json");
std::string json;
- ASSERT_TRUE(file_util::ReadFileToString(filepath, &json));
+ ASSERT_TRUE(file_util::ReadFileToString(json_file, &json));
tree_.reset(base::JSONReader::Read(json));
ASSERT_TRUE(tree_);
}

Powered by Google App Engine
This is Rietveld 408576698