Bug 911243 - Enable test_interfaces.html on B2G. r=smaug
☠☠ backed out by 7d9e5022bf6c ☠ ☠
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sat, 31 Aug 2013 09:52:44 +0900
changeset 158057 b04073aaa2781208abb9c64dde01d4386edcd7ef
parent 158056 6fe5a446b7756e5b91d63a31607a1b55174520e0
child 158058 7973c4b7cfd0678a8cd1b61c631bb65d725b943a
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs911243
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 911243 - Enable test_interfaces.html on B2G. r=smaug
dom/tests/mochitest/general/test_interfaces.html
testing/mochitest/b2g.json
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -75,54 +75,62 @@ var ecmaGlobals =
 var interfaceNamesInGlobalScope =
   [
     "AnalyserNode",
     "AnimationEvent",
     "ArchiveRequest",
     "Attr",
     "Audio",
     "AudioBuffer",
+    {name: "AudioChannelManager", b2g: true},
     "AudioContext",
     "AudioBufferSourceNode",
     "AudioDestinationNode",
     "AudioListener",
     "AudioNode",
     "AudioParam",
     "AudioProcessingEvent",
     "AudioStreamTrack",
     "BarProp",
     "BatteryManager",
     "BeforeUnloadEvent",
     "BiquadFilterNode",
     "Blob",
     "BlobEvent",
+    {name: "BluetoothAdapter", b2g: true},
+    {name: "BluetoothDevice", b2g: true},
+    {name: "BluetoothDeviceEvent", b2g: true},
+    {name: "BluetoothManager", b2g: true},
+    {name: "BluetoothStatusChangedEvent", b2g: true},
     {name: "BoxObject", xbl: true},
-    {name: "BrowserFeedWriter", android: false},
+    {name: "BrowserFeedWriter", mobile: false},
+    {name: "CallEvent", b2g: true},
     "CameraCapabilities",
     "CameraControl",
     "CameraManager",
     "CanvasGradient",
     "CanvasPattern",
     "CanvasRenderingContext2D",
     "CaretPosition",
     "CDATASection",
+    {name: "CFStateChangeEvent", b2g: true},
     "ChannelMergerNode",
     "ChannelSplitterNode",
     "CharacterData",
     {name: "ChromeWindow", xbl: true},
     "ClientRect",
     "ClientRectList",
     "ClipboardEvent",
     "CloseEvent",
     "CommandEvent",
     "Comment",
     "CompositionEvent",
     "Controllers",
     "ConvolverNode",
-    {name: "CRMFObject", android: false},
+    {name: "CRMFObject", mobile: false},
     "Crypto",
     "CSS",
     "CSS2Properties",
     "CSSCharsetRule",
     "CSSConditionRule",
     "CSSFontFaceRule",
     {name: "CSSFontFeatureValuesRule", release: false},
     "CSSGroupingRule",
@@ -139,16 +147,17 @@ var interfaceNamesInGlobalScope =
     "CSSStyleRule",
     "CSSStyleSheet",
     "CSSSupportsRule",
     "CSSValue",
     "CSSValueList",
     "CustomEvent",
     "DataChannel",
     "DataContainerEvent",
+    {name: "DataErrorEvent", b2g: true},
     "DataTransfer",
     "DelayNode",
     "DesktopNotification",
     "DesktopNotificationCenter",
     "DeviceAcceleration",
     "DeviceLightEvent",
     "DeviceMotionEvent",
     "DeviceOrientationEvent",
@@ -180,23 +189,24 @@ var interfaceNamesInGlobalScope =
     "EventListenerInfo",
     "EventSource",
     "EventTarget",
     "File",
     "FileHandle",
     "FileList",
     "FileReader",
     "FileRequest",
+    {name: "FMRadio", b2g: true},
     "FocusEvent",
     "FormData",
     "GainNode",
-    {name: "Gamepad", android: false},
-    {name: "GamepadAxisMoveEvent", android: false},
-    {name: "GamepadButtonEvent", android: false},
-    {name: "GamepadEvent", android: false},
+    {name: "Gamepad", mobile: false},
+    {name: "GamepadAxisMoveEvent", mobile: false},
+    {name: "GamepadButtonEvent", mobile: false},
+    {name: "GamepadEvent", mobile: false},
     "HashChangeEvent",
     "History",
     "HTMLAnchorElement",
     "HTMLAppletElement",
     "HTMLAreaElement",
     "HTMLAudioElement",
     "HTMLBaseElement",
     "HTMLBodyElement",
@@ -260,31 +270,32 @@ var interfaceNamesInGlobalScope =
     "HTMLTableSectionElement",
     "HTMLTemplateElement",
     "HTMLTextAreaElement",
     "HTMLTimeElement",
     "HTMLTitleElement",
     "HTMLUListElement",
     "HTMLUnknownElement",
     "HTMLVideoElement",
+    {name: "IccCardLockErrorEvent", b2g: true},
     "IDBCursor",
     "IDBCursorWithValue",
     "IDBDatabase",
     "IDBFactory",
     "IDBFileHandle",
     "IDBIndex",
     "IDBKeyRange",
     "IDBObjectStore",
     "IDBOpenDBRequest",
     "IDBRequest",
     "IDBTransaction",
     "IDBVersionChangeEvent",
     "Image",
     "ImageData",
-    {name: "InstallTrigger", xbl: false},
+    {name: "InstallTrigger", b2g: false, xbl: false},
     "KeyEvent",
     "KeyboardEvent",
     "LoadStatus",
     "LocalMediaStream",
     "Location",
     "LockedFile",
     "MediaElementAudioSourceNode",
     "MediaError",
@@ -297,38 +308,54 @@ var interfaceNamesInGlobalScope =
     "MediaStreamEvent",
     "MediaStreamTrack",
     "MessageEvent",
     "MimeType",
     "MimeTypeArray",
     "ModalContentWindow",
     "MouseEvent",
     "MouseScrollEvent",
+    {name: "MozActivity", b2g: true},
     "MozApplicationEvent",
     "MozCanvasPrintState",
+    {name: "MozCellBroadcast", b2g: true},
+    {name: "MozCellBroadcastEvent", b2g: true},
     "MozConnection",
     "mozContact",
     "MozContactChangeEvent",
     "MozCSSKeyframeRule",
     "MozCSSKeyframesRule",
+    {name: "MozEmergencyCbModeEvent", b2g: true},
+    {name: "MozIccManager", b2g: true},
+    {name: "MozInputContext", b2g: true},
+    {name: "MozInputMethod", b2g: true},
+    {name: "MozInputMethodManager", b2g: true},
     "MozMmsEvent",
     "MozMmsMessage",
+    {name: "MozMobileConnection", b2g: true},
     "MozMobileMessageManager",
     "MozMobileMessageThread",
     "MozNamedAttrMap",
+    {name: "MozOtaStatusEvent", b2g: true},
     "MozPowerManager",
     "mozRTCIceCandidate",
     "mozRTCPeerConnection",
     "mozRTCSessionDescription",
     "MozSettingsEvent",
     "MozSmsEvent",
     "MozSmsFilter",
     "MozSmsMessage",
     "MozSmsSegmentInfo",
+    {name: "MozStkCommandEvent", b2g: true},
+    {name: "MozTimeManager", b2g: true},
+    {name: "MozVoicemail", b2g: true},
+    {name: "MozVoicemailEvent", b2g: true},
     "MozWakeLock",
+    {name: "MozWifiConnectionInfoEvent", b2g: true},
+    {name: "MozWifiStatusChangeEvent", b2g: true},
     "MutationEvent",
     "MutationObserver",
     "MutationRecord",
     "Navigator",
     "Node",
     "NodeFilter",
     "NodeIterator",
     "NodeList",
@@ -350,18 +377,18 @@ var interfaceNamesInGlobalScope =
     "PeriodicWave",
     "PhoneNumberService",
     "Plugin",
     "PluginArray",
     "PopStateEvent",
     "PopupBlockedEvent",
     "ProcessingInstruction",
     "ProgressEvent",
-    {name: "Promise", release: false},
-    {name: "PromiseResolver", release: false},
+    {name: "Promise", b2g: false, release: false},
+    {name: "PromiseResolver", b2g: false, release: false},
     "PropertyNodeList",
     "Range",
     "RecordErrorEvent",
     "Rect",
     "RGBColor",
     "RTCDataChannelEvent",
     "RTCPeerConnectionIceEvent",
     "Screen",
@@ -499,16 +526,19 @@ var interfaceNamesInGlobalScope =
     "SVGTransform",
     "SVGTransformList",
     "SVGTSpanElement",
     "SVGUnitTypes",
     "SVGUseElement",
     "SVGViewElement",
     "SVGZoomAndPan",
     "SVGZoomEvent",
+    {name: "Telephony", b2g: true},
+    {name: "TelephonyCall", b2g: true},
+    {name: "TelephonyCallGroup", b2g: true},
     "Text",
     "TextDecoder",
     "TextEncoder",
     "TextMetrics",
     "TimeEvent",
     "TimeRanges",
     "Touch",
     "TouchEvent",
@@ -519,16 +549,17 @@ var interfaceNamesInGlobalScope =
     {name: "TreeContentView", xbl: true},
     {name: "TreeSelection", xbl: true},
     "TreeWalker",
     "UIEvent",
     "UndoManager",
     "URL",
     {name: "UserDataHandler", xbl: true},
     "UserProximityEvent",
+    {name: "USSDReceivedEvent", b2g: true},
     "ValidityState",
     "VideoStreamTrack",
     "WaveShaperNode",
     "WebGLActiveInfo",
     "WebGLBuffer",
     "WebGLFramebuffer",
     "WebGLProgram",
     "WebGLRenderbuffer",
@@ -567,37 +598,39 @@ var interfaceNamesInGlobalScope =
     {name: "XULTreeBuilder", xbl: true},
   ]
 // IMPORTANT: Do not change this list without review from a DOM peer!
 
 function createInterfaceMap(isXBLScope) {
   var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
   var isNightly = version.endsWith("a1");
   var isRelease = !version.contains("a");
-  var isAndroid = navigator.userAgent.indexOf("Android") >= 0;
+  var isMobile = navigator.userAgent.contains("Mobile");
+  var isB2G = isMobile && !navigator.userAgent.contains("Android");
   var interfaceMap = {};
   for (var entry of ecmaGlobals) {
     if (typeof(entry) === "string") {
       // Standard ECMAScript global objects are not defined on the XBL scope.
       interfaceMap[entry] = !isXBLScope;
     } else if (entry.nightly === isNightly) {
       interfaceMap[entry.name] = !isXBLScope;
     } else {
       interfaceMap[entry.name] = false;
     }
   }
   for (var entry of interfaceNamesInGlobalScope) {
     if (typeof(entry) === "string") {
       interfaceMap[entry] = true;
-    } else if (entry.xbl === isXBLScope ||
-               entry.android === isAndroid ||
-               entry.release === isRelease) {
+    } else if (entry.xbl === !isXBLScope ||
+               entry.mobile === !isMobile ||
+               entry.b2g === !isB2G ||
+               entry.release === !isRelease) {
+      interfaceMap[entry.name] = false;
+    } else {
       interfaceMap[entry.name] = true;
-    } else {
-      interfaceMap[entry.name] = false;
     }
   }
   return interfaceMap;
 }
 
 function runTest(isXBLScope) {
   var interfaceMap = createInterfaceMap(isXBLScope);
   for (var name of Object.getOwnPropertyNames(window)) {
--- a/testing/mochitest/b2g.json
+++ b/testing/mochitest/b2g.json
@@ -327,17 +327,16 @@
     "dom/tests/mochitest/bugs/test_resize_move_windows.html": "Windows can't change size and position on B2G",
     "dom/tests/mochitest/bugs/test_window_bar.html":"",
 
     "dom/tests/mochitest/general/test_clipboard_events.html":"clipboard undefined",
     "content/base/test/test_copypaste.html":"clipboard undefined",
     "content/base/test/test_bug166235.html":"clipboard undefined",
 
     "dom/tests/mochitest/general/test_idleapi_permissions.html":"",
-    "dom/tests/mochitest/general/test_interfaces.html":"",
     "dom/tests/mochitest/general/test_paste_selection.html":"No clipboard",
 
     "dom/tests/mochitest/geolocation/test_allowCurrent.html":"Bug 910235 - Error: no message manager set when calling method: [nsIObserver::observe]",
     "dom/tests/mochitest/geolocation/test_allowWatch.html":"",
     "dom/tests/mochitest/geolocation/test_cachedPosition.html":"",
     "dom/tests/mochitest/geolocation/test_cancelCurrent.html":"",
     "dom/tests/mochitest/geolocation/test_cancelWatch.html":"",
     "dom/tests/mochitest/geolocation/test_clearWatch.html":"",