Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / file_manager / unit_tests / device_handler_unittest.js
index 7191c39..be06f80 100644 (file)
@@ -28,6 +28,7 @@ function setUp() {
     REMOVABLE_DEVICE_SCANNING_MESSAGE: 'Scanning...',
     DEVICE_UNKNOWN_MESSAGE: 'DEVICE_UNKNOWN: $1',
     DEVICE_UNSUPPORTED_MESSAGE: 'DEVICE_UNSUPPORTED: $1',
+    DEVICE_HARD_UNPLUGGED_TITLE: 'DEVICE_HARD_UNPLUGGED_TITLE',
     DEVICE_HARD_UNPLUGGED_MESSAGE: 'DEVICE_HARD_UNPLUGGED_MESSAGE',
     MULTIPART_DEVICE_UNSUPPORTED_MESSAGE: 'MULTIPART_DEVICE_UNSUPPORTED: $1',
     EXTERNAL_STORAGE_DISABLED_MESSAGE: 'EXTERNAL_STORAGE_DISABLED',
@@ -68,7 +69,10 @@ function setUp() {
       }
     },
     runtime: {
-      getURL: function(path) { return path; }
+      getURL: function(path) { return path; },
+      onStartup: {
+        addListener: function() {}
+      }
     }
   };
 
@@ -165,7 +169,7 @@ function testUnsupportedDevice() {
   registerTypicalDevice();
 
   chrome.fileBrowserPrivate.onMountCompleted.dispatch({
-    status: 'error_unsuported_filesystem',
+    status: 'error_unsupported_filesystem',
     volumeMetadata: {
       isParentDevice: false,
       deviceType: 'usb',
@@ -196,7 +200,7 @@ function testUnsupportedWithUnknownParent() {
       chrome.notifications.items['deviceFail:/device/path'].message);
 
   chrome.fileBrowserPrivate.onMountCompleted.dispatch({
-    status: 'error_unsuported_filesystem',
+    status: 'error_unsupported_filesystem',
     volumeMetadata: {
       isParentDevice: false,
       deviceType: 'usb',
@@ -225,7 +229,7 @@ function testMountPartialSuccess() {
   assertEquals(0, Object.keys(chrome.notifications.items).length);
 
   chrome.fileBrowserPrivate.onMountCompleted.dispatch({
-    status: 'error_unsuported_filesystem',
+    status: 'error_unsupported_filesystem',
     volumeMetadata: {
       isParentDevice: false,
       deviceType: 'usb',
@@ -418,5 +422,6 @@ function testDeviceHardUnplugged() {
   });
   assertEquals(1, Object.keys(chrome.notifications.items).length);
   assertEquals('DEVICE_HARD_UNPLUGGED_MESSAGE',
-               chrome.notifications.items['deviceFail:/device/path'].message);
+               chrome.notifications.items[
+                   'hardUnplugged:/device/path'].message);
 }