• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "base/basictypes.h"
6 
7 namespace ui {
8 
9 extern const char kSamplePakContents[] = {
10     0x04, 0x00, 0x00, 0x00,               // header(version
11     0x04, 0x00, 0x00, 0x00,               //        no. entries
12     0x01,                                 //        encoding)
13     0x01, 0x00, 0x27, 0x00, 0x00, 0x00,   // index entry 1
14     0x04, 0x00, 0x27, 0x00, 0x00, 0x00,   // index entry 4
15     0x06, 0x00, 0x33, 0x00, 0x00, 0x00,   // index entry 6
16     0x0a, 0x00, 0x3f, 0x00, 0x00, 0x00,   // index entry 10
17     0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,   // extra entry for the size of last
18     't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4',
19     't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '6'
20 };
21 
22 extern const size_t kSamplePakSize = sizeof(kSamplePakContents);
23 
24 extern const char kSampleCorruptPakContents[] = {
25     0x04, 0x00, 0x00, 0x00,               // header(version
26     0x04, 0x00, 0x00, 0x00,               //        no. entries
27     0x01,                                 //        encoding)
28     0x01, 0x00, 0x27, 0x00, 0x00, 0x00,   // index entry 1
29     0x04, 0x00, 0x27, 0x00, 0x00, 0x00,   // index entry 4
30     0x06, 0x00, 0x33, 0x00, 0x00, 0x00,   // index entry 6
31     0x0a, 0x00, 0x3f, 0x00, 0x00, 0x00,   // index entry 10
32     0x00, 0x00, 0x40, 0x00, 0x00, 0x00,   // extra entry for the size of last,
33                                           // extends past END OF FILE.
34     't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4',
35     't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '6'
36 };
37 
38 extern const size_t kSampleCorruptPakSize = sizeof(kSampleCorruptPakContents);
39 
40 extern const char kSamplePakContents2x[] = {
41     0x04, 0x00, 0x00, 0x00,               // header(version
42     0x01, 0x00, 0x00, 0x00,               //        no. entries
43     0x01,                                 //        encoding)
44     0x04, 0x00, 0x15, 0x00, 0x00, 0x00,   // index entry 4
45     0x00, 0x00, 0x24, 0x00, 0x00, 0x00,   // extra entry for the size of last
46     't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4', ' ', '2', 'x'
47 };
48 
49 extern const size_t kSamplePakSize2x = sizeof(kSamplePakContents2x);
50 
51 extern const char kEmptyPakContents[] = {
52     0x04, 0x00, 0x00, 0x00,               // header(version
53     0x00, 0x00, 0x00, 0x00,               //        no. entries
54     0x01
55 };
56 
57 extern const size_t kEmptyPakSize = sizeof(kEmptyPakContents);
58 
59 }  // namespace ui
60