summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-27 13:23:43 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-27 21:25:12 +0000
commit22b289069c0855b4730a77abf6faaec731df175a (patch)
tree93d6888eb8da1a1005f0e0db2be8c69e0ce4361f /tools/grit
parent1ff754ced685b74915215ae58546862b13b10ce2 (diff)
downloadchromium_src-22b289069c0855b4730a77abf6faaec731df175a.zip
chromium_src-22b289069c0855b4730a77abf6faaec731df175a.tar.gz
chromium_src-22b289069c0855b4730a77abf6faaec731df175a.tar.bz2
Switch to standard integer types in tools/grit/.
BUG=138542 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1549263002 Cr-Commit-Position: refs/heads/master@{#366934}
Diffstat (limited to 'tools/grit')
-rwxr-xr-xtools/grit/grit/format/resource_map.py5
-rwxr-xr-xtools/grit/grit/format/resource_map_unittest.py21
2 files changed, 18 insertions, 8 deletions
diff --git a/tools/grit/grit/format/resource_map.py b/tools/grit/grit/format/resource_map.py
index 37ac54a..aca9f7f 100755
--- a/tools/grit/grit/format/resource_map.py
+++ b/tools/grit/grit/format/resource_map.py
@@ -83,7 +83,10 @@ def _FormatSourceHeader(root):
#include "%(map_header_file)s"
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
+
#include "%(rc_header_file)s"
const GritResourceMap %(map_name)s[] = {
diff --git a/tools/grit/grit/format/resource_map_unittest.py b/tools/grit/grit/format/resource_map_unittest.py
index 55de504..f0eb72d 100755
--- a/tools/grit/grit/format/resource_map_unittest.py
+++ b/tools/grit/grit/format/resource_map_unittest.py
@@ -68,7 +68,8 @@ extern const size_t kTheRcHeaderSize;''', output)
resource_map.GetFormatter('resource_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"IDC_KLONKMENU", IDC_KLONKMENU},
@@ -82,7 +83,8 @@ const size_t kTheRcHeaderSize = arraysize(kTheRcHeader);''', output)
resource_map.GetFormatter('resource_file_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"grit/testdata/klonk.rc", IDC_KLONKMENU},
@@ -136,7 +138,8 @@ extern const size_t kTheRcHeaderSize;''', output)
resource_map.GetFormatter('resource_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"IDR_KLONKMENU", IDR_KLONKMENU},
@@ -146,7 +149,8 @@ const size_t kTheRcHeaderSize = arraysize(kTheRcHeader);''', output)
resource_map.GetFormatter('resource_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"IDR_KLONKMENU", IDR_KLONKMENU},
@@ -196,7 +200,8 @@ extern const size_t kTheRcHeaderSize;''', output)
resource_map.GetFormatter('resource_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"IDC_KLONKMENU", IDC_KLONKMENU},
@@ -208,7 +213,8 @@ const size_t kTheRcHeaderSize = arraysize(kTheRcHeader);''', output)
resource_map.GetFormatter('resource_file_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_resource_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"grit/testdata/klonk.rc", IDC_KLONKMENU},
@@ -266,7 +272,8 @@ extern const size_t kTheRcHeaderSize;''', output)
resource_map.GetFormatter('resource_map_source')(grd, 'en', '.')))
self.assertEqual('''\
#include "the_rc_map_header.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+#include "base/macros.h"
#include "the_rc_header.h"
const GritResourceMap kTheRcHeader[] = {
{"IDS_PRODUCT_NAME", IDS_PRODUCT_NAME},