File's structured serialization should serialize lastModified attribute
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / media-source / import_tests.sh
1 #!/bin/bash
2
3 if [ $# -lt 1 ]
4 then
5   echo "Usage: $0 <Blink directory>"
6   exit -1
7 fi
8
9 BLINK_ROOT=$1
10 LAYOUT_TEST_DIR=$BLINK_ROOT/LayoutTests
11 HTTP_MEDIA_TEST_DIR=$LAYOUT_TEST_DIR/http/tests/media
12
13 if [ ! -d "$BLINK_ROOT" ]
14 then
15   echo "$BLINK_ROOT is not a directory or doesn't exist"
16   exit -1
17 fi
18
19 if [ ! -d "$LAYOUT_TEST_DIR" ]
20 then
21   echo "$LAYOUT_TEST_DIR is not a directory or doesn't exist"
22   exit -1
23 fi
24
25 #rm -rf *.html *.js webm mp4 manifest.txt
26
27 cp $HTTP_MEDIA_TEST_DIR/media-source/mediasource-*.html $HTTP_MEDIA_TEST_DIR/media-source/mediasource-*.js .
28 cp -r $HTTP_MEDIA_TEST_DIR/resources/media-source/webm .
29 cp -r $HTTP_MEDIA_TEST_DIR/resources/media-source/mp4 .
30
31 # Remove Blink-specific files
32 rm mediasource-gc-after-decode-error-crash.html
33
34 sed -i 's/\/w3c\/resources\//\/resources\//g' *.html
35 sed -i 's/\/media\/resources\/media-source\///g' *.html
36 sed -i 's/\/media\/resources\/media-source\///g' *.js
37 sed -i 's/\/media\/resources\/media-source\///g' webm/*
38
39
40 for TEST_FILE in `ls *.html`
41 do
42   if [ "$TEST_FILE" = "index.html" ]
43   then
44     continue
45   fi
46   echo -e "$TEST_FILE" >> manifest.txt
47 done
48
49 cp import_tests-template.txt index.html
50
51 chmod -R a+r *.html *.js webm mp4 manifest.txt
52 chmod a+rx webm mp4