OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 '''Unit tests for grit.format.policy_templates.writers.doc_writer''' | 6 '''Unit tests for grit.format.policy_templates.writers.doc_writer''' |
7 | 7 |
8 | 8 |
9 import os | 9 import os |
10 import sys | 10 import sys |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 self.doc_root.toxml(), | 208 self.doc_root.toxml(), |
209 '<root>' | 209 '<root>' |
210 'Can Be Recommended: _test_supported, ' | 210 'Can Be Recommended: _test_supported, ' |
211 'Dynamic Refresh: _test_supported, ' | 211 'Dynamic Refresh: _test_supported, ' |
212 'Spaceship Docking: _test_not_supported' | 212 'Spaceship Docking: _test_not_supported' |
213 '</root>') | 213 '</root>') |
214 | 214 |
215 def testAddListExample(self): | 215 def testAddListExample(self): |
216 policy = { | 216 policy = { |
217 'name': 'PolicyName', | 217 'name': 'PolicyName', |
218 'example_value': ['Foo', 'Bar'] | 218 'example_value': ['Foo', 'Bar'], |
| 219 'supported_on': [ { 'platforms': ['win', 'mac', 'linux'] } ] |
219 } | 220 } |
220 self.writer._AddListExample(self.doc_root, policy) | 221 self.writer._AddListExample(self.doc_root, policy) |
221 self.assertEquals( | 222 self.assertEquals( |
222 self.doc_root.toxml(), | 223 self.doc_root.toxml(), |
223 '<root>' | 224 '<root>' |
224 '<dl style="style_dd dl;">' | 225 '<dl style="style_dd dl;">' |
225 '<dt>Windows:</dt>' | 226 '<dt>Windows:</dt>' |
226 '<dd style="style_.monospace;style_.pre;">' | 227 '<dd style="style_.monospace;style_.pre;">' |
227 'MockKey\\PolicyName\\1 = "Foo"\n' | 228 'MockKey\\PolicyName\\1 = "Foo"\n' |
228 'MockKey\\PolicyName\\2 = "Bar"' | 229 'MockKey\\PolicyName\\2 = "Bar"' |
(...skipping 10 matching lines...) Expand all Loading... |
239 '</array>' | 240 '</array>' |
240 '</dd>' | 241 '</dd>' |
241 '</dl>' | 242 '</dl>' |
242 '</root>') | 243 '</root>') |
243 | 244 |
244 def testBoolExample(self): | 245 def testBoolExample(self): |
245 # Test representation of boolean example values. | 246 # Test representation of boolean example values. |
246 policy = { | 247 policy = { |
247 'name': 'PolicyName', | 248 'name': 'PolicyName', |
248 'type': 'main', | 249 'type': 'main', |
249 'example_value': True | 250 'example_value': True, |
| 251 'supported_on': [ { 'platforms': ['win', 'mac', 'linux'] } ] |
250 } | 252 } |
251 e1 = self.writer.AddElement(self.doc_root, 'e1') | 253 e1 = self.writer.AddElement(self.doc_root, 'e1') |
252 self.writer._AddExample(e1, policy) | 254 self.writer._AddExample(e1, policy) |
253 self.assertEquals( | 255 self.assertEquals( |
254 e1.toxml(), | 256 e1.toxml(), |
255 '<e1>0x00000001 (Windows), true (Linux), <true /> (Mac)</e1>') | 257 '<e1>0x00000001 (Windows), true (Linux), <true /> (Mac)</e1>') |
256 | 258 |
257 policy = { | 259 policy = { |
258 'name': 'PolicyName', | 260 'name': 'PolicyName', |
259 'type': 'main', | 261 'type': 'main', |
260 'example_value': False | 262 'example_value': False, |
| 263 'supported_on': [ { 'platforms': ['win', 'mac', 'linux'] } ] |
261 } | 264 } |
262 e2 = self.writer.AddElement(self.doc_root, 'e2') | 265 e2 = self.writer.AddElement(self.doc_root, 'e2') |
263 self.writer._AddExample(e2, policy) | 266 self.writer._AddExample(e2, policy) |
264 self.assertEquals( | 267 self.assertEquals( |
265 e2.toxml(), | 268 e2.toxml(), |
266 '<e2>0x00000000 (Windows), false (Linux), <false /> (Mac)</e2>') | 269 '<e2>0x00000000 (Windows), false (Linux), <false /> (Mac)</e2>') |
267 | 270 |
268 def testIntEnumExample(self): | 271 def testIntEnumExample(self): |
269 # Test representation of 'int-enum' example values. | 272 # Test representation of 'int-enum' example values. |
270 policy = { | 273 policy = { |
271 'name': 'PolicyName', | 274 'name': 'PolicyName', |
272 'type': 'int-enum', | 275 'type': 'int-enum', |
273 'example_value': 16 | 276 'example_value': 16, |
| 277 'supported_on': [ { 'platforms': ['win', 'mac', 'linux'] } ] |
274 } | 278 } |
275 self.writer._AddExample(self.doc_root, policy) | 279 self.writer._AddExample(self.doc_root, policy) |
276 self.assertEquals( | 280 self.assertEquals( |
277 self.doc_root.toxml(), | 281 self.doc_root.toxml(), |
278 '<root>0x00000010 (Windows), 16 (Linux/Mac)</root>') | 282 '<root>0x00000010 (Windows), 16 (Linux), 16 (Mac)</root>') |
279 | 283 |
280 def testStringEnumExample(self): | 284 def testStringEnumExample(self): |
281 # Test representation of 'int-enum' example values. | 285 # Test representation of 'int-enum' example values. |
282 policy = { | 286 policy = { |
283 'name': 'PolicyName', | 287 'name': 'PolicyName', |
284 'type': 'string-enum', | 288 'type': 'string-enum', |
285 'example_value': "wacky" | 289 'example_value': "wacky" |
286 } | 290 } |
287 self.writer._AddExample(self.doc_root, policy) | 291 self.writer._AddExample(self.doc_root, policy) |
288 self.assertEquals( | 292 self.assertEquals( |
(...skipping 10 matching lines...) Expand all Loading... |
299 self.writer._AddExample(self.doc_root, policy) | 303 self.writer._AddExample(self.doc_root, policy) |
300 self.assertEquals( | 304 self.assertEquals( |
301 self.doc_root.toxml(), | 305 self.doc_root.toxml(), |
302 '<root>"awesome-example"</root>') | 306 '<root>"awesome-example"</root>') |
303 | 307 |
304 def testIntExample(self): | 308 def testIntExample(self): |
305 # Test representation of 'int' example values. | 309 # Test representation of 'int' example values. |
306 policy = { | 310 policy = { |
307 'name': 'PolicyName', | 311 'name': 'PolicyName', |
308 'type': 'int', | 312 'type': 'int', |
309 'example_value': 26 | 313 'example_value': 26, |
| 314 'supported_on': [ { 'platforms': ['win', 'mac', 'linux'] } ] |
310 } | 315 } |
311 self.writer._AddExample(self.doc_root, policy) | 316 self.writer._AddExample(self.doc_root, policy) |
312 self.assertEquals( | 317 self.assertEquals( |
313 self.doc_root.toxml(), | 318 self.doc_root.toxml(), |
314 '<root>0x0000001a (Windows), 26 (Linux/Mac)</root>') | 319 '<root>0x0000001a (Windows), 26 (Linux), 26 (Mac)</root>') |
315 | 320 |
316 def testAddPolicyAttribute(self): | 321 def testAddPolicyAttribute(self): |
317 # Test creating a policy attribute term-definition pair. | 322 # Test creating a policy attribute term-definition pair. |
318 self.writer._AddPolicyAttribute( | 323 self.writer._AddPolicyAttribute( |
319 self.doc_root, 'bla', 'hello, world', ['key1']) | 324 self.doc_root, 'bla', 'hello, world', ['key1']) |
320 self.assertEquals( | 325 self.assertEquals( |
321 self.doc_root.toxml(), | 326 self.doc_root.toxml(), |
322 '<root>' | 327 '<root>' |
323 '<dt style="style_dt;">_test_bla</dt>' | 328 '<dt style="style_dt;">_test_bla</dt>' |
324 '<dd style="style1;">hello, world</dd>' | 329 '<dd style="style1;">hello, world</dd>' |
325 '</root>') | 330 '</root>') |
326 | 331 |
327 def testAddPolicyDetails(self): | 332 def testAddPolicyDetails(self): |
328 # Test if the definition list (<dl>) of policy details is created correctly. | 333 # Test if the definition list (<dl>) of policy details is created correctly. |
329 policy = { | 334 policy = { |
330 'type': 'main', | 335 'type': 'main', |
331 'name': 'TestPolicyName', | 336 'name': 'TestPolicyName', |
332 'caption': 'TestPolicyCaption', | 337 'caption': 'TestPolicyCaption', |
333 'desc': 'TestPolicyDesc', | 338 'desc': 'TestPolicyDesc', |
334 'supported_on': [{ | 339 'supported_on': [{ |
335 'product': 'chrome', | 340 'product': 'chrome', |
336 'platforms': ['win'], | 341 'platforms': ['win', 'mac', 'linux'], |
337 'since_version': '8', | 342 'since_version': '8', |
338 'until_version': '', | 343 'until_version': '', |
339 }], | 344 }], |
340 'features': {'dynamic_refresh': False}, | 345 'features': {'dynamic_refresh': False}, |
341 'example_value': False | 346 'example_value': False |
342 } | 347 } |
343 self.writer.messages['doc_since_version'] = {'text': '...$6...'} | 348 self.writer.messages['doc_since_version'] = {'text': '...$6...'} |
344 self.writer._AddPolicyDetails(self.doc_root, policy) | 349 self.writer._AddPolicyDetails(self.doc_root, policy) |
345 self.assertEquals( | 350 self.assertEquals( |
346 self.doc_root.toxml(), | 351 self.doc_root.toxml(), |
347 '<root><dl>' | 352 '<root><dl>' |
348 '<dt style="style_dt;">_test_data_type</dt><dd>Boolean (REG_DWORD)</dd>' | 353 '<dt style="style_dt;">_test_data_type</dt><dd>Boolean (REG_DWORD)</dd>' |
349 '<dt style="style_dt;">_test_win_reg_loc</dt>' | 354 '<dt style="style_dt;">_test_win_reg_loc</dt>' |
350 '<dd style="style_.monospace;">MockKey\TestPolicyName</dd>' | 355 '<dd style="style_.monospace;">MockKey\TestPolicyName</dd>' |
351 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' | 356 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' |
352 '<dd style="style_.monospace;">TestPolicyName</dd>' | 357 '<dd style="style_.monospace;">TestPolicyName</dd>' |
353 '<dt style="style_dt;">_test_supported_on</dt>' | 358 '<dt style="style_dt;">_test_supported_on</dt>' |
354 '<dd>' | 359 '<dd>' |
355 '<ul style="style_ul;">' | 360 '<ul style="style_ul;">' |
356 '<li>Chrome (Windows) ...8...</li>' | 361 '<li>Chrome (Windows, Mac, Linux) ...8...</li>' |
357 '</ul>' | 362 '</ul>' |
358 '</dd>' | 363 '</dd>' |
359 '<dt style="style_dt;">_test_supported_features</dt>' | 364 '<dt style="style_dt;">_test_supported_features</dt>' |
360 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' | 365 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' |
361 '<dt style="style_dt;">_test_description</dt><dd>TestPolicyDesc</dd>' | 366 '<dt style="style_dt;">_test_description</dt><dd>TestPolicyDesc</dd>' |
362 '<dt style="style_dt;">_test_example_value</dt>' | 367 '<dt style="style_dt;">_test_example_value</dt>' |
363 '<dd>0x00000000 (Windows), false (Linux), <false /> (Mac)</dd>' | 368 '<dd>0x00000000 (Windows), false (Linux), <false /> (Mac)</dd>' |
364 '</dl></root>') | 369 '</dl></root>') |
365 | 370 |
366 def testAddPolicyNote(self): | 371 def testAddPolicyNote(self): |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 418 |
414 def testAddPolicySection(self): | 419 def testAddPolicySection(self): |
415 # Test if policy details are correctly added to the document. | 420 # Test if policy details are correctly added to the document. |
416 policy = { | 421 policy = { |
417 'name': 'PolicyName', | 422 'name': 'PolicyName', |
418 'caption': 'PolicyCaption', | 423 'caption': 'PolicyCaption', |
419 'desc': 'PolicyDesc', | 424 'desc': 'PolicyDesc', |
420 'type': 'string', | 425 'type': 'string', |
421 'supported_on': [{ | 426 'supported_on': [{ |
422 'product': 'chrome', | 427 'product': 'chrome', |
423 'platforms': ['win'], | 428 'platforms': ['win', 'mac'], |
424 'since_version': '7', | 429 'since_version': '7', |
425 'until_version': '', | 430 'until_version': '', |
426 }], | 431 }], |
427 'features': {'dynamic_refresh': False}, | 432 'features': {'dynamic_refresh': False}, |
428 'example_value': False | 433 'example_value': 'False' |
429 } | 434 } |
430 self.writer.messages['doc_since_version'] = {'text': '..$6..'} | 435 self.writer.messages['doc_since_version'] = {'text': '..$6..'} |
431 self.writer._AddPolicySection(self.doc_root, policy) | 436 self.writer._AddPolicySection(self.doc_root, policy) |
432 self.assertEquals( | 437 self.assertEquals( |
433 self.doc_root.toxml(), | 438 self.doc_root.toxml(), |
434 '<root>' | 439 '<root>' |
435 '<div style="margin-left: 0px">' | 440 '<div style="margin-left: 0px">' |
436 '<h3><a name="PolicyName"/>PolicyName</h3>' | 441 '<h3><a name="PolicyName"/>PolicyName</h3>' |
437 '<span>PolicyCaption</span>' | 442 '<span>PolicyCaption</span>' |
438 '<dl>' | 443 '<dl>' |
439 '<dt style="style_dt;">_test_data_type</dt>' | 444 '<dt style="style_dt;">_test_data_type</dt>' |
440 '<dd>String (REG_SZ)</dd>' | 445 '<dd>String (REG_SZ)</dd>' |
441 '<dt style="style_dt;">_test_win_reg_loc</dt>' | 446 '<dt style="style_dt;">_test_win_reg_loc</dt>' |
442 '<dd style="style_.monospace;">MockKey\\PolicyName</dd>' | 447 '<dd style="style_.monospace;">MockKey\\PolicyName</dd>' |
443 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' | 448 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' |
444 '<dd style="style_.monospace;">PolicyName</dd>' | 449 '<dd style="style_.monospace;">PolicyName</dd>' |
445 '<dt style="style_dt;">_test_supported_on</dt>' | 450 '<dt style="style_dt;">_test_supported_on</dt>' |
446 '<dd>' | 451 '<dd>' |
447 '<ul style="style_ul;">' | 452 '<ul style="style_ul;">' |
448 '<li>Chrome (Windows) ..7..</li>' | 453 '<li>Chrome (Windows, Mac) ..7..</li>' |
449 '</ul>' | 454 '</ul>' |
450 '</dd>' | 455 '</dd>' |
451 '<dt style="style_dt;">_test_supported_features</dt>' | 456 '<dt style="style_dt;">_test_supported_features</dt>' |
452 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' | 457 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' |
453 '<dt style="style_dt;">_test_description</dt>' | 458 '<dt style="style_dt;">_test_description</dt>' |
454 '<dd>PolicyDesc</dd>' | 459 '<dd>PolicyDesc</dd>' |
455 '<dt style="style_dt;">_test_example_value</dt>' | 460 '<dt style="style_dt;">_test_example_value</dt>' |
456 '<dd>"False"</dd>' | 461 '<dd>"False"</dd>' |
457 '</dl>' | 462 '</dl>' |
458 '<a href="#top">_test_back_to_top</a>' | 463 '<a href="#top">_test_back_to_top</a>' |
459 '</div>' | 464 '</div>' |
460 '</root>') | 465 '</root>') |
461 # Test for groups. | 466 # Test for groups. |
462 self.setUp() | 467 self.setUp() |
463 policy['type'] = 'group' | 468 policy['type'] = 'group' |
464 self.writer._AddPolicySection(self.doc_root, policy) | 469 self.writer._AddPolicySection(self.doc_root, policy) |
465 self.assertEquals( | 470 self.assertEquals( |
466 self.doc_root.toxml(), | 471 self.doc_root.toxml(), |
467 '<root>' | 472 '<root>' |
468 '<div style="margin-left: 0px">' | 473 '<div style="margin-left: 0px">' |
469 '<h2><a name="PolicyName"/>PolicyCaption</h2>' | 474 '<h2><a name="PolicyName"/>PolicyCaption</h2>' |
470 '<div style="style_div.group_desc;">PolicyDesc</div>' | 475 '<div style="style_div.group_desc;">PolicyDesc</div>' |
471 '<a href="#top">_test_back_to_top</a>' | 476 '<a href="#top">_test_back_to_top</a>' |
472 '</div>' | 477 '</div>' |
473 '</root>') | 478 '</root>') |
474 | 479 |
| 480 def testAddPolicySectionForWindowsOnly(self): |
| 481 policy = { |
| 482 'name': 'PolicyName', |
| 483 'caption': 'PolicyCaption', |
| 484 'desc': 'PolicyDesc', |
| 485 'type': 'int', |
| 486 'supported_on': [{ |
| 487 'product': 'chrome', |
| 488 'platforms': ['win'], |
| 489 'since_version': '33', |
| 490 'until_version': '', |
| 491 }], |
| 492 'features': {'dynamic_refresh': False}, |
| 493 'example_value': 123 |
| 494 } |
| 495 self.writer.messages['doc_since_version'] = {'text': '..$6..'} |
| 496 self.writer._AddPolicySection(self.doc_root, policy) |
| 497 self.assertEquals( |
| 498 self.doc_root.toxml(), |
| 499 '<root>' |
| 500 '<div style="margin-left: 0px">' |
| 501 '<h3><a name="PolicyName"/>PolicyName</h3>' |
| 502 '<span>PolicyCaption</span>' |
| 503 '<dl>' |
| 504 '<dt style="style_dt;">_test_data_type</dt>' |
| 505 '<dd>Integer (REG_DWORD)</dd>' |
| 506 '<dt style="style_dt;">_test_win_reg_loc</dt>' |
| 507 '<dd style="style_.monospace;">MockKey\\PolicyName</dd>' |
| 508 '<dt style="style_dt;">_test_supported_on</dt>' |
| 509 '<dd>' |
| 510 '<ul style="style_ul;">' |
| 511 '<li>Chrome (Windows) ..33..</li>' |
| 512 '</ul>' |
| 513 '</dd>' |
| 514 '<dt style="style_dt;">_test_supported_features</dt>' |
| 515 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' |
| 516 '<dt style="style_dt;">_test_description</dt>' |
| 517 '<dd>PolicyDesc</dd>' |
| 518 '<dt style="style_dt;">_test_example_value</dt>' |
| 519 '<dd>0x0000007b (Windows)</dd>' |
| 520 '</dl>' |
| 521 '<a href="#top">_test_back_to_top</a>' |
| 522 '</div>' |
| 523 '</root>') |
| 524 |
| 525 def testAddPolicySectionForMacOnly(self): |
| 526 policy = { |
| 527 'name': 'PolicyName', |
| 528 'caption': 'PolicyCaption', |
| 529 'desc': 'PolicyDesc', |
| 530 'type': 'int', |
| 531 'supported_on': [{ |
| 532 'product': 'chrome', |
| 533 'platforms': ['mac'], |
| 534 'since_version': '33', |
| 535 'until_version': '', |
| 536 }], |
| 537 'features': {'dynamic_refresh': False}, |
| 538 'example_value': 123 |
| 539 } |
| 540 self.writer.messages['doc_since_version'] = {'text': '..$6..'} |
| 541 self.writer._AddPolicySection(self.doc_root, policy) |
| 542 self.assertEquals( |
| 543 self.doc_root.toxml(), |
| 544 '<root>' |
| 545 '<div style="margin-left: 0px">' |
| 546 '<h3><a name="PolicyName"/>PolicyName</h3>' |
| 547 '<span>PolicyCaption</span>' |
| 548 '<dl>' |
| 549 '<dt style="style_dt;">_test_data_type</dt>' |
| 550 '<dd>Integer</dd>' |
| 551 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' |
| 552 '<dd style="style_.monospace;">PolicyName</dd>' |
| 553 '<dt style="style_dt;">_test_supported_on</dt>' |
| 554 '<dd>' |
| 555 '<ul style="style_ul;">' |
| 556 '<li>Chrome (Mac) ..33..</li>' |
| 557 '</ul>' |
| 558 '</dd>' |
| 559 '<dt style="style_dt;">_test_supported_features</dt>' |
| 560 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' |
| 561 '<dt style="style_dt;">_test_description</dt>' |
| 562 '<dd>PolicyDesc</dd>' |
| 563 '<dt style="style_dt;">_test_example_value</dt>' |
| 564 '<dd>123 (Mac)</dd>' |
| 565 '</dl>' |
| 566 '<a href="#top">_test_back_to_top</a>' |
| 567 '</div>' |
| 568 '</root>') |
| 569 |
| 570 def testAddPolicySectionForLinuxOnly(self): |
| 571 policy = { |
| 572 'name': 'PolicyName', |
| 573 'caption': 'PolicyCaption', |
| 574 'desc': 'PolicyDesc', |
| 575 'type': 'int', |
| 576 'supported_on': [{ |
| 577 'product': 'chrome', |
| 578 'platforms': ['linux'], |
| 579 'since_version': '33', |
| 580 'until_version': '', |
| 581 }], |
| 582 'features': {'dynamic_refresh': False}, |
| 583 'example_value': 123 |
| 584 } |
| 585 self.writer.messages['doc_since_version'] = {'text': '..$6..'} |
| 586 self.writer._AddPolicySection(self.doc_root, policy) |
| 587 self.assertEquals( |
| 588 self.doc_root.toxml(), |
| 589 '<root>' |
| 590 '<div style="margin-left: 0px">' |
| 591 '<h3><a name="PolicyName"/>PolicyName</h3>' |
| 592 '<span>PolicyCaption</span>' |
| 593 '<dl>' |
| 594 '<dt style="style_dt;">_test_data_type</dt>' |
| 595 '<dd>Integer</dd>' |
| 596 '<dt style="style_dt;">_test_mac_linux_pref_name</dt>' |
| 597 '<dd style="style_.monospace;">PolicyName</dd>' |
| 598 '<dt style="style_dt;">_test_supported_on</dt>' |
| 599 '<dd>' |
| 600 '<ul style="style_ul;">' |
| 601 '<li>Chrome (Linux) ..33..</li>' |
| 602 '</ul>' |
| 603 '</dd>' |
| 604 '<dt style="style_dt;">_test_supported_features</dt>' |
| 605 '<dd>_test_feature_dynamic_refresh: _test_not_supported</dd>' |
| 606 '<dt style="style_dt;">_test_description</dt>' |
| 607 '<dd>PolicyDesc</dd>' |
| 608 '<dt style="style_dt;">_test_example_value</dt>' |
| 609 '<dd>123 (Linux)</dd>' |
| 610 '</dl>' |
| 611 '<a href="#top">_test_back_to_top</a>' |
| 612 '</div>' |
| 613 '</root>') |
| 614 |
475 def testAddDictionaryExample(self): | 615 def testAddDictionaryExample(self): |
476 policy = { | 616 policy = { |
477 'name': 'PolicyName', | 617 'name': 'PolicyName', |
478 'caption': 'PolicyCaption', | 618 'caption': 'PolicyCaption', |
479 'desc': 'PolicyDesc', | 619 'desc': 'PolicyDesc', |
480 'type': 'dict', | 620 'type': 'dict', |
481 'supported_on': [{ | 621 'supported_on': [{ |
482 'product': 'chrome', | 622 'product': 'chrome', |
483 'platforms': ['win'], | 623 'platforms': ['win', 'mac', 'linux'], |
484 'since_version': '7', | 624 'since_version': '7', |
485 'until_version': '', | 625 'until_version': '', |
486 }], | 626 }], |
487 'features': {'dynamic_refresh': False}, | 627 'features': {'dynamic_refresh': False}, |
488 'example_value': { | 628 'example_value': { |
489 "ProxyMode": "direct", | 629 "ProxyMode": "direct", |
490 "List": ["1", "2", "3"], | 630 "List": ["1", "2", "3"], |
491 "True": True, | 631 "True": True, |
492 "False": False, | 632 "False": False, |
493 "Integer": 123, | 633 "Integer": 123, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 ' <key>True</key>\n' | 687 ' <key>True</key>\n' |
548 ' <true/>\n' | 688 ' <true/>\n' |
549 '</dict>' | 689 '</dict>' |
550 '</dd>' | 690 '</dd>' |
551 '</dl>' | 691 '</dl>' |
552 '</root>') | 692 '</root>') |
553 | 693 |
554 | 694 |
555 if __name__ == '__main__': | 695 if __name__ == '__main__': |
556 unittest.main() | 696 unittest.main() |
OLD | NEW |