summaryrefslogtreecommitdiffstats
path: root/polygerrit-ui/app/elements/shared/gr-rest-api-interface/mock-diff-response_test.html
blob: 0a1b14ee49bddec8d6d96eeb023212e2284974d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!--
@license
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../test/common-test-setup.html"/>
<dom-module id="mock-diff-response">
  <template></template>
  <script>
    (function() {
      'use strict';

      const RESPONSE = {
        meta_a: {
          name: 'lorem-ipsum.txt',
          content_type: 'text/plain',
          lines: 45,
        },
        meta_b: {
          name: 'lorem-ipsum.txt',
          content_type: 'text/plain',
          lines: 48,
        },
        intraline_status: 'OK',
        change_type: 'MODIFIED',
        diff_header: [
          'diff --git a/lorem-ipsum.txt b/lorem-ipsum.txt',
          'index b2adcf4..554ae49 100644',
          '--- a/lorem-ipsum.txt',
          '+++ b/lorem-ipsum.txt',
        ],
        content: [
          {
            ab: [
              'Lorem ipsum dolor sit amet, suspendisse inceptos vehicula, ' +
                'nulla phasellus.',
              'Mattis lectus.',
              'Sodales duis.',
              'Orci a faucibus.',
            ],
          },
          {
            b: [
              'Nullam neque, ligula ac, id blandit.',
              'Sagittis tincidunt torquent, tempor nunc amet.',
              'At rhoncus id.',
            ],
          },
          {
            ab: [
              'Sem nascetur, erat ut, non in.',
              'A donec, venenatis pellentesque dis.',
              'Mauris mauris.',
              'Quisque nisl duis, facilisis viverra.',
              'Justo purus, semper eget et.',
            ],
          },
          {
            a: [
              'Est amet, vestibulum pellentesque.',
              'Erat ligula.',
              'Justo eros.',
              'Fringilla quisque.',
            ],
          },
          {
            ab: [
              'Arcu eget, rhoncus amet cursus, ipsum elementum.',
              'Eros suspendisse.',
            ],
          },
          {
            a: [
              'Rhoncus tempor, ultricies aliquam ipsum.',
            ],
            b: [
              'Rhoncus tempor, ultricies praesent ipsum.',
            ],
            edit_a: [
              [
                26,
                7,
              ],
            ],
            edit_b: [
              [
                26,
                8,
              ],
            ],
          },
          {
            ab: [
              'Sollicitudin duis.',
              'Blandit blandit, ante nisl fusce.',
              'Felis ac at, tellus consectetuer.',
              'Sociis ligula sapien, egestas leo.',
              'Cum pulvinar, sed mauris, cursus neque velit.',
              'Augue porta lobortis.',
              'Nibh lorem, amet fermentum turpis, vel pulvinar diam.',
              'Id quam ipsum, id urna et, massa suspendisse.',
              'Ac nec, nibh praesent.',
              'Rutrum vestibulum.',
              'Est tellus, bibendum habitasse.',
              'Justo facilisis, vel nulla.',
              'Donec eu, vulputate neque aliquam, nulla dui.',
              'Risus adipiscing in.',
              'Lacus arcu arcu.',
              'Urna velit.',
              'Urna a dolor.',
              'Lectus magna augue, convallis mattis tortor, sed tellus ' +
                'consequat.',
              'Etiam dui, blandit wisi.',
              'Mi nec.',
              'Vitae eget vestibulum.',
              'Ullamcorper nunc ante, nec imperdiet felis, consectetur in.',
              'Ac eget.',
              'Vel fringilla, interdum pellentesque placerat, proin ante.',
            ],
          },
          {
            b: [
              'Eu congue risus.',
              'Enim ac, quis elementum.',
              'Non et elit.',
              'Etiam aliquam, diam vel nunc.',
            ],
          },
          {
            ab: [
              'Nec at.',
              'Arcu mauris, venenatis lacus fermentum, praesent duis.',
              'Pellentesque amet et, tellus duis.',
              'Ipsum arcu vitae, justo elit, sed libero tellus.',
              'Metus rutrum euismod, vivamus sodales, vel arcu nisl.',
            ],
          },
        ],
      };

      Polymer({
        is: 'mock-diff-response',
        properties: {
          diffResponse: {
            type: Object,
            value() {
              return RESPONSE;
            },
          },
        },
      });
    })();
  </script>
</dom-module>