2
2
3
3
var fs = require ( 'fs' ) ,
4
4
http = require ( 'http' ) ,
5
- path = require ( 'path' ) ,
5
+ path = require ( 'path' ) ,
6
6
url = require ( 'url' ) ;
7
7
8
8
var should = require ( 'should' ) ;
9
9
10
10
var manifestTools = require ( '../lib/manifestTools' ) ,
11
11
validationConstants = require ( '../lib/constants' ) . validation ;
12
-
12
+
13
13
var manifestTypeDetector = require ( '../lib/manifestTools/manifestTypeDetector' ) ;
14
14
15
15
var responseFunction ;
@@ -464,7 +464,7 @@ describe('Manifest Tools', function () {
464
464
done ( ) ;
465
465
} ) ;
466
466
} ) ;
467
-
467
+
468
468
it ( 'Should convert from Chrome OS manifest format to W3C manifest format' , function ( ) {
469
469
var manifestInfo = {
470
470
content : {
@@ -486,11 +486,11 @@ describe('Manifest Tools', function () {
486
486
'background'
487
487
]
488
488
} ,
489
- format : 'chromeos'
489
+ format : 'chromeos'
490
490
} ;
491
-
491
+
492
492
manifestTools . convertTo ( manifestInfo , 'W3C' , function ( err , convertedManifest ) {
493
- var result = manifestTypeDetector . detect ( convertedManifest . content ) ;
493
+ var result = manifestTypeDetector . detect ( convertedManifest . content ) ;
494
494
should . exist ( result ) ;
495
495
result . should . be . equal ( 'w3c' ) ;
496
496
} ) ;
@@ -573,8 +573,8 @@ describe('Manifest Tools', function () {
573
573
done ( ) ;
574
574
} ) ;
575
575
} ) ;
576
-
577
- it ( 'Issue #88' , function ( done ) {
576
+
577
+ it ( 'Issue #88' , function ( done ) {
578
578
manifestTools . getManifestFromFile ( inputFiles . issue88Manifest , function ( err , manifestObject ) {
579
579
var w3cmanifest = {
580
580
content : manifestObject ,
@@ -647,29 +647,5 @@ describe('Manifest Tools', function () {
647
647
done ( ) ;
648
648
} ) ;
649
649
} ) ;
650
-
651
- it ( 'Should recommend to specify scope rules' , function ( done ) {
652
- var manifestInfo = {
653
- content : {
654
- 'short_name' : 'MyApp' ,
655
- 'start_url' : 'http://example.com/'
656
- } ,
657
- format : 'w3c'
658
- } ;
659
-
660
- var expectedValidation = {
661
- 'description' : 'It is recommended to specify a set of rules that represent the navigation scope of the application' ,
662
- 'platform' : validationConstants . platforms . all ,
663
- 'level' : validationConstants . levels . suggestion ,
664
- 'member' : validationConstants . manifestMembers . mjs_extended_scope ,
665
- 'code' : validationConstants . codes . requiredValue
666
- } ;
667
-
668
- manifestTools . validateManifest ( manifestInfo , [ 'ios' , 'windows' , 'firefox' , 'chrome' , 'android' ] , function ( err , validationResults ) {
669
- should . not . exist ( err ) ;
670
- validationResults . should . containEql ( expectedValidation ) ;
671
- done ( ) ;
672
- } ) ;
673
- } ) ;
674
650
} ) ;
675
651
} ) ;
0 commit comments