Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / stubs_app / background.js
index f8f364d..32ae434 100644 (file)
@@ -10,9 +10,12 @@ function getApiPaths() {
   var apiDefinitions = chrome.test.getApiDefinitions();
   apiDefinitions.forEach(function(module) {
     var namespace = module.namespace;
+    var apiFeature = apiFeatures[namespace];
+    if (Array.isArray(apiFeature))
+      apiFeature = apiFeatures[namespace][0];
 
     // Skip internal APIs.
-    if (apiFeatures[namespace].internal)
+    if (apiFeature.internal)
       return;
 
     // Get the API functions and events.