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

Unified Diff: third_party/ots/test/table_dependencies_test.cc

Issue 797183002: Revert of Updating OTS repo from https://github.com/khaledhosny/ots.git (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « third_party/ots/test/side-by-side.cc ('k') | third_party/ots/test/test_malicious_fonts.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/test/table_dependencies_test.cc
diff --git a/third_party/ots/test/table_dependencies_test.cc b/third_party/ots/test/table_dependencies_test.cc
deleted file mode 100644
index bbaaa30bb3cb4e2b1a0239ec642a2d54a8105867..0000000000000000000000000000000000000000
--- a/third_party/ots/test/table_dependencies_test.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2011 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 <gtest/gtest.h>
-
-#include "gsub.h"
-#include "ots.h"
-#include "ots-memory-stream.h"
-#include "vhea.h"
-#include "vmtx.h"
-
-#define SET_TABLE(name, capname) \
- do { file.name = new ots::OpenType##capname; } while (0)
-#define SET_LAYOUT_TABLE(name, capname) \
- do { \
- if (!file.name) { \
- SET_TABLE(name, capname); \
- } \
- file.name->data = reinterpret_cast<const uint8_t*>(1); \
- file.name->length = 1; \
- } while (0)
-#define DROP_TABLE(name) \
- do { delete file.name; file.name = NULL; } while (0)
-#define DROP_LAYOUT_TABLE(name) \
- do { file.name->data = NULL; file.name->length = 0; } while (0)
-
-namespace {
-
-class TableDependenciesTest : public ::testing::Test {
- protected:
- virtual void SetUp() {
- SET_LAYOUT_TABLE(gsub, GSUB);
- SET_TABLE(vhea, VHEA);
- SET_TABLE(vmtx, VMTX);
- }
-
- virtual void TearDown() {
- DROP_TABLE(gsub);
- DROP_TABLE(vhea);
- DROP_TABLE(vmtx);
- }
- ots::OpenTypeFile file;
-};
-} // namespace
-
-TEST_F(TableDependenciesTest, TestVhea) {
- EXPECT_TRUE(ots::ots_vhea_should_serialise(&file));
-}
-
-TEST_F(TableDependenciesTest, TestVmtx) {
- EXPECT_TRUE(ots::ots_vmtx_should_serialise(&file));
-}
-
-TEST_F(TableDependenciesTest, TestVheaVmtx) {
- DROP_TABLE(vmtx);
- EXPECT_FALSE(ots::ots_vhea_should_serialise(&file));
-}
-
-TEST_F(TableDependenciesTest, TestVmtxVhea) {
- DROP_TABLE(vhea);
- EXPECT_FALSE(ots::ots_vmtx_should_serialise(&file));
-}
-
-TEST_F(TableDependenciesTest, TestVheaGsub) {
- DROP_LAYOUT_TABLE(gsub);
- EXPECT_FALSE(ots::ots_vhea_should_serialise(&file));
- DROP_TABLE(gsub);
- EXPECT_FALSE(ots::ots_vhea_should_serialise(&file));
-}
-
-TEST_F(TableDependenciesTest, TestVmtxGsub) {
- DROP_LAYOUT_TABLE(gsub);
- EXPECT_FALSE(ots::ots_vmtx_should_serialise(&file));
- DROP_TABLE(gsub);
- EXPECT_FALSE(ots::ots_vmtx_should_serialise(&file));
-}
-
« no previous file with comments | « third_party/ots/test/side-by-side.cc ('k') | third_party/ots/test/test_malicious_fonts.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698