<script src="support/unitcommon.js"></script>
<script src="support/content_common.js"></script>
</head>
-
<body>
<div id="log"></div>
-<script type="text/javascript">
+<script>
//==== TEST: AudioContent_copyright_attribute
//==== LABEL Check if AudioContent have copyright attribute with proper type and is readonly
//==== ONLOAD_DELAY 30
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
//==== PRIORITY P1
//==== TEST_CRITERIA AE AT ARO
+
setup({timeout: 30000});
var t = async_test(document.title, {timeout: 30000}),
- onSuccess, onError, filter, content;
+ onSuccess, onError, filter, content, i;
setup_contents(t, t.step_func(function () {
filter = new tizen.AttributeFilter("type", "EXACTLY", "AUDIO");
assert_type(contents, "array", "contents should be an array");
assert_greater_than(contents.length, 0, "media item is not found");
- content = contents[0];
- if(content.copyright !== null) {
- check_readonly(content, "copyright", content.copyright, "string", "MyRights");
+ for (i = 0; i < contents.length; i++) {
+ content = contents[i];
+ if (TEST_CONTENT_AUDIOS.includes(content.name)) {
+ check_readonly(content, "copyright", content.copyright, "string", "MyRights");
+ break;
+ }
}
-
t.done();
});