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

Unified Diff: chrome/browser/android/vr_shell/gltf_parser_unittest.cc

Issue 2852103002: Revert of Implementing Binary glTF reader for the VR controller model (Closed)
Patch Set: Created 3 years, 8 months 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: chrome/browser/android/vr_shell/gltf_parser_unittest.cc
diff --git a/chrome/browser/android/vr_shell/gltf_parser_unittest.cc b/chrome/browser/android/vr_shell/gltf_parser_unittest.cc
index b987d7af77c38f853cb428cdb49b58357955ce28..b7ff48ee342c367031a6689d985ae551129d705f 100644
--- a/chrome/browser/android/vr_shell/gltf_parser_unittest.cc
+++ b/chrome/browser/android/vr_shell/gltf_parser_unittest.cc
@@ -17,24 +17,16 @@
namespace vr_shell {
-class DataDrivenTest : public testing::Test {
+class GltfParserTest : public testing::Test {
protected:
static void SetUpTestCase() { test::RegisterPathProvider(); }
void SetUp() override { PathService::Get(test::DIR_TEST_DATA, &data_dir_); }
base::FilePath data_dir_;
-};
-class GltfParserTest : public DataDrivenTest {
- protected:
std::unique_ptr<base::DictionaryValue> Deserialize(
const base::FilePath& gltf_path);
-};
-
-class BinaryGltfParserTest : public DataDrivenTest {
- protected:
- base::StringPiece Read(const base::FilePath& path);
};
std::unique_ptr<base::DictionaryValue> GltfParserTest::Deserialize(
@@ -48,12 +40,6 @@
EXPECT_TRUE(asset_value->GetAsDictionary(&asset));
asset_value.release();
return std::unique_ptr<base::DictionaryValue>(asset);
-}
-
-base::StringPiece BinaryGltfParserTest::Read(const base::FilePath& path) {
- std::string data;
- base::ReadFileToString(path, &data);
- return base::StringPiece(data);
}
TEST_F(GltfParserTest, Parse) {
@@ -171,15 +157,4 @@
EXPECT_EQ(nullptr, parser.Parse(*asset, &buffers));
}
-TEST_F(BinaryGltfParserTest, ParseBinary) {
- auto glb_data = Read(data_dir_.Append("sample.glb"));
- std::vector<std::unique_ptr<gltf::Buffer>> buffers;
- auto asset = BinaryGltfParser::Parse(glb_data, &buffers);
- EXPECT_TRUE(asset);
- EXPECT_EQ(1u, buffers.size());
- const gltf::BufferView* buffer_view = asset->GetBufferView(0);
- EXPECT_TRUE(buffer_view);
- EXPECT_EQ(0, buffer_view->buffer);
-}
-
} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/gltf_parser.cc ('k') | chrome/browser/android/vr_shell/test/data/sample.glb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698